diff options
author | Raphael Manfredi <Raphael.Manfredi@pobox.com> | 2001-01-05 14:46:51 +0100 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-01-05 16:00:51 +0000 |
commit | da93fe491e8210a24aa55692fcf9bd1ee38f118b (patch) | |
tree | 9c63e650648c726588fd464e8818376e50d44afe /t/io | |
parent | 0f4a810e6257ab8b7f289b497394cfdff380e306 (diff) | |
download | perl-da93fe491e8210a24aa55692fcf9bd1ee38f118b.tar.gz |
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
Diffstat (limited to 't/io')
-rwxr-xr-x | t/io/fs.t | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -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";} |