All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <junkio@cox.net>
To: SungHyun Nam <goweol@gmail.com>
Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	GIT <git@vger.kernel.org>
Subject: Re: GIT+CYGWIN annoying test failure
Date: Thu, 15 Feb 2007 17:26:36 -0800	[thread overview]
Message-ID: <7vwt2ic2pf.fsf@assigned-by-dhcp.cox.net> (raw)
In-Reply-To: <45D4F4FE.3010405@gmail.com> (SungHyun Nam's message of "Fri, 16 Feb 2007 09:04:14 +0900")

SungHyun Nam <goweol@gmail.com> writes:

>> On Thu, 15 Feb 2007, SungHyun Nam wrote:
>> 
>>>  check_result () {
>>> +    [ -r current ] && rm -f current
>>>      git-ls-files --stage | sed -e 's/ '"$_x40"' / X /' >current &&
>>>      diff -u expected current
>>>  }

I would have written:

	check_result () {
        	rm -f current &&
                git-ls-files --stage | ... &&
                diff -u expected current
	}

If the above still makes the tests pass for your environment,
that would be good.  I am not very happy about the lack of "&&"
after "rm -f current" in your patch.

It seems as if 'current' is sometimes writable and sometimes not,
and when the shell couldn't open it to redirect sed output the
whole test fails for you.  That does not sound like a sane,
reliable filesystem at all, and even if you worked around the
problem in that single shell function, we tend to use shell
redirection to create or overwrite files everywhere (both in
tests and in the real Porcelain scripts) so that means git is a
disaster waiting to happen on your system, which is not good.

What I am trying to get at is to find out what is causing the
problem first, before working it around.  Then, if we are lucky,
we may be able to add a notice in the INSTALL file that says "It
was reported that Filfre virus scanner makes shell redirect in
Cygwin occasionally fail, and both git itself and its testsuite
may not work as expected --- please do not use it", or something
like that.

"Filfre virus scanner" is totally made up, but I think you get
the point.

      reply	other threads:[~2007-02-16  1:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-24  2:18 GIT+CYGWIN annoying test failure SungHyun Nam
2007-01-24  9:53 ` Johannes Schindelin
2007-01-29  1:15   ` SungHyun Nam
2007-02-01 16:04     ` Johannes Schindelin
2007-02-02  0:10       ` SungHyun Nam
2007-02-15  0:55     ` SungHyun Nam
2007-02-15  1:37       ` Johannes Schindelin
2007-02-16  0:04         ` SungHyun Nam
2007-02-16  1:26           ` Junio C Hamano [this message]

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=7vwt2ic2pf.fsf@assigned-by-dhcp.cox.net \
    --to=junkio@cox.net \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=goweol@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.