From eeb69131ed7f3cb7a191d5bf0e3ce8fdd726a539 Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Sun, 31 Mar 2013 10:37:25 +0200 Subject: [PATCH] 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 --- t/test-lib-functions.sh | 3 +++ 1 file changed, 3 insertions(+) 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 } -- 2.11.4.GIT