From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id D40D31F8C8 for ; Sun, 26 Sep 2021 01:42:38 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] t/run.perl: less confusing error reporting Date: Sun, 26 Sep 2021 01:42:38 +0000 Message-Id: <20210926014238.21398-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: 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;