I was seeing failing tests in my builds due to another process (in my
case, antivirus) changing the access time of files during the tests,
so tests using touch -a were failing.
This change modifies how we check if a system has consistent atime. We
have a list of platforms where we know these tests don't work (NetBSD,
Windows) with their existing reasons documented.
On other platforms, we do the same check that some of the tests
themselves end up doing: set the atime using touch, and then check it
was preserved with ls. I have found this check to be robust on my
system, but it's relying on the process updating the atime to race
with the process reading the atime, so it may not be as robust as we
want. Only if the check is successful, then you get a consistent-atime
feature which you can make your test REQUIRE.
This updates all existing tests which mention atime or use touch -a to
REQUIRE: consistent-atime, fixing their flakiness.