git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 5/5] t5504: drop sigpipe=ok from push tests

From
Jeff King <peff@peff.net>
Date
Apr 19, 2016, 22:51 UTC
Message-ID
<20160419225125.GE18255@sigill.intra.peff.net>
In-Reply-To
<20160419223945.GA18055@sigill.intra.peff.net>

These were added by 8bf4bec (add "ok=sigpipe" to test_must_fail and use it to fix flaky tests, 2015-11-27) because we would racily die via SIGPIPE when the pack was rejected by the other side.

But since we have recently de-flaked send-pack, we should be able to tighten up these tests (including re-adding the expected output checks).

Signed-off-by: Jeff King <peff@peff.net>
---
Would be nice to reference HEAD^2 by name here, but of
course I don't know its final commit sha1 yet.
 t/t5504-fetch-receive-strict.sh | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/t/t5504-fetch-receive-strict.sh b/t/t5504-fetch-receive-strict.sh
index a3e12d2..44f3d5f 100755
--- a/t/t5504-fetch-receive-strict.sh
+++ b/t/t5504-fetch-receive-strict.sh
@@ -100,11 +100,8 @@ test_expect_success 'push with receive.fsckobjects' '
 		git config receive.fsckobjects true &&
 		git config transfer.fsckobjects false
 	) &&
-	test_must_fail ok=sigpipe git push --porcelain dst master:refs/heads/test >act &&
-	{
-		test_cmp exp act ||
-		! test -s act
-	}
+	test_must_fail git push --porcelain dst master:refs/heads/test >act &&
+	test_cmp exp act
 '
 
 test_expect_success 'push with transfer.fsckobjects' '
@@ -114,7 +111,8 @@ test_expect_success 'push with transfer.fsckobjects' '
 		cd dst &&
 		git config transfer.fsckobjects true
 	) &&
-	test_must_fail ok=sigpipe git push --porcelain dst master:refs/heads/test >act
+	test_must_fail git push --porcelain dst master:refs/heads/test >act &&
+	test_cmp exp act
 '
 
 cat >bogus-commit <<\EOF
-- 
2.8.1.512.g4e0a533
Previous: Jeff KingNext: Junio C Hamano
Message 8 of 10 in “fix deadlock in git-push”
  1. 0/5 fix deadlock in git-pushJeff King, Apr 19, 2016
  2. 1/5 send-pack: close demux pipe before finishing async processJeff King, Apr 19, 2016
  3. 2/5 run-command: teach async threads to ignore SIGPIPEJeff King, Apr 19, 2016
  4. Johannes SixtApr 21, 2016
  5. Jeff KingApr 21, 2016
  6. 3/5 send-pack: isolate sigpipe in demuxer threadJeff King, Apr 19, 2016
  7. 4/5 fetch-pack: isolate sigpipe in demuxer threadJeff King, Apr 19, 2016
  8. 5/5 t5504: drop sigpipe=ok from push testsJeff King, Apr 19, 2016
  9. Junio C HamanoApr 20, 2016
  10. Jeff KingApr 20, 2016

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.