* [PATCH] t1400: have fifo test clean after itself
@ 2026-06-10 21:39 Junio C Hamano
2026-06-11 12:41 ` Patrick Steinhardt
0 siblings, 1 reply; 2+ messages in thread
From: Junio C Hamano @ 2026-06-10 21:39 UTC (permalink / raw)
To: git
One test in this script creates a pair of FIFOs, "in" and "out",
that are named so generically that later tests may be tempted to use
them. By the time those later tests run a command with its output
redirected to the file (e.g., "git foobar >out"), however, nobody is
reading from the lingering FIFO, and the test gets blocked forever.
Clean them up when the test finishes.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
t/t1400-update-ref.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
index db7f5444da..477af544bc 100755
--- a/t/t1400-update-ref.sh
+++ b/t/t1400-update-ref.sh
@@ -1610,6 +1610,7 @@ test_expect_success 'transaction cannot restart ongoing transaction' '
'
test_expect_success PIPE 'transaction flushes status updates' '
+ test_when_finished "rm -f in out" &&
mkfifo in out &&
(git update-ref --stdin <in >out &) &&
--
2.54.0-615-g639a4a7340
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] t1400: have fifo test clean after itself
2026-06-10 21:39 [PATCH] t1400: have fifo test clean after itself Junio C Hamano
@ 2026-06-11 12:41 ` Patrick Steinhardt
0 siblings, 0 replies; 2+ messages in thread
From: Patrick Steinhardt @ 2026-06-11 12:41 UTC (permalink / raw)
To: Junio C Hamano; +Cc: git
On Wed, Jun 10, 2026 at 02:39:08PM -0700, Junio C Hamano wrote:
> One test in this script creates a pair of FIFOs, "in" and "out",
> that are named so generically that later tests may be tempted to use
> them. By the time those later tests run a command with its output
> redirected to the file (e.g., "git foobar >out"), however, nobody is
> reading from the lingering FIFO, and the test gets blocked forever.
>
> Clean them up when the test finishes.
>
> Signed-off-by: Junio C Hamano <gitster@pobox.com>
> ---
> t/t1400-update-ref.sh | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/t/t1400-update-ref.sh b/t/t1400-update-ref.sh
> index db7f5444da..477af544bc 100755
> --- a/t/t1400-update-ref.sh
> +++ b/t/t1400-update-ref.sh
> @@ -1610,6 +1610,7 @@ test_expect_success 'transaction cannot restart ongoing transaction' '
> '
>
> test_expect_success PIPE 'transaction flushes status updates' '
> + test_when_finished "rm -f in out" &&
> mkfifo in out &&
> (git update-ref --stdin <in >out &) &&
I'd expect that such a test that tried to reuse the sockets would
probably break quite obviously, but I guess you never really know. In
any case, it doesn't hurt to clean up after the test.
Thanks!
Patrick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-11 12:41 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-10 21:39 [PATCH] t1400: have fifo test clean after itself Junio C Hamano
2026-06-11 12:41 ` Patrick Steinhardt
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox