Skip to content

Commit eeb6913

Browse files
Thomas Rastgitster
authored andcommitted
tests: notice valgrind error in test_must_fail
We tell valgrind to return 126 if it notices that something is wrong, but we did not actually handle this in test_must_fail, leading to false negatives. Catch and report it. Signed-off-by: Thomas Rast <[email protected]> Acked-by: Johannes Schindelin <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 95d9d5e commit eeb6913

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

t/test-lib-functions.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,9 @@ test_must_fail () {
536536
elif test $exit_code = 127; then
537537
echo >&2 "test_must_fail: command not found: $*"
538538
return 1
539+
elif test $exit_code = 126; then
540+
echo >&2 "test_must_fail: valgrind error: $*"
541+
return 1
539542
fi
540543
return 0
541544
}

0 commit comments

Comments
 (0)