Skip to content

Commit 8b5389f

Browse files
'make test' must fail if Asan fails
When running 'make test' with GNU make, if a test suite program displays "PASSED", this was automatically counted as a pass. This would in particular count as passing: * A test suite with the substring "PASSED" in a test description. * A test suite where all the test cases succeeded, but the final cleanup failed, in particular if a sanitizer reported a memory leak. Use the test executable's return status instead to determine whether the test suite passed. It's always 0 on PASSED unless the executable's cleanup code fails, and it's never 0 on any failure. Fix #303
1 parent bfeed66 commit 8b5389f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/scripts/run-test-suites.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ sub pad_print_center {
9393
$suite_cases_failed = () = $result =~ /.. FAILED/g;
9494
$suite_cases_skipped = () = $result =~ /.. ----/g;
9595

96-
if( $result =~ /PASSED/ ) {
96+
if( $? == 0 ) {
9797
print "PASS\n";
9898
if( $verbose > 2 ) {
9999
pad_print_center( 72, '-', "Begin $suite" );

0 commit comments

Comments
 (0)