[llvm] a680ea2 - Fix "last accessed time" test failing on Windows

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 13:03:23 PDT 2020


Author: Alexandre Ganea
Date: 2020-08-10T16:03:14-04:00
New Revision: a680ea2c720751a3d724fd8282515924acb3bd32

URL: https://github.com/llvm/llvm-project/commit/a680ea2c720751a3d724fd8282515924acb3bd32
DIFF: https://github.com/llvm/llvm-project/commit/a680ea2c720751a3d724fd8282515924acb3bd32.diff

LOG: Fix "last accessed time" test failing on Windows

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

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/llvm/test/tools/llvm-objcopy/ELF/strip-preserve-atime.test b/llvm/test/tools/llvm-objcopy/ELF/strip-preserve-atime.test
index f23ece4d4455..b145599d9ff3 100644
--- a/llvm/test/tools/llvm-objcopy/ELF/strip-preserve-atime.test
+++ b/llvm/test/tools/llvm-objcopy/ELF/strip-preserve-atime.test
@@ -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


        


More information about the llvm-commits mailing list