Skip Menu |

This queue is for tickets about the Find-Lib CPAN distribution.

Report information
The Basics
Id: 69019
Status: patched
Priority: 0/
Queue: Find-Lib

People
Owner: Nobody in particular
Requestors: jquelin [...] cpan.org
Cc:
AdminCc:

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



Subject: t/moretests/04-symlinks.t fails (linux platform)
$ make test PERL_DL_NONLAZY=1 /usr/bin/perl5.14.1 "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/moretests/*t t/00-compile.t .................. ok t/01-basic.t .................... ok t/02-use.t ...................... ok t/03-missinginc.t ............... ok t/06-empty.t .................... ok t/07-libs.t ..................... ok t/08-dupe-slashes.t ............. ok t/moretests/01-relative.t ....... ok # ERROR was: The script/base dir cannot be found at t/moretests/02-dollar0-begin.t line 9 t/moretests/02-dollar0-begin.t .. ok t/moretests/02-dollar0.t ........ ok t/moretests/03-chdir-begin.t .... ok t/moretests/03-chdir.t .......... ok t/moretests/03-pwd-begin.t ...... ok Can't locate MyLibNoTest.pm in @INC (@INC contains: /home/jquelin/rpm/cauldron/perl-Find-Lib/BUILD/Find-Lib-1.02/blib/lib /home/jquelin/rpm/cauldron/perl-Find-Lib/BUILD/Find-Lib-1.02/blib/arch /usr/lib/perl5/site_perl/5.14.1/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.14.1 /usr/lib/perl5/vendor_perl/5.14.1/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.14.1 /usr/lib/perl5/5.14.1/x86_64-linux-thread-multi /usr/lib/perl5/5.14.1 /usr/lib/perl5/site_perl/5.14.0 /usr/lib/perl5/site_perl/5.14.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.12.3 /usr/lib/perl5/site_perl/5.12.2 /usr/lib/perl5/site_perl/5.12.1 /usr/lib/perl5/site_perl/5.12.0 /usr/lib/perl5/site_perl/5.10.1 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.14.0 /usr/lib/perl5/vendor_perl/5.14.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.12.3 /usr/lib/perl5/vendor_perl/5.12.2 /usr/lib/perl5/vendor_perl/5.12.1 /usr/lib/perl5/vendor_perl/5.12.0 /usr/lib/perl5/vendor_perl/5.10.1 /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl .) at symlink_test.pl line 6. BEGIN failed--compilation aborted at symlink_test.pl line 6. # Failed test 'script succeeded, meaning that compilation with symlink worked' # at t/moretests/04-symlinks.t line 51. # PWD=/home/jquelin/rpm/cauldron/perl-Find-Lib/BUILD/Find-Lib-1.02/symlink_23131, script=symlink_test.pl Can't locate MyLibNoTest.pm in @INC (@INC contains: /home/jquelin/rpm/cauldron/perl-Find-Lib/BUILD/Find-Lib-1.02/blib/lib /home/jquelin/rpm/cauldron/perl-Find-Lib/BUILD/Find-Lib-1.02/blib/arch /usr/lib/perl5/site_perl/5.14.1/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.14.1 /usr/lib/perl5/vendor_perl/5.14.1/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.14.1 /usr/lib/perl5/5.14.1/x86_64-linux-thread-multi /usr/lib/perl5/5.14.1 /usr/lib/perl5/site_perl/5.14.0 /usr/lib/perl5/site_perl/5.14.0/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.12.3 /usr/lib/perl5/site_perl/5.12.2 /usr/lib/perl5/site_perl/5.12.1 /usr/lib/perl5/site_perl/5.12.0 /usr/lib/perl5/site_perl/5.10.1 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.14.0 /usr/lib/perl5/vendor_perl/5.14.0/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.12.3 /usr/lib/perl5/vendor_perl/5.12.2 /usr/lib/perl5/vendor_perl/5.12.1 /usr/lib/perl5/vendor_perl/5.12.0 /usr/lib/perl5/vendor_perl/5.10.1 /usr/lib/perl5/vendor_perl/5.10.0 /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl .) at .///symlink_test.pl line 6. BEGIN failed--compilation aborted at .///symlink_test.pl line 6. # Failed test 'crufty path doesn't make it blow up' # at t/moretests/04-symlinks.t line 55. # Looks like you failed 2 tests of 2. t/moretests/04-symlinks.t ....... Dubious, test returned 2 (wstat 512, 0x200) Failed 2/2 subtests t/moretests/05-backcompat.t ..... ok t/moretests/06-conflict.t ....... ok Test Summary Report ------------------- t/moretests/04-symlinks.t (Wstat: 512 Tests: 2 Failed: 2) Failed tests: 1-2 Non-zero exit status: 2 Files=16, Tests=41, 1 wallclock secs ( 0.07 usr 0.02 sys + 0.54 cusr 0.12 csys = 0.75 CPU) Result: FAIL Failed 1/16 test programs. 2/41 subtests failed.
I see the same test failures on Ubuntu 11.04 (Natty Narwhal) using a custom compiled perl (5.10.1). I confirmed that if I change line 132 in Find/Lib.pm from: my ($volume, $path, $file) = File::Spec->splitpath( Cwd::cwd() ); to: my ($volume, $path, $file) = File::Spec->splitpath( $ENV{PWD} ); And then run: perl Makefile.PL; make; make test that all of the tests pass. So there is some sort of problem/difference between using $ENV{PWD} and Cwd::cwd() and the symlink tests on Linux.
I replaced symlink_test.pl with the following code: 


