lenary added a comment.

In D144638#4155217 <https://reviews.llvm.org/D144638#4155217>, @michaelplatings 
wrote:
> I see some of these tests previously had `UNSUPPORTED: system-netbsd` but not 
> `UNSUPPORTED: system-windows` - do you know why?

I'm not entirely sure why, but I have some ideas:

- rGa680ea2c720751a3d724fd8282515924acb3bd32 
<https://reviews.llvm.org/rGa680ea2c720751a3d724fd8282515924acb3bd32> disabled 
the llvm-objdump test - I don't quite know why it didn't disable the 
ThinLTO/x86/cache.ll test (which did exist at the time).
- rG929ce27cc77dd1fbf909ef4d42614eee9d11880e 
<https://reviews.llvm.org/rG929ce27cc77dd1fbf909ef4d42614eee9d11880e>, 
rG29935acdb10679f27f028cf9dff1971c839dc51d 
<https://reviews.llvm.org/rG29935acdb10679f27f028cf9dff1971c839dc51d>, and 
rG92dc7dce4a6f117a497ced1650bc48e5b658f0ea 
<https://reviews.llvm.org/rG92dc7dce4a6f117a497ced1650bc48e5b658f0ea> are the 
netbsd disables, which were done all approximately at the same time, across 
clang, llvm and lld.

It looks like the pruning logic for both LTO and Clang modules is the same, 
using `llvm::sys::fs::file_status::getLastAccessedTime()` (but, this of course 
has to use the underlying system information), which is:

- On windows, atime will be zero if unsupported: If the underlying file system 
does not support last access time, this member is zero. 
https://learn.microsoft.com/en-us/windows/win32/api/minwinbase/ns-minwinbase-win32_find_dataw
 which should be a long time in the past.
- The mac, netbsd and linux docs for `noatime` just say something to the effect 
of "the access time is never updated", not the value that it reads as if you 
have noatime.

I've actually just done a more thorough search, and there are other tests that 
use `touch -a` (a few in clang/test/PCH, some others in clang/test/Modules). I 
presume this comes down to logic as to whether the code uses 
`getLastAccessedTime` which seems to be used:

- in the modules cache prune logic (pruneModuleCache in 
clang/lib/Frontend/CompilerInstance.cpp)
- in the LTO cache pruning logic (llvm::pruneCache)
- in FileCollector, as used by Modules 
(llvm/include/llvm/Support/FileCollector.h)
- in FilePermissionsApplier, as used by llvm-dwarfutil and llvm-objcopy 
(declared in llvm/include/llvm/Support/FileUtilities.h)

I cannot really see any correlation between the logic under test, and the use 
of `touch -a` or `touch -a -m` vs just `touch`. I'm not sure what the right 
"fix" should be any more. I guess I'm just happy for everyone who is not 
running into this issue.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144638/new/

https://reviews.llvm.org/D144638

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to