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
Jeff King <peff@peff.net>
Date
Jul 17, 2008, 06:38 UTC
Message-ID
<20080717063856.GA10450@sigill.intra.peff.net>
In-Reply-To
<7vlk01komq.fsf@gitster.siamese.dyndns.org>
On Wed, Jul 16, 2008 at 11:31:41PM -0700, Junio C Hamano wrote:
Show 9 quoted lines
> > I started to fix the callsites that Stephan mentioned, but it really is
> > convenient to be able to 'return error("foo")' (or even return
> > func_that_calls_error(), and tracking down deep calls is time consuming
> > and error prone). So maybe we should just enhance the change from
> > 2488df84 and special case "-1" into "1"?
> 
> Didn't the patch to testsuite that triggered this thread talk about "small
> negative integer" not "-1"?  I suspect there might be other negative
> return values from cmd_foo(), although I haven't checked.

It did say that, but I never saw anything in the code except explicit "return -1" and "return error()". However, some of the diff code may end up with different values, as I didn't trace it all the way down. Stephan?

> Is it that somebody do not want 255 exit value, or anything that has 7th
> bit set?  2488df8 (builtin run_command: do not exit with -1., 2007-11-13)
> suggests otherwise at least for Windows runtime, so what we currently have
> that does extra truncation ourselves might be sufficient.

Johannes will have to answer that; however, the truncation there does leave the extra 7th bit. Maybe & 0x7f would be more appropriate?

-Peff
Previous: Junio C HamanoNext: Johannes Sixt
Message 12 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.