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: http://git.ipfire.org/?a=commitdiff_plain;h=eeb69131ed7f3cb7a191d5bf0e3ce8fdd726a539;p=thirdparty%2Fgit.git 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 --- 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 }