public inbox for [email protected]
help / color / mirror / Atom feedFrom: Michael Paquier <[email protected]>
To: Andres Freund <[email protected]>
Cc: Noah Misch <[email protected]>
Cc: Tom Lane <[email protected]>
Cc: Thomas Munro <[email protected]>
Cc: Julien Rouhaud <[email protected]>
Cc: Andrew Dunstan <[email protected]>
Cc: Postgres hackers <[email protected]>
Subject: Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set
Date: Mon, 6 Jun 2022 13:58:40 +0900
Message-ID: <[email protected]> (raw)
In-Reply-To: <[email protected]>
References: <[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<[email protected]>
<YohWm/[email protected]>
<[email protected]>
<[email protected]>
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
Attachments:
[text/x-diff] upgrade-tap-logs.patch (1.2K, ../[email protected]/2-upgrade-tap-logs.patch)
download | inline diff:
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;
+# Limit all contents to 10k characters.
+my $report_max_chars = 10000;
+
# Check if there are any logs coming from pg_upgrade, that would only be
# retained on failure.
my $log_path = $newnode->data_dir . "/pg_upgrade_output.d/log";
@@ -231,7 +234,8 @@ if (-d $log_path)
foreach my $log (glob("$log_path/*"))
{
note "=== contents of $log ===\n";
- print slurp_file($log);
+ my $contents = slurp_file($log);
+ print substr($contents, 0, $report_max_chars);
print "=== EOF ===\n";
}
}
@@ -256,9 +260,9 @@ if ($compare_res != 0)
run_command([ 'diff', "$tempdir/dump1.sql", "$tempdir/dump2.sql" ]);
print "=== diff of $tempdir/dump1.sql and $tempdir/dump2.sql\n";
print "=== stdout ===\n";
- print $stdout;
+ print substr($stdout, 0, $report_max_chars);
print "=== stderr ===\n";
- print $stderr;
+ print substr($stderr, 0, $report_max_chars);
print "=== EOF ===\n";
}
[application/pgp-signature] signature.asc (833B, ../[email protected]/3-signature.asc)
download
view thread (113+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
Subject: Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox