Bug#868738: git FTBFS on several architectures: not ok 134 - --dump-aliases must be used alone

2017-07-18 Thread Jonathan Nieder
Hi,

Adrian Bunk wrote:

> https://buildd.debian.org/status/package.php?p=git=sid
>
> expecting success: 
>   test_must_fail git send-email --dump-aliases --to=jan...@example.com -1 
> refs/heads/accounting
>
> --dump-aliases incompatible with other options
> test_must_fail: command not found: git send-email --dump-aliases 
> --to=jan...@example.com -1 refs/heads/accounting
> not ok 134 - --dump-aliases must be used alone

Thanks for reporting.  The relevant code is

die __("--dump-aliases incompatible with other options\n")
if !$help and $dump_aliases and @ARGV;

test_must_fail prints the "command not found" message if and only if
the status code was 127.  I would have expected it to be 1 or 128
here.

"man perlfunc" says

If the exception is outside of all enclosing "eval"s, then
the uncaught exception prints LIST to "STDERR" and exits with a
non-zero value.  If you need to exit the process with a specific
exit code, see "exit".

That doesn't tell me what the status code will be.  Peeking at the source,
I find

int exitstatus;
if (errno & 255)
STATUS_UNIX_SET(errno);
else {
exitstatus = STATUS_UNIX >> 8;
if (exitstatus & 255)
STATUS_UNIX_SET(exitstatus);
else
STATUS_UNIX_SET(255);
}

which seems risky (there are many functions that could set errno, so
this is prone to spooky action at a distance if any caller forgets to
set it explicitly).  Looking for errno values that could be 127 in
glibc and linux using "git grep --cached -e '#.*define.*E.*127'", I
find

 linux:arch/alpha/include/uapi/asm/errno.h:#define ERESTART127
 linux:arch/mips/include/uapi/asm/errno.h:#define ENETDOWN 127
 linux:arch/sparc/include/uapi/asm/errno.h:#define ECANCELED   127
 linux:include/uapi/asm-generic/errno.h:#defineEKEYEXPIRED 127

so that doesn't look likely to be the cause.

Next step is to ssh into porterboxes and get the output of

perl -e 'die "testing"'; echo $?"



Bug#868738: git FTBFS on several architectures: not ok 134 - --dump-aliases must be used alone

2017-07-18 Thread Adrian Bunk
Source: git
Version: 1:2.13.3-1
Severity: serious

https://buildd.debian.org/status/package.php?p=git=sid

...
expecting success: 
test_must_fail git send-email --dump-aliases --to=jan...@example.com -1 
refs/heads/accounting

--dump-aliases incompatible with other options
test_must_fail: command not found: git send-email --dump-aliases 
--to=jan...@example.com -1 refs/heads/accounting
not ok 134 - --dump-aliases must be used alone
#   
#   test_must_fail git send-email --dump-aliases 
--to=jan...@example.com -1 refs/heads/accounting
#   
...
# failed 1 among 149 test(s)
1..149
Makefile:49: recipe for target 't9001-send-email.sh' failed
make[4]: *** [t9001-send-email.sh] Error 1