Fix "last accessed time" test failing on Windows
authorAlexandre Ganea <alexandre.ganea@ubisoft.com>
Mon, 10 Aug 2020 20:03:03 +0000 (16:03 -0400)
committerAlexandre Ganea <alexandre.ganea@ubisoft.com>
Mon, 10 Aug 2020 20:03:14 +0000 (16:03 -0400)
Before this patch, the tests in llvm/test/tools/llvm-objcopy/ELF/strip-preserve-atime.test used to fail on my machine, because the "last accessed time" is disabled in the OS by default since Windows XP. One needs to explicitly enable it for the feature to work. Otherwise the last access time is the last write time. Please see: https://superuser.com/questions/251263/the-last-access-date-is-not-changed-even-after-reading-the-file-on-windows-7

    Differential Revision: https://reviews.llvm.org/D85669

llvm/test/tools/llvm-objcopy/ELF/strip-preserve-atime.test

index f23ece4..b145599 100644 (file)
@@ -1,6 +1,7 @@
 # Note: ls -lu prints the accessed timestamp
 # NetBSD: noatime mounts currently inhibit 'touch -a' updates
-# UNSUPPORTED: system-netbsd
+# Windows: the last access time is disabled by default in the OS
+# UNSUPPORTED: system-netbsd, system-windows
 
 # Preserve dates when stripping to an output file.
 # RUN: yaml2obj %s -o %t.1.o