use Find::Lib '../t/mylib';
use Test::More;
use Cwd;
BEGIN {
  note explain { _pwd => $ENV{PWD} , _cwd => Cwd::cwd() };
}
use MyLibNoTest;
exit 0;

And the output then becomes as follows:

prove -bvr t/moretests/04-symlinks.t
t/moretests/04-symlinks.t ..
1..2
Show quoted text
# {
#   '_cwd' => '/tmp/portage/dev-perl-Find-Lib-1.20.0/work/Find-Lib-1.02/testdir_345727/testdir',
#   '_pwd' => '/tmp/portage/dev-perl-Find-Lib-1.20.0/work/Find-Lib-1.02/symlink_345727'
# }
Can't locate MyLibNoTest.pm in @INC (@INC contains: /tmp/portage/dev-perl-Find-Lib-1.20.0/work/Find-Lib-1.02/blib/lib /tmp/portage/dev-perl-Find-Lib-1.20.0/work/Find-Lib-1.02/blib/arch /etc/perl /usr/local/lib64/perl5/5.14.1/x86_64-linux-thread-multi /usr/local/lib64/perl5/5.14.1 /usr/lib64/perl5/vendor_perl/5.14.1/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.14.1 /usr/local/lib64/perl5 /usr/lib64/perl5/vendor_perl/5.14.0/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.14.0 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5/5.14.1/x86_64-linux-thread-multi /usr/lib64/perl5/5.14.1 .) at symlink_test.pl line 11.
BEGIN failed--compilation aborted at symlink_test.pl line 11.
not ok 1 - script succeeded, meaning that compilation with symlink worked

Show quoted text
#   Failed test 'script succeeded, meaning that compilation with symlink worked'
#   at t/moretests/04-symlinks.t line 51.
# PWD=/tmp/portage/dev-perl-Find-Lib-1.20.0/work/Find-Lib-1.02/symlink_345727, script=symlink_test.pl
# {
#   '_cwd' => '/tmp/portage/dev-perl-Find-Lib-1.20.0/work/Find-Lib-1.02/testdir_345727/testdir',
#   '_pwd' => '/tmp/portage/dev-perl-Find-Lib-1.20.0/work/Find-Lib-1.02/symlink_345727'
# }
Can't locate MyLibNoTest.pm in @INC (@INC contains: /tmp/portage/dev-perl-Find-Lib-1.20.0/work/Find-Lib-1.02/blib/lib /tmp/portage/dev-perl-Find-Lib-1.20.0/work/Find-Lib-1.02/blib/arch /etc/perl /usr/local/lib64/perl5/5.14.1/x86_64-linux-thread-multi /usr/local/lib64/perl5/5.14.1 /usr/lib64/perl5/vendor_perl/5.14.1/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.14.1 /usr/local/lib64/perl5 /usr/lib64/perl5/vendor_perl/5.14.0/x86_64-linux-thread-multi /usr/lib64/perl5/vendor_perl/5.14.0 /usr/lib64/perl5/vendor_perl /usr/lib64/perl5/5.14.1/x86_64-linux-thread-multi /usr/lib64/perl5/5.14.1 .) at .///symlink_test.pl line 11.
BEGIN failed--compilation aborted at .///symlink_test.pl line 11.
not ok 2 - crufty path doesn't make it blow up

