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

Re* Is t5601 flaky for anybody else?

From
Junio C Hamano <gitster@pobox.com>
Date
Oct 17, 2017, 21:02 UTC
Message-ID
<xmqqshehmqrg.fsf_-_@gitster.mtv.corp.google.com>
In-Reply-To
<20171017171046.GA48544@google.com>
Brandon Williams <bmwill@google.com> writes:
> I haven't noticed any issues myself but maybe this has something to do
> with my changes to this test in the 'bw/protocol-v1' topic?

As I've seen this on 'master', too, I suspect the topic has nothing to do with it.

Here is what I have on 'pu'.
-- >8 --
From: Junio C Hamano <gitster@pobox.com>
Date: Tue, 17 Oct 2017 14:04:43 +0900
Subject: [PATCH] t5601: rm the target file of cp that could still be executing

"while sh t5601-clone.sh; do :; done" seems to fail sporadically at around test #45 where fake-ssh wrapper is copied create plink.exe, with an error message that says the "text is busy".

I have a mild suspicion that the root cause of the bug is that the fake SSH process from the previous test is still running by the time the next test wants to replace it with a new binary, but in the meantime, removing the target that could still be executing before copying something else over seems to work it around.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 t/t5601-clone.sh | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
index 9c56f771b6..50e40abb11 100755
--- a/t/t5601-clone.sh
+++ b/t/t5601-clone.sh
@@ -308,6 +308,7 @@ test_expect_success 'clone checking out a tag' '
 
 setup_ssh_wrapper () {
 	test_expect_success 'setup ssh wrapper' '
+		rm -f "$TRASH_DIRECTORY/ssh-wrapper$X" &&
 		cp "$GIT_BUILD_DIR/t/helper/test-fake-ssh$X" \
 			"$TRASH_DIRECTORY/ssh-wrapper$X" &&
 		GIT_SSH="$TRASH_DIRECTORY/ssh-wrapper$X" &&
@@ -318,6 +319,7 @@ setup_ssh_wrapper () {
 }
 
 copy_ssh_wrapper_as () {
+	rm -f "${1%$X}$X" &&
 	cp "$TRASH_DIRECTORY/ssh-wrapper$X" "${1%$X}$X" &&
 	GIT_SSH="${1%$X}$X" &&
 	export GIT_SSH
-- 
2.15.0-rc1-178-ge1264d9eb8
Previous: Brandon WilliamsNext: Jeff King
Message 3 of 5 in “Is t5601 flaky for anybody else?”
  1. Junio C HamanoOct 17, 2017
  2. Brandon WilliamsOct 17, 2017
  3. Re* Is t5601 flaky for anybody else?Junio C Hamano, Oct 17, 2017
  4. Jeff KingOct 17, 2017
  5. Kaartic SivaraamOct 22, 2017

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.