All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Pete Wyckoff <pw@padd.com>
Cc: Stefano Lattarini <stefano.lattarini@gmail.com>,
	Sverre Rabbelier <srabbelier@gmail.com>,
	git@vger.kernel.org, Clemens Buchacher <drizzd@aon.at>
Subject: Re: [PATCH] git-remote-testgit: fix race when spawning fast-import
Date: Sat, 21 Apr 2012 21:50:58 -0700	[thread overview]
Message-ID: <xmqqty0cxtcd.fsf@junio.mtv.corp.google.com> (raw)
In-Reply-To: <20120421234555.GA11808@padd.com> (Pete Wyckoff's message of "Sat, 21 Apr 2012 19:45:55 -0400")

Pete Wyckoff <pw@padd.com> writes:

> Fix this by setting stdin to unbuffered.
>
> Signed-off-by: Pete Wyckoff <pw@padd.com>
> ---
>
> This is the one that might be suitable for upstream.  It fixes
> the problem with this particular remote helper.
>
>  git-remote-testgit.py     |    7 +++++++
>  t/t5800-remote-helpers.sh |   11 +++++++++++
>  2 files changed, 18 insertions(+)
>
> diff --git a/git-remote-testgit.py b/git-remote-testgit.py
> index 3dc4851..5f3ebd2 100644
> --- a/git-remote-testgit.py
> +++ b/git-remote-testgit.py
> @@ -22,6 +22,7 @@ except ImportError:
>      _digest = sha.new
>  import sys
>  import os
> +import time
>  sys.path.insert(0, os.getenv("GITPYTHONLIB","."))
>  
>  from git_remote_helpers.util import die, debug, warn
> @@ -204,6 +205,11 @@ def read_one_line(repo):
>      """Reads and processes one command.
>      """
>  
> +    sleepy = os.environ.get("GIT_REMOTE_TESTGIT_SLEEPY")
> +    if sleepy:
> +        debug("Sleeping %d sec before readline" % int(sleepy))
> +        time.sleep(int(sleepy))
> +

If I understand your explanation correctly, the primary purpose of the
remote-testgit is to test the parts of the system that talk to remote
helpers that are used in production in the t/t5800 script, and this
"sleep" is to make it easier to trigger the particular bug you fixed 
in *this* script.  The bug is _not_ in the parts of the system being
tested, but is in this test scaffolding.

If that is the case, then it should not be enabled unconditionally.
When somebody wants to see if remote-testgit was broken again (perhaps
after observing occassional hangs), the environment should be set when
running the test, but not in t5800.

  parent reply	other threads:[~2012-04-22  4:51 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-14  9:01 master: t5800-remote-helpers.sh hangs on test "pulling from remote remote" Stefano Lattarini
2012-04-14 20:14 ` Clemens Buchacher
2012-04-15  0:00   ` Stefano Lattarini
2012-04-15  1:11     ` Clemens Buchacher
2012-04-15  8:08       ` Stefano Lattarini
2012-04-15 10:59         ` Clemens Buchacher
2012-04-15 11:18           ` Stefano Lattarini
2012-04-15 11:45             ` Clemens Buchacher
2012-04-15 11:58               ` Stefano Lattarini
2012-04-15 12:09                 ` Clemens Buchacher
2012-04-15 13:19                   ` Stefano Lattarini
2012-04-15 12:51                 ` Clemens Buchacher
2012-04-17  1:46                   ` Sverre Rabbelier
2012-04-19 23:34                   ` Pete Wyckoff
     [not found]                     ` <4F9145A1.6020201@gmail.com>
2012-04-21 20:15                       ` Pete Wyckoff
2012-04-21 23:35                         ` Clemens Buchacher
2012-04-22  2:17                           ` Pete Wyckoff
2012-04-21 23:45                         ` [PATCH] git-remote-testgit: fix race when spawning fast-import Pete Wyckoff
2012-04-21 23:42                           ` Clemens Buchacher
2012-04-22  2:16                             ` Pete Wyckoff
2012-04-22  9:49                               ` Clemens Buchacher
2012-04-22  4:50                           ` Junio C Hamano [this message]
2012-04-22 20:30                             ` [PATCHv2] " Pete Wyckoff
2012-04-23  2:40                               ` Junio C Hamano
2012-04-23 11:35                                 ` Pete Wyckoff
2012-04-15 11:12       ` master: t5800-remote-helpers.sh hangs on test "pulling from remote remote" Stefano Lattarini

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=xmqqty0cxtcd.fsf@junio.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=drizzd@aon.at \
    --cc=git@vger.kernel.org \
    --cc=pw@padd.com \
    --cc=srabbelier@gmail.com \
    --cc=stefano.lattarini@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.