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

[PATCH 1/7] t5516: drop ok=sigpipe from unreachable-want tests

From
Jeff King <peff@peff.net>
Date
Apr 13, 2019, 05:52 UTC
Message-ID
<20190413055217.GA19495@sigill.intra.peff.net>
In-Reply-To
<20190413055127.GA32340@sigill.intra.peff.net>

We annotated our test_must_fail calls in 8bf4becf0c (add "ok=sigpipe" to test_must_fail and use it to fix flaky tests, 2015-11-27) because the abrupt hangup of the server meant that we'd sometimes fail on read() and sometimes get SIGPIPE on write().

But since 143588949c (fetch: ignore SIGPIPE during network operation, 2019-03-03), we make sure that we end up with a real die(), and our tests no longer need to work around the race.

Signed-off-by: Jeff King <peff@peff.net>
---
This is actually the only user of ok=sigpipe, so we could drop the
feature. It might come in handy later, though.
 t/t5516-fetch-push.sh | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/t/t5516-fetch-push.sh b/t/t5516-fetch-push.sh
index 37e8e80893..fc3961ec22 100755
--- a/t/t5516-fetch-push.sh
+++ b/t/t5516-fetch-push.sh
@@ -1232,15 +1232,15 @@ do
 		mk_empty shallow &&
 		(
 			cd shallow &&
-			test_must_fail ok=sigpipe git fetch ../testrepo/.git $SHA1_3 &&
-			test_must_fail ok=sigpipe git fetch ../testrepo/.git $SHA1_1 &&
+			test_must_fail git fetch ../testrepo/.git $SHA1_3 &&
+			test_must_fail git fetch ../testrepo/.git $SHA1_1 &&
 			git --git-dir=../testrepo/.git config uploadpack.allowreachablesha1inwant true &&
 			git fetch ../testrepo/.git $SHA1_1 &&
 			git cat-file commit $SHA1_1 &&
 			test_must_fail git cat-file commit $SHA1_2 &&
 			git fetch ../testrepo/.git $SHA1_2 &&
 			git cat-file commit $SHA1_2 &&
-			test_must_fail ok=sigpipe git fetch ../testrepo/.git $SHA1_3
+			test_must_fail git fetch ../testrepo/.git $SHA1_3
 		)
 	'
 done
-- 
2.21.0.931.gd0bc72a411
Previous: Jeff KingNext: Jeff King
Message 2 of 9 in “some fetch reachability-error fixes”
  1. 0/7 some fetch reachability-error fixesJeff King, Apr 13, 2019
  2. 1/7 t5516: drop ok=sigpipe from unreachable-want testsJeff King, Apr 13, 2019
  3. 2/7 t5530: check protocol response for "not our ref"Jeff King, Apr 13, 2019
  4. 3/7 upload-pack: send ERR packet for non-tip objectsJeff King, Apr 13, 2019
  5. 4/7 pkt-line: prepare buffer before handling ERR packetsJeff King, Apr 13, 2019
  6. 5/7 fetch: use free_refs()Jeff King, Apr 13, 2019
  7. 6/7 remote.c: make singular free_ref() publicJeff King, Apr 13, 2019
  8. 7/7 fetch: do not consider peeled tags as advertised tipsJeff King, Apr 13, 2019
  9. Jonathan TanApr 15, 2019

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.