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

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
Previous: Junio C Hamano
Message 15 of 15 in “t/test-lib.sh: Let test_must_fail fail on signals only”
  1. 1/2 t/test-lib.sh: Let test_must_fail fail on signals onlyStephan Beyer, Jul 12, 2008
  2. 2/2 t/: Use "test_must_fail git" instead of "! git"Stephan Beyer, Jul 12, 2008
  3. Jakub NarebskiJul 12, 2008
  4. Stephan BeyerJul 12, 2008
  5. t9001: Use "test_must_fail git" instead of "! git"Stephan Beyer, Jul 12, 2008
  6. Jeff KingJul 16, 2008
  7. Junio C HamanoJul 16, 2008
  8. Jeff KingJul 17, 2008
  9. Junio C HamanoJul 17, 2008
  10. Jeff KingJul 17, 2008
  11. Junio C HamanoJul 17, 2008
  12. Jeff KingJul 17, 2008
  13. Johannes SixtJul 17, 2008
  14. Junio C HamanoJul 17, 2008
  15. Stephan BeyerJul 16, 2008

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.