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 <redacted>
---
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