From: Jay Satiro Date: Wed, 5 Oct 2022 07:33:39 +0000 (-0400) Subject: runtests: fix uninitialized value on ignored tests X-Git-Tag: curl-7_86_0~122 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d57f906b2a06cf84220ba3831d199a9d9b5eeb99;p=thirdparty%2Fcurl.git runtests: fix uninitialized value on ignored tests - Don't show TESTFAIL message (ie tests failed which aren't ignored) if only ignored tests failed. Before: IGNORED: failed tests: 571 612 1056 TESTDONE: 1214 tests out of 1217 reported OK: 99% Use of uninitialized value $failed in concatenation (.) or string at ./runtests.pl line 6290. TESTFAIL: These test cases failed: After: IGNORED: failed tests: 571 612 1056 TESTDONE: 1214 tests out of 1217 reported OK: 99% Closes https://github.com/curl/curl/pull/9648 --- diff --git a/tests/runtests.pl b/tests/runtests.pl index 7eeabfc380..72cd2c353e 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -6286,7 +6286,7 @@ if($total) { logmsg sprintf("TESTDONE: $ok tests out of $total reported OK: %d%%\n", $ok/$total*100); - if($ok != $total) { + if($failed && ($ok != $total)) { logmsg "\nTESTFAIL: These test cases failed: $failed\n\n"; } }