Git development
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: git@vger.kernel.org
Subject: [PATCH] t1400: have fifo test clean after itself
Date: Wed, 10 Jun 2026 14:39:08 -0700	[thread overview]
Message-ID: <xmqqo6hit6rn.fsf@gitster.g> (raw)

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


                 reply	other threads:[~2026-06-10 21:39 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqo6hit6rn.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox