This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
op/.stat.t: fix race condition
authorDavid Mitchell <davem@iabyn.com>
Tue, 12 Aug 2014 10:44:35 +0000 (11:44 +0100)
committerDavid Mitchell <davem@iabyn.com>
Tue, 12 Aug 2014 10:44:35 +0000 (11:44 +0100)
commit5a3240c189517e77b3402aa8998b5beee21045bd
tree35d84737b656b97839500452651026c81fa368f9
parent2ebcba0a9f172787c2c75bb3480e865c6809c1f0
op/.stat.t: fix race condition

A test was checking that stat on FILEHANDLE and lstat on *FILEHANDLE{IO}
gave the same results. It was using STDOUT as the filehandle, but since
this can be modified by other processes during parallel testing, a race
condition is possible.

Open a file instead to get reliability.
t/op/stat.t