develooper Front page | perl.perl5.porters | Postings from March 2003

perl-current: t/io/argv.t failures

Thread Next
From:
Campo Weijerman
Date:
March 14, 2003 12:17
Subject:
perl-current: t/io/argv.t failures
Message ID:
20030314201649.GB7028@python.nl.ibm.com
Hi all,
I'm just starting to run smoke tests of perl-current on AIX,
OpenBSD, and linux.  I would like to run these tests from cron on a
regular basis, but I'm consistently getting 'out of memory' types of
failures in t/io/argv.t on AIX and linux.  On OpenBSD the test
always passes fine, but on linux and AIX only when run from an
interactive session.  The problem even occurs when, e.g., I run 

echo './perl harness io/argv.t' | at now

So it can't be attributed to the smoke suite itself.

It seems it's this piece of code that blows up (lines 77-79):

open STDIN, 'Io_argv1.tmp' or die $!;
@ARGV = ();
ok( !eof(),     'STDIN has something' );

Is it really safe to access STDIN when it's state is unknown,
because if there is no tty and input is not from a pipe or whatever,
just /what/ does it refer to?  Just trying a wild guess, I inserted
'close STDIN;' right before this section, and that makes the test
pass.

I patched my local source tree and am now running a full smoke test
on it.  Meanwhile I wanted to share this with you, perhaps it rings
a bell with someone who has knowledge of Perl's internals.

Regards,
-- 
$_ = "Campo Weijerman [rfc822://nl.ibm.com/]" and tr-[:]/-<@>-d and print;

Thread Next


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