Skip to content

Commit f3ed0b3

Browse files
peffgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 9ff18fa commit f3ed0b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

t/test-lib-functions.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ test_must_fail () {
617617
return 0
618618
elif test $exit_code -gt 129 && test $exit_code -le 192
619619
then
620-
echo >&2 "test_must_fail: died by signal: $*"
620+
echo >&2 "test_must_fail: died by signal $(($exit_code - 128)): $*"
621621
return 1
622622
elif test $exit_code -eq 127
623623
then

0 commit comments

Comments
 (0)