Re: t7800-difftool.sh failure on pu
- From
Tim Henigan <tim.henigan@gmail.com>
- Date
- Apr 2, 2012, 17:09 UTC
- Message-ID
- <CAFouethd9yEVNhX3_m4B3akxTmPh2RS4-NUkakYk3fcjfTB7YA@mail.gmail.com>
- In-Reply-To
- <4F74A604.3040402@ramsay1.demon.co.uk>
Hi Ramsay - thank you for running the tests and trying this out.
On Thu, Mar 29, 2012 at 2:12 PM, Ramsay Jones <ramsay@ramsay1.demon.co.uk> wrote:
> > With the current pu branch, I have t7800.3 (difftool ignores bad --tool values) > failing on Linux (I haven't tried cygwin or mingw yet). The failure is caused > by the test for the value of the exit code; for me the exit code is 9 not 1.
This is interesting. On my Ubuntu box, I am able to run all of t7800 without error. This has been my primary development platform and the tests have consistently passed for me on that system.
I have had trouble getting the test suite to run on msysgit. However, I just tried the simple test sequence that you demonstrated and found that I get the same failure on that platform (i.e. "9 Bad file descriptor"). So it appears that Carp is broken on some platforms.
> I have investigated, briefly, and found *two* alternatives for a fix. ;-)
>
> The first option is to (effectively) revert commit 0440ed72 ("difftool: replace
> system call with Git::command_noisy", 22-03-2012), like so:Thanks again for spending the time to dig into the problem. Based on feedback from Junio and David in later emails, I plan to revert commit 0440ed72.
Show 14 quoted lines
> The second option is a bit of a mystery, since I don't see why it is necessary > or why it works! :-P > > First take a look at the following: > > $ perl -e 'print $!+0, " $!\n";' > 0 > $ echo $? > 0 > > $ perl -e 'use Carp qw(croak); print $!+0, " $!\n";' > 9 Bad file descriptor > $ echo $? > 0
I agree that this is mysterious. On my Ubuntu box, this Perl one-liner prints and exits with 0 for me (i.e. no bad file descriptor error). However, I was able to replicate the failure on msysgit. This makes me wonder if other users of Git.pm have had the same problem. The primary user appears to be 'git-svn.perl' and its related tests. A quick review of those files did not show any mention of problems with Carp. Perhaps they simply do not check the exact exit code on failure?