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 <trast@inf.ethz.ch>
Acked-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Thomas Rast 2013-03-31 10:37:25 +02:00 committed by Junio C Hamano
parent 95d9d5ec75
commit eeb69131ed

View File

@ -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
}