git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Is t5601 flaky for anybody else?
@ 2017-10-17  5:04 Junio C Hamano
  2017-10-17 17:10 ` Brandon Williams
  0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2017-10-17  5:04 UTC (permalink / raw)
  To: git

I seem to be seeing sporadic errors with this test, and today I got
annoyed enough to do

	cd t && while sh t5601-clone.sh -i -v; do :; done

I saw an error from "cp" saying "plink.exe - text file busy" or
something like that at around test #45; here is an workaround that
seems to work (the above loop is spinning without problem for
several minutes now).

 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

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: Is t5601 flaky for anybody else?
  2017-10-17  5:04 Is t5601 flaky for anybody else? Junio C Hamano
@ 2017-10-17 17:10 ` Brandon Williams
  2017-10-17 21:02   ` Re* " Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Brandon Williams @ 2017-10-17 17:10 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git

On 10/17, Junio C Hamano wrote:
> I seem to be seeing sporadic errors with this test, and today I got
> annoyed enough to do
> 
> 	cd t && while sh t5601-clone.sh -i -v; do :; done
> 
> I saw an error from "cp" saying "plink.exe - text file busy" or
> something like that at around test #45; here is an workaround that
> seems to work (the above loop is spinning without problem for
> several minutes now).

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?

> 
>  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

-- 
Brandon Williams

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re* Is t5601 flaky for anybody else?
  2017-10-17 17:10 ` Brandon Williams
@ 2017-10-17 21:02   ` Junio C Hamano
  2017-10-17 21:08     ` Jeff King
  0 siblings, 1 reply; 5+ messages in thread
From: Junio C Hamano @ 2017-10-17 21:02 UTC (permalink / raw)
  To: Brandon Williams; +Cc: git

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


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: Re* Is t5601 flaky for anybody else?
  2017-10-17 21:02   ` Re* " Junio C Hamano
@ 2017-10-17 21:08     ` Jeff King
  2017-10-22  9:36       ` Kaartic Sivaraam
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff King @ 2017-10-17 21:08 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: Brandon Williams, git

On Wed, Oct 18, 2017 at 06:02:59AM +0900, Junio C Hamano wrote:

> 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'.

FWIW, I can't replicate the problem on either "master" or "pu". I wonder
why.

-Peff

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Re* Is t5601 flaky for anybody else?
  2017-10-17 21:08     ` Jeff King
@ 2017-10-22  9:36       ` Kaartic Sivaraam
  0 siblings, 0 replies; 5+ messages in thread
From: Kaartic Sivaraam @ 2017-10-22  9:36 UTC (permalink / raw)
  To: Jeff King, Junio C Hamano; +Cc: Brandon Williams, git

On Tue, 2017-10-17 at 17:08 -0400, Jeff King wrote:
> On Wed, Oct 18, 2017 at 06:02:59AM +0900, Junio C Hamano wrote:
> 
> FWIW, I can't replicate the problem on either "master" or "pu". I wonder
> why.
> 

Neither can I. I tried running t5601 on "master" and on "pu" after
reverting the patch found in this thread. Both ran successfully without
issues.

-- 
Kaartic

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-10-22  9:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-17  5:04 Is t5601 flaky for anybody else? Junio C Hamano
2017-10-17 17:10 ` Brandon Williams
2017-10-17 21:02   ` Re* " Junio C Hamano
2017-10-17 21:08     ` Jeff King
2017-10-22  9:36       ` Kaartic Sivaraam

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).