Skip to content

Commit 43f3afc

Browse files
peffgitster
authored andcommitted
t5504: handle expected output from SIGPIPE death
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f3ed0b3 commit 43f3afc

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

t/t5504-fetch-receive-strict.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,10 @@ test_expect_success 'push with receive.fsckobjects' '
101101
git config transfer.fsckobjects false
102102
) &&
103103
test_must_fail ok=sigpipe git push --porcelain dst master:refs/heads/test >act &&
104-
test_cmp exp act
104+
{
105+
test_cmp exp act ||
106+
! test -s act
107+
}
105108
'
106109

107110
test_expect_success 'push with transfer.fsckobjects' '

0 commit comments

Comments
 (0)