Skip to content

Commit 2472448

Browse files
peffgitster
authored andcommitted
test_must_fail: use test_match_signal
In 8bf4bec (add "ok=sigpipe" to test_must_fail and use it to fix flaky tests, 2015-11-27), test_must_fail learned to recognize "141" as a sigpipe failure. However, testing for a signal is more complicated than that; we should use test_match_signal to implement more portable checking. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 6f5f9d7 commit 2472448

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
@@ -612,7 +612,7 @@ test_must_fail () {
612612
then
613613
echo >&2 "test_must_fail: command succeeded: $*"
614614
return 1
615-
elif test $exit_code -eq 141 && list_contains "$_test_ok" sigpipe
615+
elif test_match_signal 13 $exit_code && list_contains "$_test_ok" sigpipe
616616
then
617617
return 0
618618
elif test $exit_code -gt 129 && test $exit_code -le 192

0 commit comments

Comments
 (0)