From: Stephan Beyer Date: Sat, 12 Jul 2008 15:47:51 +0000 (+0200) Subject: t/test-lib.sh: exit with small negagive int is ok with test_must_fail X-Git-Tag: v1.6.0-rc0~39^2~2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=5a26973025bce74782571844c7b8091d1cd7c405;p=git.git t/test-lib.sh: exit with small negagive int is ok with test_must_fail The test_must_fail function in test-lib.sh has been designed to distinguish segmentation faults from controlled errors. But in the current implementation this only works if a git command does not return a small negative value, like -1, -2 or -3. But some git commands do. Because any signal (like SIGSEGV) will result in an exit status less than 193, this patch just adds a further check for the exit status. Signed-off-by: Stephan Beyer Signed-off-by: Junio C Hamano --- diff --git a/t/test-lib.sh b/t/test-lib.sh index 8e2849b5c..11c027571 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -379,7 +379,7 @@ test_external_without_stderr () { test_must_fail () { "$@" - test $? -gt 0 -a $? -le 129 + test $? -gt 0 -a $? -le 129 -o $? -gt 192 } # test_cmp is a helper function to compare actual and expected output.