Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ny4pI-0005oW-6I for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Jun 2022 04:58:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ny4pG-0006pm-Eg for pgsql-hackers@arkaria.postgresql.org; Mon, 06 Jun 2022 04:58:50 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ny4pG-0006pd-58 for pgsql-hackers@lists.postgresql.org; Mon, 06 Jun 2022 04:58:50 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ny4pD-0003Be-Iz for pgsql-hackers@lists.postgresql.org; Mon, 06 Jun 2022 04:58:48 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 6D2865C0108; Mon, 6 Jun 2022 00:58:46 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Mon, 06 Jun 2022 00:58:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; t=1654491526; x=1654577926; bh=YX5sB4MU/V 3qOjDKsgHKti/rRUnl1cVuaS4vjiC7lCs=; b=Mvu9PUKeH02dWHPcuEnkCseYzK 6kpGMJhV++sCjH58UjUPxFSGHEh2qdwEHu+0GXaPlLRsWaTu66R/ztrdeq0eeQT8 wxpPTT28ydcli8PHdVuYjRje/IJWC9En7eleiRhocA4zfm4hb2Sp4rsTMrQ3LVxQ 1EDl8G/HmiQ7FZvlJi3917bpKzoAS8Q54P0z/xRiR0Q6rM1um8jDQL8g4zgpfI8/ vuvrRoRQvA4tLwvgGl6khDvz7FpqY08D4KcTiLumqoK47LkizUQsyVHu51Zqyb9g l/17y+bFvt6QoyEl858iWv/E9MrDiYECD1FI16Pz3BKIka6paQ1nGxFYsY/g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1654491526; x=1654577926; bh=YX5sB4MU/V3qOjDKsgHKti/rRUnl 1cVuaS4vjiC7lCs=; b=DYB68gdi46Dp3LrrD4A72zxqQ2o4uDiknt+8RuisA6J5 YUNgAkHM1qU+CeZLtv3/v4u/+kgKPw3SA7PZrchbyR0Ia/7YQnrG6JDBTg92cXqV D0/eZWVV0S44jtawCpIp+hhp5pk+eyC9ceFzZvo2zO98EdVba3IH/HsZERy/30Kn ZoQUjz2Jhsaflg8O91efGT6vcsZAVvaN0cFPgUYWDA5XX+lqYe5Tg4I9Skb4bKiK 5AZEZU2afVwEsKaEwbQvd6VrghBTU7lO8wFba/QRCYBvv9ci14MVv/+XiPfr2yg3 UMfy30wB4PotULoGLQYxVGbVH+hzFrn8JQsx/h5Hlg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedruddtuddgkeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 6 Jun 2022 00:58:43 -0400 (EDT) Date: Mon, 6 Jun 2022 13:58:40 +0900 From: Michael Paquier To: Andres Freund Cc: Noah Misch , Tom Lane , Thomas Munro , Julien Rouhaud , Andrew Dunstan , Postgres hackers Subject: Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set Message-ID: References: <20220511053255.GA2578591@rfd.leadboat.com> <20220514082728.GE2684227@rfd.leadboat.com> <20220518080315.GC2820845@rfd.leadboat.com> <20220521012801.GA2934331@rfd.leadboat.com> <20220603195318.qk4voicqfdhlsnoh@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Wv8YzMPk3+sIZDMq" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Wv8YzMPk3+sIZDMq Content-Type: multipart/mixed; boundary="iZoEUx1IalvQPeGA" Content-Disposition: inline --iZoEUx1IalvQPeGA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Jun 04, 2022 at 12:35:45PM +0900, Michael Paquier wrote: > Something like 80~85% of the bloat comes from the diffs in your case. > Well, it is always possible to limit that to an arbitrary amount of > characters (say 50k~100k?) to still give some context, and dump the > whole in a different file outside the log/ path (aka tmp_check/), so > that the buildfarm would show a minimum amount of information, while > local failures would still have an access to everything. After looking a bit around that. Something like the attached, where the characters are limited at 10k, would limit the output generated.. -- Michael --iZoEUx1IalvQPeGA Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="upgrade-tap-logs.patch" Content-Transfer-Encoding: quoted-printable diff --git a/src/bin/pg_upgrade/t/002_pg_upgrade.pl b/src/bin/pg_upgrade/t/= 002_pg_upgrade.pl index 55c7354ba2..4581ddc915 100644 --- a/src/bin/pg_upgrade/t/002_pg_upgrade.pl +++ b/src/bin/pg_upgrade/t/002_pg_upgrade.pl @@ -223,6 +223,9 @@ command_ok( 'run of pg_upgrade for new instance'); $newnode->start; =20 +# Limit all contents to 10k characters. +my $report_max_chars =3D 10000; + # Check if there are any logs coming from pg_upgrade, that would only be # retained on failure. my $log_path =3D $newnode->data_dir . "/pg_upgrade_output.d/log"; @@ -231,7 +234,8 @@ if (-d $log_path) foreach my $log (glob("$log_path/*")) { note "=3D=3D=3D contents of $log =3D=3D=3D\n"; - print slurp_file($log); + my $contents =3D slurp_file($log); + print substr($contents, 0, $report_max_chars); print "=3D=3D=3D EOF =3D=3D=3D\n"; } } @@ -256,9 +260,9 @@ if ($compare_res !=3D 0) run_command([ 'diff', "$tempdir/dump1.sql", "$tempdir/dump2.sql" ]); print "=3D=3D=3D diff of $tempdir/dump1.sql and $tempdir/dump2.sql\n"; print "=3D=3D=3D stdout =3D=3D=3D\n"; - print $stdout; + print substr($stdout, 0, $report_max_chars); print "=3D=3D=3D stderr =3D=3D=3D\n"; - print $stderr; + print substr($stderr, 0, $report_max_chars); print "=3D=3D=3D EOF =3D=3D=3D\n"; } =20 --iZoEUx1IalvQPeGA-- --Wv8YzMPk3+sIZDMq Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmKdiYAACgkQnvQgOdby QH1zig//Z4qbt1RC26gujSOUGBCE1o0ywA1HIEVkpf/ytXEOphtuqyogkBAFlgnn EKNRDCy7e8yfhe3GdBdIYBXfaR5QqOAomuY5/orvcRd/fsRyWhhRLf/fS87csULe 1hOwjMv5xdiyXVVhfJkQlbCkG7oUIkgzcHAT18vW7zdUYYqqvdmrRhQxuTlPbUBv AqysCeJGsmGdwvrRbWvE66znfTeo8ZD34jl5cJKKD+X8iHMI1k22npm32omLgqFY 3wo6Q5qJJAEhwxAePZK2x8fyXPiC2eRJkKSa7TKj+Dv80rK+qbt8SojBam2gx8zX ywabs9aYO92D16hxH/jiUNCW3FoCvOhSS17YQcS4EpOEFgr2ZnVfhgB/dN1DSCOS IyXUdIQhSNEYD/tcZoScnRCSsf+MQdhJzNh1488RaAgzon6HfDnCMn6t/1ek0MvX h3N/eA3o2VUKFTCA9VhG4oMnskylmWrU8AtE7m/Af0N7v4RZQR6T05WcBSjyKHkJ Lgkhq/0RbU8cPrYbZNMhADcZkcWjrjmCnaaz1zy71e48LHNG5dIVg8wFOXx6l5b7 EPjm69L3klWa3yEeg/gY76+BtxfikrEuEm6mbZez+oofSmPMEClF6RQv7UC9PQt/ uusK3Gef6+jjm0nMsy9Zce/uokiJoergtLc/4BkR4K9x3pqp9HI= =0Kot -----END PGP SIGNATURE----- --Wv8YzMPk3+sIZDMq--