user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH] t/run.perl: less confusing error reporting
Date: Sun, 26 Sep 2021 01:42:38 +0000	[thread overview]
Message-ID: <20210926014238.21398-1-e@80x24.org> (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 {
 			$tb->reset;
 		}
 		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);
+		}
 		exit(0);
 	} 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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://public-inbox.org/README

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

  git send-email \
    --in-reply-to=20210926014238.21398-1-e@80x24.org \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

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).