Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: johntrammell [...] gmail.com
Cc:
AdminCc:

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



Subject: quoting bug on cygwin, TAP::Parser::Source::Perl
make && make test fails for Test::Harness 3.09 on cygwin if the build path contains spaces (see attachment). Paths with spaces get wrapped in an extra layer of double quotes, which makes the open3() call in TAP::Parser::Iterator::Process::new() fail. The attached patch skips the problematic quoting for cygwin. System info attached also.
Subject: test-harness.patch
diff -u -r Test-Harness-3.09/lib/TAP/Parser/Source/Perl.pm Test-Harness-3.09-new/lib/TAP/Parser/Source/Perl.pm --- Test-Harness-3.09/lib/TAP/Parser/Source/Perl.pm 2008-02-09 17:25:10.000000000 -0600 +++ Test-Harness-3.09-new/lib/TAP/Parser/Source/Perl.pm 2008-02-18 16:12:34.400911200 -0600 @@ -4,6 +4,7 @@ use Config; use vars qw($VERSION @ISA); +use constant IS_CYGWIN => ( $^O eq 'cygwin' ); use constant IS_WIN32 => ( $^O =~ /^(MS)?Win32$/ ); use constant IS_VMS => ( $^O eq 'VMS' ); @@ -257,8 +258,9 @@ # Quote the argument if there's any whitespace in it, or if # we're VMS, since VMS requires all parms quoted. Also, don't quote - # it if it's already quoted. + # it if it's already quoted, or if the platform is cygwin. for (@switches) { + next if IS_CYGWIN; $_ = qq["$_"] if ( ( /\s/ || IS_VMS ) && !/^".*"$/ ); }
Subject: test-harness.out
Download test-harness.out
application/octet-stream 6k

Message body not shown because it is not plain text.

Subject: system.txt
% uname -a CYGWIN_NT-5.1 JOHNT-XP 1.5.25(0.156/4/2) 2007-12-14 19:21 i686 Cygwin % perl -V Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=cygwin, osvers=1.5.24(0.15642), archname=cygwin-thread-multi-64int uname='cygwin_nt-5.1 reini 1.5.24(0.15642) 2007-01-31 10:57 i686 cygwin ' config_args='-de -Dmksymlinks -Duse64bitint -Dusethreads -Uusemymalloc -Doptimize=-O3 -Dman3ext=3pm -Dusesitecustomize -Dusedevel' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef 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 -fno-strict-aliasing -pipe -Wdeclaration-after-statement', optimize='-O3', cppflags='-DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe -Wdeclaration-after-statement' 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='ld2', ldflags =' -s -L/usr/local/lib' libpth=/usr/local/lib /usr/lib /lib libs=-lgdbm -ldb -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 PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP PERL_USE_SAFE_PUTENV USE_64_BIT_INT USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API USE_SITECUSTOMIZE Locally applied patches: CYG01 - hints.cygwin.sh ldflags -s CYG02 - lib-ExtUtils-Embed insensitive against leading \s CYG03 - lib-Test-Harness-Straps $ENV{PERL5LIB} = '' CYG04 - major.version.cygwin.sh cygperl-5_8.dll and not cygperl-5_8_x.dll CYG05 - add Win32CORE to core CYG07 - File-Spec-Cygwin-TMPDIR.patch Bug#38628 - allow legacy Cwd->cwd() Bug#40103 - File-Spec-case_tolerant.patch from 5.9.5 Built under cygwin Compiled at Jul 8 2007 19:12:08 %ENV: CYGWIN="server" @INC: /usr/lib/perl5/5.8/cygwin /usr/lib/perl5/5.8 /usr/lib/perl5/site_perl/5.8/cygwin /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/site_perl/5.8 /usr/lib/perl5/vendor_perl/5.8/cygwin /usr/lib/perl5/vendor_perl/5.8 /usr/lib/perl5/vendor_perl/5.8 .
From: johntrammell [...] gmail.com
On Mon Feb 18 17:32:36 2008, JTRAMMELL wrote: Show quoted text
> make && make test fails for Test::Harness 3.09 on cygwin if the build > path contains spaces (see attachment). Paths with spaces get wrapped in > an extra layer of double quotes, which makes the open3() call in > TAP::Parser::Iterator::Process::new() fail. > > The attached patch skips the problematic quoting for cygwin. System > info attached also.
Of course, after hitting "Submit" it occurs to me this might be broader than just cygwin. So I tried it on Linux, a simple "make; make test" from within a directory with spaces. The error is identical. Here's the new platform info: [ johnt@diamond:~/dir with spaces in it/Test-Harness-3.09 8689 ] uname -a Linux diamond 2.6.9-42.0.10.ELsmp #1 SMP Fri Feb 16 17:17:21 EST 2007 i686 i686 i386 GNU/Linux [ johnt@diamond:~/dir with spaces in it/Test-Harness-3.09 8690 ] perl -V Summary of my perl5 (revision 5 version 8 subversion 5) configuration: Platform: osname=linux, osvers=2.6.9-22.18.bz155725.elsmp, archname=i386-linux-thread-multi uname='linux hs20-bc1-4.build.redhat.com 2.6.9-22.18.bz155725.elsmp #1 smp thu nov 17 15:34:08 est 2005 i686 i686 i386 gnulinux ' config_args='-des -Doptimize=-O2 -g -pipe -m32 -march=i386 -mtune=pentium4 -Dversion=5.8.5 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dinc_version_list=5.8.4 5.8.3 5.8.2 5.8.1 5.8.0' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', optimize='-O2 -g -pipe -m32 -march=i386 -mtune=pentium4', cppflags='-D_REENTRANT -D_GNU_SOURCE -DDEBUGGING -fno-strict-aliasing -pipe -I/usr/local/include -I/usr/include/gdbm' ccversion='', gccversion='3.4.6 20060404 (Red Hat 3.4.6-2)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=/lib/libc-2.3.4.so, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.3.4' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/5.8.5/i386-linux-thread-multi/CORE' cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS USE_LARGE_FILES PERL_IMPLICIT_CONTEXT Built under linux Compiled at Jul 24 2006 18:28:10 @INC: /usr/lib/perl5/5.8.5/i386-linux-thread-multi /usr/lib/perl5/5.8.5 /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.4/i386-linux-thread-multi /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.5 /usr/lib/perl5/site_perl/5.8.4 /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.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.4/i386-linux-thread-multi /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.5 /usr/lib/perl5/vendor_perl/5.8.4 /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 . [ johnt@diamond:~/dir with spaces in it/Test-Harness-3.09 8691 ]
On Tue Feb 19 10:39:43 2008, JTRAMMELL wrote: [snip] Aha. Yes. That would indeed be a problem. Thanks for the report John. I'll get on over the next couple of days.
I've also noticed this problem while trying to resolve some issues with the Catalyst test suite when run in a directory structure containing a space. It took me a few minutes to realize that my test wasn't even getting run at all due to a problem (somewhere down the line) with prove. FYI, I'm running Ubuntu 8.10.
This was fixed in r1243 and released as Test::Harness 3.15. Thanks!