From: Thomas Rast Date: Sun, 31 Mar 2013 08:37:25 GMT Subject: [PATCH 3/4] tests: notice valgrind error in test_must_fail Message-ID: <9a01760dc54167047b17a1fdbb456055c3a9b1cd.1364718866.git.trast@inf.ethz.ch> In-Reply-To: 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 --- Just noticed this issue when tracking down the failure in t7612. It might still be a bit too fragile; when running the entire suite under valgrind, I usually just cd test-results egrep '^==[0-9]+==' *.out| less -S 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 fa62d01..6766553 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 } -- 1.8.2.467.gedf93a5