Skip Menu |

This queue is for tickets about the Win32 CPAN distribution.

Report information
The Basics
Id: 27187
Status: resolved
Priority: 0/
Queue: Win32

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

Bug Information
Severity: Important
Broken in: 0.29
Fixed in: 0.31



Subject: t/Unicode.t failures under Cygwin
t/Unicode.t fails on 'make test' under Cygwin: Win32-0.29 > make test cp Win32.pm blib/lib/Win32.pm /usr/bin/perl.exe /usr/lib/perl5/5.9/ExtUtils/xsubpp -typemap /usr/lib/perl5/5.9/ExtUtils/typemap Win32.xs > Win32.xsc && mv Win32.xsc Win32.c gcc -c -DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -DNO_MATHOMS -fno-strict-aliasing -pipe -DUSEIMPORTLIB -O3 -pipe -funit-at-a-time -mtune=pentium4m -march=pentium4 -mfpmath=sse -mieee-fp -mmmx -msse -msse2 -DVERSION=\"0.29\" -DXS_VERSION=\"0.29\" "-I/usr/lib/perl5/5.9/cygwin/CORE" Win32.c Running Mkbootstrap for Win32 () chmod 644 Win32.bs rm -f blib/arch/auto/Win32/Win32.dll /usr/bin/ld2 -s -L/usr/local/lib Win32.o -o blib/arch/auto/Win32/Win32.dll \ /usr/lib/perl5/5.9/cygwin/CORE/libperl.dll.a -L/lib/w32api -lole32 -lversion \ gcc -shared -o Win32.dll -Wl,--out-implib=libWin32.dll.a -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--stack,8388608 -Wl,--enable-auto-image-base \ -s -L/usr/local/lib Win32.o /usr/lib/perl5/5.9/cygwin/CORE/libperl.dll.a -L/lib/w32api -lole32 -lversion Creating library file: libWin32.dll.a mv Win32.dll libWin32.dll.a blib/arch/auto/Win32/ chmod 755 blib/arch/auto/Win32/Win32.dll cp Win32.bs blib/arch/auto/Win32/Win32.bs chmod 644 blib/arch/auto/Win32/Win32.bs /usr/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/CreateFile..................ok t/ExpandEnvironmentStrings....ok t/GetCurrentThreadId..........skipped all skipped: Test requires fork emulation t/GetFileVersion..............skipped all skipped: Only ActivePerl seems to set the perl.exe fileversion t/GetFolderPath...............ok t/GetFullPathName.............ok t/GetLongPathName.............ok t/GetOSVersion................ok t/GuidGen.....................ok t/Unicode.....................# Failed test 1 in t/Unicode.t at line 41 # t/Unicode.t line 41 is: ok(-d Win32::GetANSIPathName($dir)); # Failed test 2 in t/Unicode.t at line 45 t/Unicode.....................NOK 1/12# t/Unicode.t line 45 is: ok(-f Win32::GetANSIPathName($file)); # Failed test 3 in t/Unicode.t at line 48 # t/Unicode.t line 48 is: ok(opendir(my $dh, Win32::GetANSIPathName($dir))); readdir() attempted on invalid dirhandle $dh at t/Unicode.t line 49. closedir() attempted on invalid dirhandle $dh at t/Unicode.t line 53. # Failed test 5 in t/Unicode.t at line 62 # t/Unicode.t line 62 is: ok(Win32::SetCwd($dir)); t/Unicode.....................NOK 2/12# Test 6 got: "E:\\cygwin\\admin\\cpan\\build\\Win32-0.29" (t/Unicode.t at line 63) t/Unicode.....................NOK 6/12# Expected: "E:\\cygwin\\admin\\cpan\\build\\Win32-0.29\\Foo \x{394}\x{419} Bar \x{5E7}\x{645} Baz" # t/Unicode.t line 63 is: ok(Win32::GetLongPathName(Win32::GetCwd()), $long); # Test 7 got: <UNDEF> (t/Unicode.t at line 67) # Expected: "E:\\cygwin\\admin\\cpan\\build\\Win32-0.29\\Foo \x{394}\x{419} Bar \x{5E7}\x{645} Baz" t/Unicode.....................NOK 7/12# t/Unicode.t line 67 is: ok(Win32::GetLongPathName($cwd), $long); # Failed test 10 in t/Unicode.t at line 74 # t/Unicode.t line 74 is: ok(chdir(Win32::GetANSIPathName($dir))); # Test 11 got: "E:\\cygwin\\admin\\cpan\\build\\Win32-0.29" (t/Unicode.t at line 75) # Expected: "E:\\cygwin\\admin\\cpan\\build\\Win32-0.29\\Foo \x{394}\x{419} Bar \x{5E7}\x{645} Baz" # t/Unicode.t line 75 is: ok(Win32::GetLongPathName(Win32::GetCwd()), $long); t/Unicode.....................FAILED tests 1-3, 5-7, 10-12 Failed 9/12 tests, 25.00% okay Failed Test Stat Wstat Total Fail List of Failed ------------------------------------------------------------------------------- t/Unicode.t 12 9 1-3 5-7 10-12 2 tests skipped. Failed 1/10 test scripts. 9/84 subtests failed. Files=10, Tests=84, 1 wallclock secs ( 0.89 cusr + 0.50 csys = 1.39 CPU) Failed 1/10 test programs. 9/84 subtests failed. make: *** [test_dynamic] Error 255 Running the test manually produces: Win32-0.29 > perl -Mblib t/Unicode.t 1..12 # Running under perl version 5.009005 for cygwin # Current time local: Fri May 18 08:40:24 2007 # Current time GMT: Fri May 18 12:40:24 2007 # Using Test.pm version 1.25 not ok 1 # Failed test 1 in t/Unicode.t at line 41 # t/Unicode.t line 41 is: ok(-d Win32::GetANSIPathName($dir)); not ok 2 # Failed test 2 in t/Unicode.t at line 45 # t/Unicode.t line 45 is: ok(-f Win32::GetANSIPathName($file)); not ok 3 # Failed test 3 in t/Unicode.t at line 48 # t/Unicode.t line 48 is: ok(opendir(my $dh, Win32::GetANSIPathName($dir))); ok 4 not ok 5 # Failed test 5 in t/Unicode.t at line 62 # t/Unicode.t line 62 is: ok(Win32::SetCwd($dir)); not ok 6 # Test 6 got: "E:\\cygwin\\admin\\cpan\\build\\Win32-0.29" (t/Unicode.t at line 63) # Expected: "E:\\cygwin\\admin\\cpan\\build\\Win32-0.29\\Foo \x{394}\x{419} Bar \x{5E7}\x{645} Baz" # t/Unicode.t line 63 is: ok(Win32::GetLongPathName(Win32::GetCwd()), $long); not ok 7 # Test 7 got: <UNDEF> (t/Unicode.t at line 67) # Expected: "E:\\cygwin\\admin\\cpan\\build\\Win32-0.29\\Foo \x{394}\x{419} Bar \x{5E7}\x{645} Baz" # t/Unicode.t line 67 is: ok(Win32::GetLongPathName($cwd), $long); ok 8 ok 9 not ok 10 # Failed test 10 in t/Unicode.t at line 74 # t/Unicode.t line 74 is: ok(chdir(Win32::GetANSIPathName($dir))); not ok 11 # Test 11 got: "E:\\cygwin\\admin\\cpan\\build\\Win32-0.29" (t/Unicode.t at line 75) # Expected: "E:\\cygwin\\admin\\cpan\\build\\Win32-0.29\\Foo \x{394}\x{419} Bar \x{5E7}\x{645} Baz" # t/Unicode.t line 75 is: ok(Win32::GetLongPathName(Win32::GetCwd()), $long); Note: I do not compile in a number of extension such as Encode, Unicode::Normalize, and others (see below). If this is the cause, then the offending tests may need to be conditioned based on available extensions. Win32-0.29 > perl -V Summary of my perl5 (revision 5 version 9 subversion 5 patch 31234) configuration: Platform: osname=cygwin, osvers=1.5.24(0.15642), archname=cygwin-thread-multi-64int uname='cygwin_nt-5.0 pn100-02-2-054p 1.5.24(0.15642) 2007-01-31 10:57 i686 cygwin ' config_args='-de -Dusedevel -Dversiononly=no -Dinstallusrbinperl -Duse64bitint -Dusethreads -Uusemymalloc -Dnoextensions=attrs IPC/SysV Sys/Syslog DB_File NDBM_File ODBM_File SDBM_File Devel/DProf Devel/Peek re XS/APItest XS/Typemap Encode PerlIO/encoding Unicode/Normalize I18N/Langinfo Text/Soundex Math/BigInt/FastCalc Time/Piece -A define:optimize=-O3 -pipe -funit-at-a-time -mtune=pentium4m -march=pentium4 -mfpmath=sse -mieee-fp -mmmx -msse -msse2 -A define:ld=/usr/bin/ld2 -A append:ccflags= -DNO_MATHOMS' hint=recommended, useposix=true, d_sigaction=define useithreads=define, usemultiplicity=define useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef use64bitint=define, use64bitall=undef, uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -DNO_MATHOMS -fno-strict-aliasing -pipe', optimize='-O3 -pipe -funit-at-a-time -mtune=pentium4m -march=pentium4 -mfpmath=sse -mieee-fp -mmmx -msse -msse2', cppflags='-DPERL_USE_SAFE_PUTENV -U__STRICT_ANSI__ -DNO_MATHOMS -fno-strict-aliasing -pipe' ccversion='', gccversion='3.4.4 (cygming special, gdc 0.12, using dmd 0.125)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=8, prototype=define Linker and Libraries: ld='/usr/bin/ld2', ldflags =' -Wl,--enable-auto-import -s -L/usr/local/lib' libpth=/usr/local/lib /usr/lib /lib libs=-lgdbm -ldl -lcrypt -lgdbm_compat perllibs=-ldl -lcrypt -lgdbm_compat libc=/usr/lib/libc.a, so=dll, useshrplib=true, libperl=libperl.a gnulibc_version='' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' -s' cccdlflags=' ', lddlflags=' -s -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY NO_MATHOMS PERL_DONT_CREATE_GVSV PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_USE_SAFE_PUTENV USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Locally applied patches: DEVEL 31234 Built under cygwin Compiled at May 17 2007 08:08:22 %ENV: PERLIO="perlio" CYGWIN="ntsec" @INC: /usr/lib/perl5/5.9/cygwin /usr/lib/perl5/5.9 .
From: JDHEDDEN [...] cpan.org
On Fri May 18 08:45:29 2007, JDHEDDEN wrote: Show quoted text
> t/Unicode.t fails on 'make test' under Cygwin:
As posted to p5p, the attached patch causes Unicode.t to be skipped under Cygwin because it doesn't support Unicode filename.
--- perl-current/ext/Win32/t/Unicode.t.orig 2007-05-19 11:53:26.556875000 -0400 +++ perl-current/ext/Win32/t/Unicode.t 2007-05-19 11:55:27.202125000 -0400 @@ -5,6 +5,10 @@ use Cwd qw(cwd); BEGIN { + if ($^O eq 'cygwin') { + print "1..0 # Skip: Cygwin doesn't support Unicode filename\n"; + exit 0; + } unless (defined &Win32::BuildNumber && Win32::BuildNumber() >= 820 or $] >= 5.008009) { print "1..0 # Skip: Needs ActivePerl 820 or Perl 5.8.9 or later\n"; exit 0;
Subject: [PATCH] t/Unicode.t failures under Cygwin
From: JDHEDDEN [...] cpan.org
JDHEDDEN wrote: Show quoted text
> t/Unicode.t fails on 'make test' under Cygwin:
With Win32-0.30, t/Unicode.t still fails under Cygwin on a FAT32 drive: Show quoted text
> cd /tmp
Show quoted text
> perl -MWin32 -e 'print(join("\n", Win32::FsType()), "\n");'
FAT32 6 255 Show quoted text
> perl /usr/local/src/perl/cpan/build/Win32-0.30/t/Unicode.t
1..12 # Running under perl version 5.009005 for cygwin # Current time local: Tue Jun 26 12:41:53 2007 # Current time GMT: Tue Jun 26 16:41:53 2007 # Using Test.pm version 1.25 not ok 1 # Failed test 1 in /usr/local/src/perl/cpan/build/Win32-0.30/t/Unicode.t at line 41 # /usr/local/src/perl/cpan/build/Win32-0.30/t/Unicode.t line 41 is: ok(-d Win32::GetANSIPathName($dir)); not ok 2 # Failed test 2 in /usr/local/src/perl/cpan/build/Win32-0.30/t/Unicode.t at line 45 # /usr/local/src/perl/cpan/build/Win32-0.30/t/Unicode.t line 45 is: ok(-f Win32::GetANSIPathName($file)); not ok 3 # Failed test 3 in /usr/local/src/perl/cpan/build/Win32-0.30/t/Unicode.t at line 48 # /usr/local/src/perl/cpan/build/Win32-0.30/t/Unicode.t line 48 is: ok(opendir(my $dh, Win32::GetANSIPathName($dir))); ok 4 not ok 5 # Failed test 5 in /usr/local/src/perl/cpan/build/Win32-0.30/t/Unicode.t at line 62 # /usr/local/src/perl/cpan/build/Win32-0.30/t/Unicode.t line 62 is: ok(Win32::SetCwd($dir)); not ok 6 # Test 6 got: "E:\\cygwin\\tmp" (/usr/local/src/perl/cpan/build/Win32-0.30/t/Unicode.t at line 63) # Expected: "E:\\cygwin\\tmp\\Foo \x{394}\x{419} Bar \x{5E7}\x{645} Baz" # /usr/local/src/perl/cpan/build/Win32-0.30/t/Unicode.t line 63 is: ok(Win32::GetLongPathName(Win32::GetCwd()), $long); ok 7 ok 8 not ok 9 # Test 9 got: "E:\\cygwin\\tmp" (/usr/local/src/perl/cpan/build/Win32-0.30/t/Unicode.t at line 80) # Expected: "E:\\cygwin\\tmp\\Foo \x{394}\x{419} Bar \x{5E7}\x{645} Baz" # /usr/local/src/perl/cpan/build/Win32-0.30/t/Unicode.t line 80 is: ok(Win32::GetLongPathName($subdir), $long); not ok 10 # Failed test 10 in /usr/local/src/perl/cpan/build/Win32-0.30/t/Unicode.t at line 83 # /usr/local/src/perl/cpan/build/Win32-0.30/t/Unicode.t line 83 is: ok(chdir(Win32::GetANSIPathName($dir))); not ok 11 # Test 11 got: "E:\\cygwin\\tmp" (/usr/local/src/perl/cpan/build/Win32-0.30/t/Unicode.t at line 84) # Expected: "E:\\cygwin\\tmp\\Foo \x{394}\x{419} Bar \x{5E7}\x{645} Baz" # /usr/local/src/perl/cpan/build/Win32-0.30/t/Unicode.t line 84 is: ok(Win32::GetLongPathName(Win32::GetCwd()), $long); However, it works on an NTFS drive: Show quoted text
> cd /c/Temp
Show quoted text
> perl -MWin32 -e "print(join(\"\n\", Win32::FsType()), \"\n\");"
NTFS 459007 255 Show quoted text
> perl /usr/local/src/perl/cpan/build/Win32-0.30/t/Unicode.t
1..12 # Running under perl version 5.009005 for cygwin # Current time local: Tue Jun 26 12:42:19 2007 # Current time GMT: Tue Jun 26 16:42:19 2007 # Using Test.pm version 1.25 ok 1 ok 2 ok 3 ok 4 ok 5 ok 6 ok 7 ok 8 ok 9 ok 10 ok 11 ok 12 The attached patch skips the test on FAT32 drives under Cygwin. I am posting this patch to p5p, too.
--- Win32-0.30/t/Unicode.t.orig 2007-06-26 13:10:02.000000000 -0400 +++ Win32-0.30/t/Unicode.t 2007-06-26 13:11:40.000000000 -0400 @@ -12,6 +12,10 @@ print "1..0 # Skip: Filesystem doesn't support Unicode\n"; exit 0; } + if (($^O eq 'cygwin') && (Win32::FsType() eq 'FAT32')) { + print "1..0 # Skip: FAT32 under Cygwin doesn't support Unicode\n"; + exit 0; + } unless ((Win32::GetOSVersion())[1] > 4) { print "1..0 # Skip: Unicode support requires Windows 2000 or later\n"; exit 0;
From: m.nooning [...] comcast.net
It fails on Windows XP machines that do not have cygwin installed, too. Perl 5.8.8 build 820 on Windows XP. This was a fresh install of Perl. t/Unicode.....................# Failed test 1 in t/Unicode.t at line 41 t/Unicode.....................NOK 1# t/Unicode.t line 41 is: ok(-d Win32::GetANSIPathName($dir)); # Failed test 2 in t/Unicode.t at line 45 t/Unicode.....................NOK 2# t/Unicode.t line 45 is: ok(-f Win32::GetANSIPathName($file)); # Failed test 3 in t/Unicode.t at line 48 t/Unicode.....................NOK 3# t/Unicode.t line 48 is: ok(opendir(my $dh, Win32::GetANSIPathN ame($dir))); t/Unicode.....................ok 4/12# Failed test 5 in t/Unicode.t at line 62 t/Unicode.....................NOK 5# t/Unicode.t line 62 is: ok(Win32::SetCwd($dir)); # Test 6 got: "C:\\webdownload\\perl\\Win32\\Win32-0.30" (t/Unicode.t at line 63) t/Unicode.....................NOK 6# Expected: "C:\\webdownload\\perl\\Win32\\Win32-0.30\\Foo \x{3 94}\x{419} Bar \x{5E7}\x{645} Baz" # t/Unicode.t line 63 is: ok(Win32::GetLongPathName(Win32::GetCwd()), $long); # Test 9 got: "C:\\webdownload\\perl\\Win32\\Win32-0.30" (t/Unicode.t at line 80) t/Unicode.....................NOK 9# Expected: "C:\\webdownload\\perl\\Win32\\Win32-0.30\\Foo \x{3 94}\x{419} Bar \x{5E7}\x{645} Baz" # t/Unicode.t line 80 is: ok(Win32::GetLongPathName($subdir), $long); # Failed test 10 in t/Unicode.t at line 83 t/Unicode.....................NOK 10# t/Unicode.t line 83 is: ok(chdir(Win32::GetANSIPathName($dir) )); # Test 11 got: "C:\\webdownload\\perl\\Win32\\Win32-0.30" (t/Unicode.t at line 84) t/Unicode.....................NOK 11# Expected: "C:\\webdownload\\perl\\Win32\\Win32-0.30\\Foo \x {394}\x{419} Bar \x{5E7}\x{645} Baz" # t/Unicode.t line 84 is: ok(Win32::GetLongPathName(Win32::GetCwd()), $long); t/Unicode.....................FAILED tests 1-3, 5-6, 9-12 Failed 9/12 tests, 25.00% okay Failed Test Stat Wstat Total Fail Failed List of Failed ------------------------------------------------------------------------------- t/Unicode.t 12 9 75.00% 1-3 5-6 9-12 Failed 1/11 test scripts, 90.91% okay. 9/93 subtests failed, 90.32% okay. NMAKE : fatal error U1077: 'C:\Perl\bin\perl.exe' : return code '0xff' Stop. C:\webdownload\perl\Win32\Win32-0.30>
From: m.nooning [...] comcast.net
Problem solved (for now). The url http://www.gossamer-threads.com/lists/perl/porters/217608 has quite a bit of discussion on this. The upshot is that FAT/FAT32 do not consistently support unicode, and so the file t/Unicode.t must be patched so that the test is skipped. I will paste the patch from that url below. --------paste patch --- perl-current/ext/Win32/t/Unicode.t.orig 2007-06-26 15:34:43.907620700 -0400 +++ perl-current/ext/Win32/t/Unicode.t 2007-06-26 15:36:15.622243300 -0400 @@ -8,7 +8,7 @@ print "1..0 # Skip: Needs ActivePerl 820 or Perl 5.8.9 or later\n"; exit 0; } - unless ((Win32::FsType())[1] & 4) { + if ((((Win32::FsType())[1] & 4) == 0) || (Win32::FsType() =~ /^FAT/)) { print "1..0 # Skip: Filesystem doesn't support Unicode\n"; exit 0; } --------end paste patch