Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Rast <trast@inf.ethz.ch>2013-03-31 12:37:25 +0400
committerJunio C Hamano <gitster@pobox.com>2013-04-01 18:45:45 +0400
commiteeb69131ed7f3cb7a191d5bf0e3ce8fdd726a539 (patch)
tree4be4bdf8bd11633da400b7b2b95efee2c793858b /t/test-lib-functions.sh
parent95d9d5ec75d3549f00cac29cd33be899cfb4693a (diff)
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>
Diffstat (limited to 't/test-lib-functions.sh')
-rw-r--r--t/test-lib-functions.sh3
1 files changed, 3 insertions, 0 deletions
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
}