On Thu, Dec 17, 2015 at 02:41:30AM +0000, Steven Chamberlain wrote: > The problem is with mtime. It seems to be not calculated immediately, > but deferred until the next stat, after the hard link is created, such > that mtime=ctime and so the test fails. A stat() right before the > sleep, or a much longer sleep (~30s), causes mtime to be calculated > earlier and so fixes it. > > It's obviously a kernel behaviour, its unclear if it's a bug (it may be > an expected quirk of softupdates), and in any case definitely not a Perl > bug. Might we please add a stat() to work around it, as attached; that > would allow the test to still run, and still return a meaningful result > rather than skipping/ignoring the test on kfreebsd.
Thanks. I've modified this to only call the added stat() on kfreebsd and applied it. Will upload soon so kfreebsd-* can join the binNMU party. It would be nice if you could follow up when you know if this is a permanent thing that should go upstream or just a temporary workaround. -- Niko Tyni nt...@debian.org
>From 78c55bc50e62a3371bdf14eb02882d833738a165 Mon Sep 17 00:00:00 2001 From: Steven Chamberlain <ste...@pyro.eu.org> Date: Thu, 17 Dec 2015 02:15:58 +0000 Subject: Work around Debian Bug#796798 kFreeBSD 10 (possibly only with softupdates enabled) may defer calculating the mtime for more than 2 seconds. Work around this with a stat() call to calculate the mtime immediately. (Modified to only stat() on kfreebsd by Niko Tyni) Bug-Debian: https://bugs.debian.org/796798 Patch-Name: debian/kfreebsd-softupdates.diff --- t/op/stat.t | 1 + 1 file changed, 1 insertion(+) diff --git a/t/op/stat.t b/t/op/stat.t index ad94b3f..469f8ba 100644 --- a/t/op/stat.t +++ b/t/op/stat.t @@ -96,6 +96,7 @@ sleep 3 if $funky_FAT_timestamps; print FOO "Now is the time for all good men to come to.\n"; close(FOO); +stat($tmpfile) if $^O =~ /^gnukfreebsd/; # Work around Debian Bug#796798 sleep 2; my $has_link = 1;