user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <>
Subject: [PATCH] t/run.perl: less confusing error reporting
Date: Sun, 26 Sep 2021 01:42:38 +0000	[thread overview]
Message-ID: <> (raw)

The $sigchld handler was reporting the last test (successful or
not) for a given PID in case a worker dies prematurely.
Instead, redisplay all failed test in $run_log to ensure the
report only shows failed tests, and not the last started (and
possibly successful) one.
 t/run.perl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/t/run.perl b/t/run.perl
index 0fe6d08b..cf80a8a1 100755
--- a/t/run.perl
+++ b/t/run.perl
@@ -183,7 +183,10 @@ my $start_worker = sub {
 		kill 'USR1', $producer if !$eof; # sets $eof in $producer
-		DIE join('', map { "E: $_\n" } @err) if @err;
+		if (@err) { # write to run_log for $sigchld handler
+			syswrite($run_log, "$$ @err\n");
+			DIE join('', map { "E: $_\n" } @err);
+		}
 	} else {
 		$pids{$pid} = $j;

                 reply	other threads:[~2021-09-26  1:42 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

  List information:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \
    --subject='Re: [PATCH] t/run.perl: less confusing error reporting' \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Code repositories for project(s) associated with this inbox:

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).