summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a9a3e82)
raw | patch | inline | side by side (parent: a9a3e82)
author | Stephan Beyer <s-beyer@gmx.net> | |
Sat, 12 Jul 2008 15:47:51 +0000 (17:47 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 13 Jul 2008 20:21:08 +0000 (13:21 -0700) |
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 <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 <s-beyer@gmx.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/test-lib.sh | patch | blob | history |
diff --git a/t/test-lib.sh b/t/test-lib.sh
index 8e2849b5ce915c3984894628e8e3ce990812ddfd..11c027571b44c429b4f6fdca88bff9c3360c7545 100644 (file)
--- a/t/test-lib.sh
+++ b/t/test-lib.sh
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.