Skip Menu |
 

This queue is for tickets about the File-Slurp CPAN distribution.

Report information
The Basics
Id: 5487
Status: resolved
Priority: 0/
Queue: File-Slurp

People
Owner: uri [...] sysarch.com
Requestors: ferreira [...] triang.com.br
Cc:
AdminCc:

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

Attachments


Subject: test failure 9999.04 about inode on Win32 and cygwin ports
Download (untitled) / with headers
text/plain 2.9k
This is another bug report and patch proposal on test scripts of File-Slurp-9999.04. This time for the following port: $ perl -v This is perl, v5.8.2 built for cygwin-thread-multi-64int Using cpan to install File::Slurp, the following output is seen: CPAN.pm: Going to build U/UR/URI/File-Slurp-9999.04.tar.gz Checking if your kit is complete... Looks good Writing Makefile for File::Slurp cp lib/File/Slurp.pm blib/lib/File/Slurp.pm /usr/bin/make -- OK Running make test /usr/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/error.......ok t/handle......ok t/inode.......ok 2/3# Failed test (t/inode.t at line 45) # Looks like you failed 1 tests of 3. t/inode.......dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 3 Failed 1/3 tests, 66.67% okay t/large.......ok t/original....ok t/readdir.....ok t/stdin.......ok Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/inode.t 1 256 3 1 33.33% 3 Failed 1/7 test scripts, 85.71% okay. 1/164 subtests failed, 99.39% okay. make: *** [test_dynamic] Error 255 /usr/bin/make test -- NOT OK Running make install make test had returned bad status, won't install without force The failure happens on "t/inode.t", more exactly on the 3rd test, as seen in $ prove --blib --verbose t/inode.t t/inode....1..3 ok 1 - use File::Slurp; ok 2 - same inode # Failed test (t/inode.t at line 45) # Looks like you failed 1 tests of 3. not ok 3 - different inode dubious Test returned status 1 (wstat 256, 0x100) DIED. FAILED test 3 Failed 1/3 tests, 66.67% okay Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/inode.t 1 256 3 1 33.33% 3 Failed 1/1 test scripts, 0.00% okay. 1/3 subtests failed, 66.67% okay. The script "t/inode.t" already skips the tests if a Win32 port is running (because inodes are bogus in this port). from perlport: "[About C<stat> return:] device and inode are not meaningful. (Win32)" cygwin runs under Windows too and despite the efforts to fake Unix inodes, we can find the following note: from Cygwin source files: "Windows does not natively support inodes, and neither does MSDOS. Cygwin's emulation can generate non-unique inodes, so don't use it." The solution is pretty simple: skip tests also for cygwin. The attached patch does this, while replacing the loose match on OS given by "$^O =~ '32'" by "$^O =~ /^(MSWin32|cygwin)$/". Maybe this script should also be skipped in VMS and MSDOS ports (also because inode don't make sense as for Unix OSes), but I don't have these platforms for telling it for sure.
Download inode.t.diff
text/x-diff 464b
--- inode.t 2004-02-28 20:40:02.000000000 -0300 +++ new.inode.t 2004-02-28 20:33:28.000000000 -0300 @@ -10,8 +10,9 @@ BEGIN{ - if( $^O =~ '32' ) { - plan skip_all => 'skip inode test on windows'; + if( $^O =~ /^(MSWin32|cygwin)$/ ) { + my %os = ( MSWin32 => 'windows', cygwin => 'cygwin' ); + plan skip_all => "skip inode test on $os{$1}"; exit ; } else { @@ -45,3 +46,4 @@ ok( $inode_num != $inode_num2, 'different inode' ) ; unlink $file ; +


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.