From b3570b36d7dcc27d69c14560b38603bb0b20a9e1 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Fri, 22 Aug 2025 11:44:35 +0200 Subject: [PATCH] runtests: show still running tests when nothing has happened for a while ... even if there are tests still pending. To help visualize tests that might be hanging. Attempts to set the limit at 10 seconds of silence. Closes #18349 --- tests/runtests.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/runtests.pl b/tests/runtests.pl index 32af1b24d4..fd62327102 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -3048,7 +3048,7 @@ while() { # If we could be running more tests, don't wait so we can schedule a new # one immediately. If all runners are busy, wait a fraction of a second # for one to finish so we can still loop around to check the abort flag. - my $runnerwait = scalar(@runnersidle) && scalar(@runtests) ? 0 : 1.0; + my $runnerwait = scalar(@runnersidle) && scalar(@runtests) ? 0.1 : 1.0; my (@ridsready, $riderror) = runnerar_ready($runnerwait); if(@ridsready) { for my $ridready (@ridsready) { @@ -3061,6 +3061,7 @@ while() { undef $ridready; } if($ridready) { + $endwaitcnt = 0; # This runner is ready to be serviced my $testnum = $runnersrunning{$ridready}; defined $testnum || die "Internal error: test for runner $ridready unknown"; @@ -3145,7 +3146,8 @@ while() { delete $runnersrunning{$riderror} if(defined $runnersrunning{$riderror}); $globalabort = 1; } - if(!scalar(@runtests) && ++$endwaitcnt == (240 + $jobs)) { + $endwaitcnt += $runnerwait; + if($endwaitcnt >= 10) { # Once all tests have been scheduled on a runner at the end of a test # run, we just wait for their results to come in. If we're still # waiting after a couple of minutes ($endwaitcnt multiplied by @@ -3154,6 +3156,7 @@ while() { # likely point to a single test that has hung. logmsg "Hmmm, the tests are taking a while to finish. Here is the status:\n"; catch_usr1(); + $endwaitcnt = 0; } } -- 2.47.3