Show quoted text
#   Failed test 'crufty path doesn't make it blow up'
#   at t/moretests/04-symlinks.t line 55.
# Looks like you failed 2 tests of 2.
Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/2 subtests

Test Summary Report
-------------------
t/moretests/04-symlinks.t (Wstat: 512 Tests: 2 Failed: 2)
  Failed tests:  1-2
  Non-zero exit status: 2
Files=1, Tests=2,  0 wallclock secs ( 0.03 usr  0.00 sys +  0.10 cusr  0.02 csys =  0.15 CPU)
Result: FAIL


Futher inspection, I  inject a system call to bash in BEGIN so I can look around.

find -ls | grep -Ei 'sym|test'
31914056    4 -rw-r--r--   1 root     root          267 Jun 29 15:28 ./symlink_test.pl

cd ..

find -ls | grep -Ei 'sym|test'
31914055    0 lrwxrwxrwx   1 root     root           22 Jun 29 15:28 ./symlink_346317 -> testdir_346317/testdir
31914053    0 drwxr-xr-x   3 root     root           60 Jun 29 15:28 ./testdir_346317
31914054    0 drwxr-xr-x   2 root     root           60 Jun 29 15:28 ./testdir_346317/testdir
31914056    4 -rw-r--r--   1 root     root          267 Jun 29 15:28 ./testdir_346317/testdir/symlink_test.pl
31914052    0 lrwxrwxrwx   1 root     root            1 Jun 29 15:28 ./symlinktest346317 -> .
31906461    4 -rw-r--r--   1 portage  portage       242 Dec  7  2007 ./t/testutils.pl
31906463    4 -rw-r--r--   1 portage  portage       107 May  5  2009 ./t/mylib/MyLibNoTest.pm
31906459    0 drwxr-xr-x   3 portage  portage       260 Jun 29 15:07 ./t/moretests
31906474    4 -rw-r--r--   1 portage  portage       267 Jun 29 15:23 ./t/moretests/symlink_test.pl
31906473    0 drwxr-xr-x   2 portage  portage        60 Jun 29 15:07 ./t/moretests/mytestlib
31906475    4 -rw-r--r--   1 portage  portage       131 May  2  2009 ./t/moretests/mytestlib/MyLib.pm
31906472    4 -rw-r--r--   1 portage  portage       271 Oct 23  2009 ./t/moretests/06-conflict.t
31906471    4 -rw-r--r--   1 portage  portage       178 Oct 23  2009 ./t/moretests/05-backcompat.t
31906470    4 -rw-r--r--   1 portage  portage      1513 Oct 28  2009 ./t/moretests/04-symlinks.t
31906469    4 -rw-r--r--   1 portage  portage       336 May  9  2009 ./t/moretests/03-pwd-begin.t
31906468    4 -rw-r--r--   1 portage  portage       187 Oct 23  2009 ./t/moretests/03-chdir.t
31906467    4 -rw-r--r--   1 portage  portage       256 Oct 23  2009 ./t/moretests/03-chdir-begin.t
31906466    4 -rw-r--r--   1 portage  portage       289 Oct 23  2009 ./t/moretests/02-dollar0.t
31906465    4 -rw-r--r--   1 portage  portage       293 Oct 23  2009 ./t/moretests/02-dollar0-begin.t
31906464    4 -rw-r--r--   1 portage  portage       166 Oct 23  2009 ./t/moretests/01-relative.t

Hopefully this information proves useful.
I've uploaded 1.03_01 to cpan, which essentially reverts 1.02 with a minor improvement