1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-06-11 02:16:16 +02:00

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 <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Jeff King 2016-06-24 15:45:04 -04:00 committed by Junio C Hamano
parent 6f5f9d7476
commit 2472448c88

View File

@ -612,7 +612,7 @@ test_must_fail () {
then
echo >&2 "test_must_fail: command succeeded: $*"
return 1
elif test $exit_code -eq 141 && list_contains "$_test_ok" sigpipe
elif test_match_signal 13 $exit_code && list_contains "$_test_ok" sigpipe
then
return 0
elif test $exit_code -gt 129 && test $exit_code -le 192