From: Raphael Manfredi Date: Fri, 5 Jan 2001 13:46:51 +0000 (+0100) Subject: PATCH 5.6.1 & blead 8327 -- workaround for t/io/fs.t X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=da93fe491e8210a24aa55692fcf9bd1ee38f118b;p=p5sagit%2Fp5-mst-13.2.git PATCH 5.6.1 & blead 8327 -- workaround for t/io/fs.t Message-ID: <13693.978698811@nice.ram.loc> Apparently, the glibc2.2 + linux 2.4.0 + NFS combination prevent accurate reading of the "atime". p4raw-id: //depot/perl@8334 --- diff --git a/t/io/fs.t b/t/io/fs.t index b401450..8170b33 100755 --- a/t/io/fs.t +++ b/t/io/fs.t @@ -115,7 +115,15 @@ if ($wd =~ m#/afs/# || $^O eq 'amigaos' || $^O eq 'dos' || $^O eq 'MSWin32') {print "ok 18 # skipped: granularity of the filetime\n";} elsif ($atime == 500000000 && $mtime == 500000000 + $delta) {print "ok 18\n";} -else +elsif ($^O =~ /\blinux\b/i) { + # Maybe stat() cannot get the correct atime, as happens via NFS on linux? + $foo = (utime 400000000,500000000 + 2*$delta,'b'); + my ($new_atime, $new_mtime) = (stat('b'))[8,9]; + if ($new_atime == $atime && $new_mtime - $mtime == $delta) + {print "ok 18 # accounted for possible NFS/glibc2.2 bug on linux\n";} + else + {print "not ok 18 $atime/$new_atime $mtime/$new_mtime\n";} +} else {print "not ok 18 $atime $mtime\n";} if ((unlink 'b') == 1) {print "ok 19\n";} else {print "not ok 19\n";}