On Sat, Aug 29, 2009 at 07:39:20AM +0100, Nicholas Clark wrote: > There's a bit of context, and then it goes BOOM! > > On Fri, Aug 28, 2009 at 08:20:34PM +0100, Nicholas Clark wrote:
> > I don't see why it won't work, so I've committed it as > > 1d8d82d3d8b73345e6276774 I can replicate the exact failures for anything annotated "runperl" with this patch on OS X: --- a/t/test.pl +++ b/t/test.pl @@ -518,6 +518,8 @@ sub runperl { my $runperl = &_create_runperl; my $result; +return if $Perl =~ m!^/!; + my $tainted = ${^TAINT}; my %args = @_; exists $args{switches} && grep m/^-T$/, @{$args{switches}} and $tainted = $ It's to do with paths that contain a directory 't' being made absolute on Win32. But I don't think that it's *all* cases of tests that spawn child perl programs. > On Sat, Aug 29, 2009 at 04:21:00AM +0100, Steve Hay wrote: > > Automated smoke report for 5.11.0 patch > > a2c4b2d6db383103b96e4733616b17d0a3bb0bd9 blead-1969-ga2c4b2d > > > Failures: (common-args) -DCCTYPE=MSVC90 > > -DINST_TOP=$(INST_DRV)\Smoke\doesntexist > > [default] -Duselargefiles > > [default] -DDEBUGGING -Duselargefiles > > [default] -Duselargefiles -Dusemymalloc > > [default] -DDEBUGGING -Duselargefiles -Dusemymalloc > > ../ext/B/t/concise.t........................................FAILED > > 2-5, 148-157 uses runperl in t/test.pl > > ../ext/B/t/lint.t...........................................FAILED > > 1-29 uses runperl in t/test.pl > > ../ext/B/t/o.t..............................................FAILED > > 2-5, 7-9 uses runperl in t/test.pl > > ../ext/B/t/optree_check.t...................................FAILED > > 11-13 uses runperl in t/test.pl (via ext/B/t/OptreeCheck.pm) > > ../ext/B/t/optree_concise.t.................................FAILED > > 12-14, 16 uses runperl in t/test.pl (via ext/B/t/OptreeCheck.pm) > > ../ext/B/t/optree_constants.t...............................FAILED > > 27-28 uses runperl in t/test.pl (via ext/B/t/OptreeCheck.pm) > > ../ext/B/t/optree_misc.t....................................FAILED > > 2 uses runperl in t/test.pl (via ext/B/t/OptreeCheck.pm) > > ../ext/B/t/optree_samples.t.................................FAILED > > 11, 20 uses runperl in t/test.pl (via ext/B/t/OptreeCheck.pm) > > ../ext/B/t/optree_sort.t....................................FAILED > > 3, 5, 7, 9 uses runperl in t/test.pl (via ext/B/t/OptreeCheck.pm) > > ../ext/B/t/optree_specials.t................................FAILED > > 2-8 uses runperl in t/test.pl (via ext/B/t/OptreeCheck.pm) > > ../ext/B/t/optree_varinit.t.................................FAILED > > 6-8, 13-15, 19-22 uses runperl in t/test.pl (via ext/B/t/OptreeCheck.pm) > > ../ext/B/t/showlex.t........................................FAILED > > 2-3, 9-10 uses runperl in t/test.pl (via ext/B/t/OptreeCheck.pm) > > ../ext/Devel-DProf/t/DProf.t................................FAILED > > Bad plan. You planned 20 tests but ran 0. Gets the perl to run from which_perl in t/test.pl But I can't see where things are going wrong. > > ../ext/Devel-PPPort/t/ppphtest.t............................FAILED > > 2-10, 12-15, 18-23, 27, 29-30, 32-40, 42-45 > > 47-50, 55, 57-61, 63-64, 66-68, 70-71, 73-75 > > 80-81, 83-85, 87, 89-94, 96, 98, 100-113 > > 115-129, 131, 134, 136-138, 142-144, 147 > > 149-158, 160-162, 164-182, 184-189, 191-209 > > 211-214, 216-223, 225-226, 228-230, 232-234 Seems to use a very similar logic to which_perl, but I can't actually work out where it is going wrong > > ../ext/IO-Compress/t/010examples-bzip2.t....................FAILED > > 2-4, 6-8, 10-12, 14-15, 17-19 $Perl = qq["$Perl"] if $^O eq 'MSWin32' ; > > ../ext/IO-Compress/t/010examples-zlib.t.....................FAILED > > 2-4, 6-8, 10-12, 14-15, 17-19 $Perl = qq["$Perl"] if $^O eq 'MSWin32' ; > > ../ext/IO-Compress/t/cz-05examples.t........................FAILED > > 2-4, 6-8, 10-12, 14-15, 17-19, 21-22, 24-26 $Perl = qq["$Perl"] if $^O eq 'MSWin32' ; > > ../ext/Test-Harness/t/perl5lib.t............................FAILED > > 1 sub has_crazy_patch { my $sentinel = 'blirpzoffle'; local $ENV{PERL5LIB} = $sentinel; my $command = join ' ', map {qq{"$_"}} ( $^X, '-e', 'print join q(:), @INC' ); my $path = `$command`; my @got = ( $path =~ /($sentinel)/g ); return @got > 1; } but that's to determine whether to skip, so I can't figure out why it takes out the entire test if it fails to execute the contents of the `` Is `` fatal on Win32 sometimes? > > ../ext/Test-Harness/t/process.t.............................FAILED > > 1-27 TAP::Parser::Iterator::Process uses IPC::Open3::open3, which deep down is doing this: $pid = eval { system 1, @_ }; # 1 == P_NOWAIT I can't work out why that is failing. > > ../ext/re/t/lexical_debug.t.................................FAILED > > 1, 3, 5, 7-10 uses runperl in t/test.pl > > ../ext/re/t/regop.t.........................................FAILED > > 1, 3-19 > > Bad plan. You planned 54 tests but ran 19. uses runperl in t/test.pl > I think that the connection is that all the failures spawn a new perl > But I'm not sure why they don't like spawning ../../t/perl when ../../perl > worked just fine. Something interpolating, where "\." is \ . but "\t" is > a tab character? But what has that sort of interpolation rule? > > Doesn't everything in Perl that interpolates "\t" to a tab also interpolate > "\." to a dot? and runperl calls this code: my $runperl = which_perl(); if ($runperl =~ m/\s/) { $runperl = qq{"$runperl"}; } which, I assume, means that we're passing something like this to the Win32 command line: "C:\Path with Space\perl\t\perl" -le "print qq{Hello world}" Does it treat \t inside "" as something to interpolate to a tab character, but leave "unknown" escape sequences as 2 characters? If so, is there any way in Win32 to have the path above safely escaped? Nicholas Clark