Skip Menu |

This queue is for tickets about the Test-Harness CPAN distribution.

Report information
The Basics
Id: 31767
Status: resolved
Priority: 0/
Queue: Test-Harness

People
Owner: andy [...] hexten.net
Requestors: kwilliams [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 3.05
Fixed in: (no value)



Subject: Failure in t/taint.t
Getting the following test failure on a Linux box. I think the problem is that the tests assume that prepending 'wibble' to $ENV{PERL5LIB} will simply prepend 'wibble' to @INC. This is not true, as shown by the following test code: % PERL5LIB=wibble perl -le 'print for @INC' wibble/5.8.3/i386-linux-thread-multi wibble/5.8.3 wibble/i386-linux-thread-multi wibble/5.8.2 wibble/5.8.1 wibble/5.8.0 wibble /usr/lib/perl5/5.8.3/i386-linux-thread-multi /usr/lib/perl5/5.8.3 /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.3 /usr/lib/perl5/site_perl/5.8.2 /usr/lib/perl5/site_perl/5.8.1 /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.3 /usr/lib/perl5/vendor_perl/5.8.2 /usr/lib/perl5/vendor_perl/5.8.1 /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl . The actual failure is below. -Ken % Build test --test_files t/taint.t t/taint...... # Failed test at t/temp_test.tmp line 6. # got: 'wibble/5.8.3/i386-linux-thread-multi' # expected: 'wibble' # t/lib # wibble/5.8.3/i386-linux-thread-multi # wibble/5.8.3 # wibble/i386-linux-thread-multi # wibble/5.8.2 # wibble/5.8.1 # wibble/5.8.0 # wibble # blib/lib/5.8.3/i386-linux-thread-multi # blib/lib/5.8.3 # blib/lib/i386-linux-thread-multi # blib/lib/5.8.2 # blib/lib/5.8.1 # blib/lib/5.8.0 # blib/lib # /usr/lib/perl5/5.8.3/i386-linux-thread-multi # /usr/lib/perl5/5.8.3 # /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi # /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi # /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi # /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi # /usr/lib/perl5/site_perl/5.8.3 # /usr/lib/perl5/site_perl/5.8.2 # /usr/lib/perl5/site_perl/5.8.1 # /usr/lib/perl5/site_perl/5.8.0 # /usr/lib/perl5/site_perl # /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi # /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi # /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi # /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi # /usr/lib/perl5/vendor_perl/5.8.3 # /usr/lib/perl5/vendor_perl/5.8.2 # /usr/lib/perl5/vendor_perl/5.8.1 # /usr/lib/perl5/vendor_perl/5.8.0 # /usr/lib/perl5/vendor_perl # Looks like you failed 1 test of 1. t/taint......1/3 # Failed test at t/taint.t line 25. # Failed test at t/temp_test.tmp line 6. # got: 'wibble/5.8.3/i386-linux-thread-multi' # expected: 'wibble' # t/lib # wibble/5.8.3/i386-linux-thread-multi # wibble/5.8.3 # wibble/i386-linux-thread-multi # wibble/5.8.2 # wibble/5.8.1 # wibble/5.8.0 # wibble # blib/lib/5.8.3/i386-linux-thread-multi # blib/lib/5.8.3 # blib/lib/i386-linux-thread-multi # blib/lib/5.8.2 # blib/lib/5.8.1 # blib/lib/5.8.0 # blib/lib # /usr/lib/perl5/5.8.3/i386-linux-thread-multi # /usr/lib/perl5/5.8.3 # /usr/lib/perl5/site_perl/5.8.3/i386-linux-thread-multi # /usr/lib/perl5/site_perl/5.8.2/i386-linux-thread-multi # /usr/lib/perl5/site_perl/5.8.1/i386-linux-thread-multi # /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi # /usr/lib/perl5/site_perl/5.8.3 # /usr/lib/perl5/site_perl/5.8.2 # /usr/lib/perl5/site_perl/5.8.1 # /usr/lib/perl5/site_perl/5.8.0 # /usr/lib/perl5/site_perl # /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi # /usr/lib/perl5/vendor_perl/5.8.2/i386-linux-thread-multi # /usr/lib/perl5/vendor_perl/5.8.1/i386-linux-thread-multi # /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi # /usr/lib/perl5/vendor_perl/5.8.3 # /usr/lib/perl5/vendor_perl/5.8.2 # /usr/lib/perl5/vendor_perl/5.8.1 # /usr/lib/perl5/vendor_perl/5.8.0 # /usr/lib/perl5/vendor_perl # Looks like you failed 1 test of 1. # Failed test at t/taint.t line 25. # Looks like you failed 2 tests of 3. t/taint...... Dubious, test returned 2 (wstat 512, 0x200) Failed 2/3 subtests Test Summary Report ------------------- t/taint.t (Wstat: 512 Tests: 3 Failed: 2) Failed test number(s): 1-2 Non-zero exit status: 2 Files=1, Tests=3, 1 wallclock secs ( 0.01 usr 0.00 sys + 0.22 cusr 0.04 csys = 0.27 CPU) Result: FAIL
And here's a patch: --- t/taint.t~ 2007-11-28 15:33:59.000000000 -0600 +++ t/taint.t 2007-12-20 14:53:01.000000000 -0600 @@ -36,7 +36,7 @@ use lib 't/lib'; use Test::More tests => 1; -is( $INC[1], 'wibble' ) or diag join "\n", @INC; +ok grep(/^wibble$/, @INC) or diag join "\n", @INC; END } @@ -51,7 +51,7 @@ use lib 't/lib'; use Test::More tests => 1; -is( $INC[1], 'wibble' ) or diag join "\n", @INC; +ok grep(/^wibble$/, @INC) or diag join "\n", @INC; END }
Thanks Ken. Amusingly I've just made the *exact* same change myself to make t/taint.t work in core :)