Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t5P17-005rvn-II for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Oct 2024 12:38:41 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1t5P15-006LRK-7Y for pgsql-hackers@arkaria.postgresql.org; Mon, 28 Oct 2024 12:38:39 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t5P14-006LRC-Fr for pgsql-hackers@lists.postgresql.org; Mon, 28 Oct 2024 12:38:39 +0000 Received: from fhigh-a6-smtp.messagingengine.com ([103.168.172.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1t5P12-003Pk6-4G for pgsql-hackers@lists.postgresql.org; Mon, 28 Oct 2024 12:38:38 +0000 Received: from phl-compute-11.internal (phl-compute-11.phl.internal [10.202.2.51]) by mailfhigh.phl.internal (Postfix) with ESMTP id 55FDF11400E7 for ; Mon, 28 Oct 2024 08:38:34 -0400 (EDT) Received: from phl-imap-02 ([10.202.2.81]) by phl-compute-11.internal (MEProxy); Mon, 28 Oct 2024 08:38:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=compiler.org; h= cc:content-transfer-encoding:content-type:content-type:date:date :from:from:in-reply-to:message-id:mime-version:reply-to:subject :subject:to:to; s=fm3; t=1730119114; x=1730205514; bh=QB8quXm7Lk A1aovadZATqkfYKVcqrvLUoPzp3dP2NUY=; b=yKiDAtUGb3n1+qMzOjDXkjUy+M VYMpKeRx/MZCGUfsnsH10+qm4Cut12Fq/lzvddINZh3TLUBRiddqZHeB9Valy7Cp +POgPXE76elDF7vUdoDVIW8fNmQNIKUrqqHTOQjnE7EY9oaraB/dke5tpI2qkHNi BVt9wyoWAAqeRY5BaePQdOqRq9/os/UosgA3EgRB1zTcAX84RGsNbbd+IB1drMzp jI3XQzXq4Bfc77H85LO3mX8ztvAQt4Uwlm9q/vTaDFMp62sZEx25WhFVdhrGNWlV 7SedVzon2Y0OeJVOQ2kMpMCVTjk3P76XXBeaB11FmuHDhbFeQWywqAcMWing== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1730119114; x=1730205514; bh=QB8quXm7LkA1aovadZATqkfYKVcq rvLUoPzp3dP2NUY=; b=KSUifc/OxOLdwIc4K2gDH+Ox/XOFjZnUI2LMjyV63Spp uhz992PSBwZUnshVoq/ifLnSEHYu4plrfSkDpE6EwJ94B3/oKcDSRUKHk99qJ++v VOS1qszuc+swefRqlKjF6QcQPc5rSskD1yHX/yqIBl/OD2Eek82shkvTf/Y+vq06 GKbjXtiuwDz/QYubS2J4ltFYgq66JtmbKDmSY1QybUGFM5Sms1slL0dN9b0zjDj4 MXv52NdfvbYkveRb2QNAFKdi3ROcdr6TMuaWg1POE96cHc9OOw7lsZkDEcNi1IYM NPtzEFR3iVefbf7VD8788fThu9vcXzGBB6PyXzbL3A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdejledgudehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucenucfjughrpefoggffhf fvkffutgfgsehtjeertdertddtnecuhfhrohhmpedflfhovghlucflrggtohgsshhonhdf uceojhhovghlsegtohhmphhilhgvrhdrohhrgheqnecuggftrfgrthhtvghrnhepudeuue ehgfejjeehvdduteejteefvdfhudejvedvvdejhfdtgfetfeeikeektdelnecuvehluhhs thgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepjhhovghlsegtohhmph hilhgvrhdrohhrghdpnhgspghrtghpthhtohepuddpmhhouggvpehsmhhtphhouhhtpdhr tghpthhtohepphhgshhqlhdqhhgrtghkvghrsheslhhishhtshdrphhoshhtghhrvghsqh hlrdhorhhg X-ME-Proxy: Feedback-ID: ic6394509:Fastmail Received: by mailuser.phl.internal (Postfix, from userid 501) id D3CE5B00068; Mon, 28 Oct 2024 08:38:33 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface MIME-Version: 1.0 Date: Mon, 28 Oct 2024 14:38:12 +0200 From: "Joel Jacobson" To: pgsql-hackers@lists.postgresql.org Message-Id: <49f7e64a-b9be-4a90-a9fe-210a7740405e@app.fastmail.com> Subject: Inconsistent output handling in 002_pg_upgrade.pl test logs Content-Type: text/plain Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi hackers, I've noticed some inconsistency in 002_pg_upgrade.pl in how it handles output during test failures. Currently, it uses note to print the header: note "=== contents of $log ===\n"; but print for the log content and footer: print slurp_file($log); print "=== EOF ===\n"; This results in the header appearing in the TAP test output, while the actual log content and the EOF-footer are directed to ./build/testrun/pg_upgrade/002_pg_upgrade/log/regress_log_002_pg_upgrade This split means the log content is separate from its header and footer, making it harder to interpret during test failures. Example of current behavior: In the console output: # executing test in ./build/testrun/pg_upgrade/002_pg_upgrade group pg_upgrade test 002_pg_upgrade ...omitted... not ok 15 - pg_upgrade_output.d/ removed after pg_upgrade success # === contents of ./build/testrun/pg_upgrade/002_pg_upgrade/data/t_002_pg_upgrade_new_node_data/pgdata/pg_upgrade_output.d/20241028T140145.267/log/pg_upgrade_dump_5.log === # === contents of ./build/testrun/pg_upgrade/002_pg_upgrade/data/t_002_pg_upgrade_new_node_data/pgdata/pg_upgrade_output.d/20241028T140145.267/log/pg_upgrade_dump_1.log === But the actual log content and footers are only visible in regress_log_002_pg_upgrade. Suggested solutions: Option 1: Keep output together using note If we want all messages (header, content, and footer) to be in the TAP output for easier readability, we could replace print with note for both the content and footer: foreach my $log (@log_files) { note "=== contents of $log ===\n"; note slurp_file($log); note "=== EOF ===\n"; } Option 2: Adjust header message for separate logs If we intentionally want the log content to remain in the separate regression log for brevity, we could clarify the header message to indicate where the actual content can be found, and ensure the "=== contents of $log ===\n" message goes into the same file as the content: foreach my $log (@log_files) { note "=== contents of $log logged to $path_to_regress_log_002_pg_upgrade ===\n"; print "=== contents of $log ===\n"; print slurp_file($log); print "=== EOF ===\n"; } Thoughts on these options? /Joel