diff options
author | John P. Linderman <jpl@research.att.com> | 2007-11-27 08:50:14 -0500 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2008-06-15 16:27:21 +0000 |
commit | 67fcfcf925ad6e090531534c8a74692e86eebc4c (patch) | |
tree | 2f0eceef8d01d5addb9227a19a4a439cf10791d8 /t/op/stat.t | |
parent | 49c95d583ee26e3f8629868ab6da323b7c424640 (diff) | |
download | perl-67fcfcf925ad6e090531534c8a74692e86eebc4c.tar.gz |
[perl #47746] Not OK: perl 5.10.0 +RC1 on ia64-linux 2.4.21-sgi302r24
From: "John P. Linderman" <jpl@research.att.com>
Message-Id: <200711271850.lARIoEfN14794612@raptor.research.att.com>
p4raw-id: //depot/perl@34056
Diffstat (limited to 't/op/stat.t')
-rwxr-xr-x | t/op/stat.t | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/t/op/stat.t b/t/op/stat.t index dbddaef654..d238855c89 100755 --- a/t/op/stat.t +++ b/t/op/stat.t @@ -50,6 +50,10 @@ open(FOO, ">$tmpfile") || DIE("Can't open temp test file: $!"); my($nlink, $mtime, $ctime) = (stat(FOO))[$NLINK, $MTIME, $CTIME]; +# The clock on a network filesystem might be different from the +# system clock. +my $Filesystem_Time_Offset = abs($mtime - time); + #nlink should if link support configured in Perl. SKIP: { skip "No link count - Hard link support not built in.", 1 @@ -453,20 +457,24 @@ SKIP: { unlink $linkname or print "# unlink $linkname failed: $!\n"; } -print "# Zzz...\n"; -sleep(3); -my $f = 'tstamp.tmp'; -unlink $f; -ok (open(S, "> $f"), 'can create tmp file'); -close S or die; -my @a = stat $f; -print "# time=$^T, stat=(@a)\n"; -my @b = (-M _, -A _, -C _); -print "# -MAC=(@b)\n"; -ok( (-M _) < 0, 'negative -M works'); -ok( (-A _) < 0, 'negative -A works'); -ok( (-C _) < 0, 'negative -C works'); -ok(unlink($f), 'unlink tmp file'); +SKIP: { + skip "Too much clock skew between system and filesystem", 5 + if ($Filesystem_Time_Offset > 5); + print "# Zzz...\n"; + sleep($Filesystem_Time_Offset+1); + my $f = 'tstamp.tmp'; + unlink $f; + ok (open(S, "> $f"), 'can create tmp file'); + close S or die; + my @a = stat $f; + print "# time=$^T, stat=(@a)\n"; + my @b = (-M _, -A _, -C _); + print "# -MAC=(@b)\n"; + ok( (-M _) < 0, 'negative -M works'); + ok( (-A _) < 0, 'negative -A works'); + ok( (-C _) < 0, 'negative -C works'); + ok(unlink($f), 'unlink tmp file'); +} { ok(open(F, ">", $tmpfile), 'can create temp file'); |