[PATCH] D144638: [lit] Detect Consistent File Access Times
Sam Elliott via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 23 04:12:42 PST 2023
lenary created this revision.
Herald added subscribers: pmatos, asb, ormris, steven_wu, delcypher, hiraditya, sbc100, emaste.
Herald added a reviewer: alexander-shaposhnikov.
Herald added a reviewer: jhenderson.
Herald added projects: lld-macho, All.
Herald added a reviewer: lld-macho.
lenary requested review of this revision.
Herald added subscribers: llvm-commits, cfe-commits, MaskRay, aheejin.
Herald added projects: clang, LLVM.
I was seeing flaky tests in my builds due to another process (in my
case, antivirus) modifying the access time of files during the tests,
so those tests using `touch -a` were failing.
This change modifies how we check if a system has consistent atime.
Instead of a list of platforms where we know things might not work, we
instead perform a check similar to the ones used in the tests, but on a
temporary file. 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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D144638
Files:
clang/test/Modules/prune.m
lld/test/COFF/lto-cache.ll
lld/test/ELF/lto/cache.ll
lld/test/MachO/lto-cache.ll
lld/test/wasm/lto/cache.ll
llvm/test/ThinLTO/X86/cache.ll
llvm/test/tools/llvm-objcopy/ELF/strip-preserve-atime.test
llvm/utils/lit/lit/llvm/config.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144638.499806.patch
Type: text/x-patch
Size: 4944 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230223/ed51bac8/attachment.bin>
More information about the llvm-commits
mailing list