Re: [PATCH 1/2] t/test-lib.sh: Let test_must_fail fail on signals only
- From
Stephan Beyer <s-beyer@gmx.net>
- Date
- Jul 16, 2008, 11:57 UTC
- Message-ID
- <20080716115732.GB25087@leksak.fem-net>
- In-Reply-To
- <20080716051829.GB4030@segfault.peff.net>
Hi,
Jeff King wrote:
Show 11 quoted lines
> On Sat, Jul 12, 2008 at 05:47:51PM +0200, Stephan Beyer wrote: > > > The test_must_fail function in test-lib.sh has been designed > > to distinguish segmentation faults from controlled errors. > > But in the current implementation this only works if a git > > command does not return a small negative value, like -1, -2 > > or -3. But some git commands do. > > This is probably a fine protective measure, and it looks like Junio has > already applied it. But shouldn't any git commands returning such values > be fixed?
I didn't want to change any error codes and I wouldn't say that the term "fix" is the right one here.
> Which commands return such bogus error codes?
Why bogus?
To answer your question, some are: git diff-files git diff-index git diff git merge-file
I think at least one test case failed "test_must_fail git merge-file ..." without that change.
Regards.
-- Stephan Beyer <s-beyer@gmx.net>, PGP 0x6EDDD207FCC5040F