summaryrefslogtreecommitdiff
path: root/lib/File/stat.t
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2012-06-19 12:33:50 +0200
committerNicholas Clark <nick@ccl4.org>2012-06-21 09:00:37 +0200
commita3eb442d3abf75f1b44faa24724a5aa4c4fc7751 (patch)
tree36ffe82c4dbb702d59c3dfc2918cb7286ef003c4 /lib/File/stat.t
parent4c77591b9d78214701bc6ba2df3a2fbd9914c389 (diff)
downloadperl-a3eb442d3abf75f1b44faa24724a5aa4c4fc7751.tar.gz
lib/File/stat.t shouldn't test -A $^X
Testing this fails intermittently on darwin, which has POSIXly-correct atime semantics. When tests run in parallel, the atime of $^X will update whenever another perl process starts, which is a race condition with this test.
Diffstat (limited to 'lib/File/stat.t')
-rw-r--r--lib/File/stat.t9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/File/stat.t b/lib/File/stat.t
index 641cfadef3..51002716a3 100644
--- a/lib/File/stat.t
+++ b/lib/File/stat.t
@@ -52,12 +52,16 @@ my (undef, $file) = tempfile();
}
sub test_X_ops {
- my ($file, $desc_tail) = @_;
+ my ($file, $desc_tail, $skip) = @_;
my @stat = CORE::stat $file;
my $stat = File::stat::stat($file);
isa_ok($stat, 'File::stat', 'should build a stat object');
for my $op (split //, "rwxoRWXOezsfdlpSbcugkMCA") {
+ if ($skip && $op =~ $skip) {
+ note("Not testing -A $desc_tail");
+ next;
+ }
for my $access ('', 'use filetest "access";') {
my ($warnings, $awarn, $vwarn, $rv);
my $desc = $access
@@ -121,7 +125,8 @@ SKIP: {
-e $^X && -x $^X or skip "$^X is not present and executable", 4;
$^O eq "VMS" and skip "File::stat ignores VMS ACLs", 4;
- test_X_ops($^X, "for $^X");
+ # Other tests running in parallel mean that $^X is read, updating its atime
+ test_X_ops($^X, "for $^X", qr/A/);
}