Thread (3 messages) flat view 3 messages, 2 authors, 2016-06-15

Re: git-cvsserver test failures (still)

From: Frank Lichtenheld <hidden>
Date: 2016-06-15 22:43:38

Hi.

Some investigations on this:

On Wed, Oct 03, 2007 at 03:50:18PM -0400, Brian Gernhardt wrote:
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 [off-list ref]
www: http://www.djpig.de/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help