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

Re: git-cvsserver test failures (still)

From
Frank Lichtenheld <frank@lichtenheld.de>
Date
Oct 4, 2007, 01:19 UTC
Message-ID
<20071004011954.GK18024@planck.djpig.de>
In-Reply-To
<A78B5F62-4FCC-4650-9B0D-0F64FEDB8423@silverinsanity.com>
Hi.
Some investigations on this:
On Wed, Oct 03, 2007 at 03:50:18PM -0400, Brian Gernhardt wrote:
Show 11 quoted lines
> This appears to be from git-cvsserver.perl:148-9:
> 
>     req_Root('root', $line) # reuse Root
>        or die "E Invalid root $line \n";
> 
> This fails the test suite because die() exits with code 255 (checked  
> with "perl -e 'die'; echo $?"), which is outside what  
> test_expect_failure accepts (see t/test-lib.sh:179).
> 
> My questions become:
> 1) Why hasn't this hit anyone else?
die doesn't always quit with 255:

"exits with the current value of $! (errno). If $! is 0, exits with the value of "($? >> 8)" (backtick ‘command‘ status). If "($? >> 8)" is 0, exits with 255"

On my system $! is 9 for these cases and so it exits with exit code 9.
> 2) Is this where these tests are supposed to fail?
yes, IIRC
> 3) If it is, should the code be using print and exit 1 instead of die?
I think that would be the best solution, yes.
> 4) If not, should the test be altered to end with "|| false" or  
> similar so the test passes?
Gruesse,
-- 
Frank Lichtenheld <frank@lichtenheld.de>
www: http://www.djpig.de/
Previous: Brian GernhardtNext: Brian Gernhardt
Message 2 of 3 in “git-cvsserver test failures (still)”
  1. Brian GernhardtOct 3, 2007
  2. Frank LichtenheldOct 4, 2007
  3. Use exit 1 instead of die when req_Root fails.Brian Gernhardt, Oct 4, 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.