user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH] t/run.perl: less confusing error reporting
@ 2021-09-26  1:42  7% Eric Wong
  0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2021-09-26  1:42 UTC (permalink / raw)
  To: meta

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;

^ permalink raw reply related	[relevance 7%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2021-09-26  1:42  7% [PATCH] t/run.perl: less confusing error reporting Eric Wong

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