{"thread":{"id":"65788","subject":"[PATCH] t1400: have fifo test clean after itself","startedAt":"2026-06-10T21:39:10Z","lastAt":"2026-06-11T12:41:19Z","messageCount":2,"participants":["Junio C Hamano","Patrick Steinhardt"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"545203","messageId":"xmqqo6hit6rn.fsf@gitster.g","threadId":"65788","inReplyTo":null,"subject":"[PATCH] t1400: have fifo test clean after itself","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-06-10T21:39:08Z","receivedAt":"2026-06-10T21:39:10Z","isPatch":true,"body":"One test in this script creates a pair of FIFOs, \"in\" and \"out\",\nthat are named so generically that later tests may be tempted to use\nthem.  By the time those later tests run a command with its output\nredirected to the file (e.g., \"git foobar >out\"), however, nobody is\nreading from the lingering FIFO, and the test gets blocked forever.\n\nClean them up when the test finishes.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/t1400-update-ref.sh | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\nindex db7f5444da..477af544bc 100755\n--- a/t/t1400-update-ref.sh\n+++ b/t/t1400-update-ref.sh\n@@ -1610,6 +1610,7 @@ test_expect_success 'transaction cannot restart ongoing transaction' '\n '\n \n test_expect_success PIPE 'transaction flushes status updates' '\n+\ttest_when_finished \"rm -f in out\" &&\n \tmkfifo in out &&\n \t(git update-ref --stdin <in >out &) &&\n \n-- \n2.54.0-615-g639a4a7340\n\n"},{"id":"545265","messageId":"aiqs5Wq2Di-6yW0D@pks.im","threadId":"65788","inReplyTo":"xmqqo6hit6rn.fsf@gitster.g","subject":"Re: [PATCH] t1400: have fifo test clean after itself","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-06-11T12:41:09Z","receivedAt":"2026-06-11T12:41:19Z","isPatch":true,"body":"On Wed, Jun 10, 2026 at 02:39:08PM -0700, Junio C Hamano wrote:\n> One test in this script creates a pair of FIFOs, \"in\" and \"out\",\n> that are named so generically that later tests may be tempted to use\n> them.  By the time those later tests run a command with its output\n> redirected to the file (e.g., \"git foobar >out\"), however, nobody is\n> reading from the lingering FIFO, and the test gets blocked forever.\n> \n> Clean them up when the test finishes.\n> \n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>  t/t1400-update-ref.sh | 1 +\n>  1 file changed, 1 insertion(+)\n> \n> diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh\n> index db7f5444da..477af544bc 100755\n> --- a/t/t1400-update-ref.sh\n> +++ b/t/t1400-update-ref.sh\n> @@ -1610,6 +1610,7 @@ test_expect_success 'transaction cannot restart ongoing transaction' '\n>  '\n>  \n>  test_expect_success PIPE 'transaction flushes status updates' '\n> +\ttest_when_finished \"rm -f in out\" &&\n>  \tmkfifo in out &&\n>  \t(git update-ref --stdin <in >out &) &&\n\nI'd expect that such a test that tried to reuse the sockets would\nprobably break quite obviously, but I guess you never really know. In\nany case, it doesn't hurt to clean up after the test.\n\nThanks!\n\nPatrick\n"}]}