develooper Front page | perl.perl5.porters | Postings from September 2009

New strict 'subs' test failing on Win32 [was: RE: Smoke [5.11.0] blead-1981-g48c887d FAIL(F) MSWin32 Win2000 SP4 (x86/1 cpu)]

Thread Previous
From:
Steve Hay
Date:
September 3, 2009 09:08
Subject:
New strict 'subs' test failing on Win32 [was: RE: Smoke [5.11.0] blead-1981-g48c887d FAIL(F) MSWin32 Win2000 SP4 (x86/1 cpu)]
Message ID:
1B32FF956ABF414C9BCE5E487A1497E7041C4CB3@ukmail02.planit.group
George Greer wrote on 2009-08-30:
> On Sun, 30 Aug 2009, George Greer wrote:
> 
>> Automated smoke report for 5.11.0 patch
>> 48c887ddc33dfbf3b9e6fb6dd8b46ff33407caa0 blead-1981-g48c887d
>> perl-win2k: Intel(R) Core(TM) i7 CPU 920 @ 2.67GHz(~2565 MHz) (x86/1
> cpu)
>>    on        MSWin32 - Win2000 SP4
>>    using     cl version 14.00.50727.42
>>    smoketime 3 hours 4 minutes (average 23 minutes 7 seconds)
> [...]
>> ../lib/strict.t.............................................FAILED
>>    77
> 
> PROG:
> use strict 'subs';
> sub sayfoo { print "foo:@_\n" }
> system sayfoo "bar";
> system sayfoo . "bar";
> EXPECTED:
> foo:bar
> foo:
> GOT:
> foo:bar
> '1' is not recognized as an internal or external command,
> operable program or batch file.
> foo:
> '1bar' is not recognized as an internal or external command,
> operable program or batch file.

The output above is as I would expect:

sayfoo "bar"

prints out:

foo:bar

and returns 1, which produces the error above when run via system();
similarly with:

sayfoo . "bar"

So it's the STDERR output complaining that 1 and 1bar are not
commands/programs that cmd.exe can run which has confused things. The
command being run is

.\perl -I../lib $switch $tmpfile 2>&1

which clearly picks up any such STDERR output. Throwing away the STDERR
with 2>nul is no good, because that makes lots of other tests which are
expecting things in STDERR fail.

This is a new test, and I think it has been failing ever since it was
added:

http://perl5.git.perl.org/perl.git/blobdiff/52a66c2cc3722485e8a16f1da9c0
26524180ca8c..9a073a1d1a270eb53990cb82ec7af8ae00d667c4:/t/lib/strict/sub
s

(i.e. it's nothing to do with the recent changes in t/harness, t/TEST
etc).

I'm not sure how best to fix it. Maybe some hackery to remove the
cmd.exe error message if present (on Win32 only), and look at what's
left?

What do commands like

perl -esystem(1)

do on other OSes? Is there no error output by the shell?

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About