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

Re: GIT+CYGWIN annoying test failure

From
Junio C Hamano <junkio@cox.net>
Date
Feb 16, 2007, 01:26 UTC
Message-ID
<7vwt2ic2pf.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<45D4F4FE.3010405@gmail.com>
SungHyun Nam <goweol@gmail.com> writes:
Show 7 quoted lines
>> 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.

Previous: SungHyun Nam
Message 9 of 9 in “GIT+CYGWIN annoying test failure”
  1. SungHyun NamJan 24, 2007
  2. Johannes SchindelinJan 24, 2007
  3. SungHyun NamJan 29, 2007
  4. Johannes SchindelinFeb 1, 2007
  5. SungHyun NamFeb 2, 2007
  6. SungHyun NamFeb 15, 2007
  7. Johannes SchindelinFeb 15, 2007
  8. SungHyun NamFeb 16, 2007
  9. Junio C HamanoFeb 16, 2007

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.