Skip to content

Commit

Permalink
t5504: handle expected output from SIGPIPE death
Browse files Browse the repository at this point in the history
Commit 8bf4bec (add "ok=sigpipe" to test_must_fail and use
it to fix flaky tests, 2015-11-27) taught t5504 to handle
"git push" racily exiting with SIGPIPE rather than failing.

However, one of the tests checks the output of the command,
as well. In the SIGPIPE case, we will not have produced any
output. If we want the test to be truly non-flaky, we have
to accept either output.

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 f3ed0b3 commit 43f3afc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion t/t5504-fetch-receive-strict.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ test_expect_success 'push with receive.fsckobjects' '
git config transfer.fsckobjects false
) &&
test_must_fail ok=sigpipe git push --porcelain dst master:refs/heads/test >act &&
test_cmp exp act
{
test_cmp exp act ||
! test -s act
}
'

test_expect_success 'push with transfer.fsckobjects' '
Expand Down

0 comments on commit 43f3afc

Please sign in to comment.