Bug#825018: perl: FTBFS on hurd-i386: hardcoded E2BIG errno value

Dominic Hargreaves dom at earth.li
Sat May 28 15:50:41 UTC 2016


On Sun, May 22, 2016 at 01:56:53PM +0000, Samuel Thibault wrote:
> The following testsuite failure on hurd-i386:
> 
>     dist/constant/t/constant ...................................... #   Failed test at t/constant.t line 99.
>     #     '1'
>     #         >
>     #     '6'
>     # Looks like you failed 1 test of 109.
>     FAILED at test 31
> 
> is actually a bug in the test:
> 
>     use constant E2BIG => $! = 7;
>     cmp_ok E2BIG, '==', 7;
>     # This is something like "Arg list too long", but the actual message
>     # text may vary, so we can't test much better than this.
>     cmp_ok length(E2BIG), '>', 6;
> 
> This hardcodes that E2BIG is supposed to be 7, but nothing asserts that
> in C and POSIX, and hurd-i386 happens to be using other values, and thus
> the test fails, but that's not a bug in hurd-i386.

Hmm, this test has remained unchanged for a long time, and doesn't fail
for me on exodar:

dom at exodar:~/perl$ ./perl -I. -T -MTestInit dist/constant/t/constant.t |grep ^not
not ok 103 - list constant has constant elements (1) # TODO disabled for now; breaks CPAN; see perl #119045
not ok 104 - list constant has constant elements (2) # TODO disabled for now; breaks CPAN; see perl #119045
dom at exodar:~/perl$ 

Admittedly, the test is flawed; I get:

dom at exodar:~$ cat test.pl 
#!/usr/bin/perl

$! = 7;
print "errno 7 stringifies to '$!'\n";
dom at exodar:~$ ./test.pl 
errno 7 stringifies to '(os/kern) not receiver'

but because that error message is also long enough, the test passes.
Can you shed any more light about how to reproduce this test failure?

Thanks,
Dominic.




More information about the Perl-maintainers mailing list