From: Jeff King Date: Wed, 24 Feb 2016 07:45:49 +0000 (-0500) Subject: test_must_fail: report number of unexpected signal X-Git-Tag: v2.8.0-rc0~6^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f3ed0b372d990eade2e4727f17d9ee40003badb1;p=thirdparty%2Fgit.git test_must_fail: report number of unexpected signal If a command is marked as test_must_fail but dies with a signal, we consider that a problem and report the error to stderr. However, we don't say _which_ signal; knowing that can make debugging easier. Let's share as much as we know. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- diff --git a/t/test-lib-functions.sh b/t/test-lib-functions.sh index c64e5a5025..8d99eb303f 100644 --- a/t/test-lib-functions.sh +++ b/t/test-lib-functions.sh @@ -617,7 +617,7 @@ test_must_fail () { return 0 elif test $exit_code -gt 129 && test $exit_code -le 192 then - echo >&2 "test_must_fail: died by signal: $*" + echo >&2 "test_must_fail: died by signal $(($exit_code - 128)): $*" return 1 elif test $exit_code -eq 127 then