From: Thomas Rast Date: Sun, 31 Mar 2013 08:37:25 +0000 (+0200) Subject: tests: notice valgrind error in test_must_fail X-Git-Tag: v1.8.3-rc0~121^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/eeb69131ed7f3cb7a191d5bf0e3ce8fdd726a539?ds=inline;hp=--cc 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 Acked-by: Johannes Schindelin Signed-off-by: Junio C Hamano --- eeb69131ed7f3cb7a191d5bf0e3ce8fdd726a539 diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index fa62d010f6..6766553c31 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -536,6 +536,9 @@ test_must_fail () { elif test $exit_code = 127; then echo >&2 "test_must_fail: command not found: $*" return 1 + elif test $exit_code = 126; then + echo >&2 "test_must_fail: valgrind error: $*" + return 1 fi return 0 }