Skip to content

Commit

Permalink
test_must_fail: report number of unexpected signal
Browse files Browse the repository at this point in the history
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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jeff King authored and Junio C Hamano committed Feb 25, 2016
1 parent 9ff18fa commit f3ed0b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion t/test-lib-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f3ed0b3

Please sign in to comment.