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

Re: [PATCH] t1400: have fifo test clean after itself

From
Patrick Steinhardt <ps@pks.im>
Date
Jun 11, 2026, 12:41 UTC
Message-ID
<aiqs5Wq2Di-6yW0D@pks.im>
In-Reply-To
<xmqqo6hit6rn.fsf@gitster.g>
On Wed, Jun 10, 2026 at 02:39:08PM -0700, Junio C Hamano wrote:
Show 24 quoted lines
> 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
Previous: Junio C Hamano
Message 2 of 2 in “t1400: have fifo test clean after itself”
  1. t1400: have fifo test clean after itselfJunio C Hamano, Jun 10, 2026
  2. Patrick SteinhardtJun 11, 2026

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.