Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

accesstime (atime) does not work reliably on MacOs #64908

Closed
hiraditya opened this issue Aug 22, 2023 · 7 comments
Closed

accesstime (atime) does not work reliably on MacOs #64908

hiraditya opened this issue Aug 22, 2023 · 7 comments

Comments

@hiraditya
Copy link
Collaborator

hiraditya commented Aug 22, 2023

ninja check-llvm-tools-llvm-objcopy sometimes passes and sometimes fails on llvm-project/llvm/test/tools/llvm-objcopy/ELF/strip-preserve-atime.test

I ran the test manually and it behaves weird many times. Even if touch -at works correctly, by the time next command runs the access time changes under the hood.

macbookpro:stage2  touch -a -t 199505050555.55 /Users/g/llvm-toolchain/out/stage2/test/tools/llvm-objcopy/ELF/Output/strip-preserve-atime.test.tmp-input.dwo
macbookpro:stage2  ls -lu /Users/g/llvm-toolchain/out/stage2/test/tools/llvm-objcopy/ELF/Output/strip-preserve-atime.test.tmp-input.dwo
-rw-r--r--  1  primarygroup  3568 May  5  1995 /Users/g/llvm-toolchain/out/stage2/test/tools/llvm-objcopy/ELF/Output/strip-preserve-atime.test.tmp-input.dwo
macbookpro:stage2  /Users/g/llvm-toolchain/out/stage2/bin/llvm-objcopy -p --split-dwo=/Users/g/llvm-toolchain/out/stage2/test/tools/llvm-objcopy/ELF/Output/strip-preserve-atime.test.tmp-dwo /Users/g/llvm-toolchain/out/stage2/test/tools/llvm-objcopy/ELF/Output/strip-preserve-atime.test.tmp-input.dwo /Users/g/llvm-toolchain/out/stage2/test/tools/llvm-objcopy/ELF/Output/strip-preserve-atime.test.tmp-nondwo
macbookpro:stage2  ls -lu /Users/g/llvm-toolchain/out/stage2/test/tools/llvm-objcopy/ELF/Output/strip-preserve-atime.test.tmp-dwo /Users/g/llvm-toolchain/out/stage2/test/tools/llvm-objcopy/ELF/Output/strip-preserve-atime.test.tmp-input.dwo /Users/g/llvm-toolchain/out/stage2/test/tools/llvm-objcopy/ELF/Output/strip-preserve-atime.test.tmp-nondwo
-rw-r--r--  1  primarygroup   904 Aug 22 15:31 /Users/g/llvm-toolchain/out/stage2/test/tools/llvm-objcopy/ELF/Output/strip-preserve-atime.test.tmp-dwo
-rw-r--r--  1  primarygroup  3568 Aug 22 15:31 /Users/g/llvm-toolchain/out/stage2/test/tools/llvm-objcopy/ELF/Output/strip-preserve-atime.test.tmp-input.dwo
-rw-r--r--  1  primarygroup  2880 Aug 22 15:31 /Users/g/llvm-toolchain/out/stage2/test/tools/llvm-objcopy/ELF/Output/strip-preserve-atime.test.tmp-nondwo
macbookpro:stage2  
@hiraditya hiraditya added the llvm-tools All llvm tools that do not have corresponding tag label Aug 22, 2023
@hiraditya
Copy link
Collaborator Author

I guess the fix here is to disable this test on darwin?

@EugeneZelenko EugeneZelenko added tools:llvm-objcopy/strip and removed llvm-tools All llvm tools that do not have corresponding tag new issue labels Aug 22, 2023
@llvmbot
Copy link
Collaborator

llvmbot commented Aug 22, 2023

@llvm/issue-subscribers-tools-llvm-objcopy-strip

@hiraditya
Copy link
Collaborator Author

Disabling the test for darwin: https://reviews.llvm.org/D158560

@bogner
Copy link
Contributor

bogner commented Aug 23, 2023

This test is largely unchanged since it's introduction in 2018 and I've never seen it fail, so I'm not really convinced that the claim that atime doesn't work reliably on macOS is accurate. Is there maybe something more specific about your setup that could explain this?

@hiraditya
Copy link
Collaborator Author

I'm using Mac M1 machine and it fails during local testing.

@bogner
Copy link
Contributor

bogner commented Aug 25, 2023

Okay... I am also on a Mac M1 machine and it doesn't fail. I've been running LLVM tests frequently on various different macs since before these tests were introduced and I've never seen these tests fail. I don't think it makes sense to disable this test for darwin unless the issue you're running into is understood (or if there's evidence that it's widespread)

@hiraditya
Copy link
Collaborator Author

can't reproduce it reliably. closing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants