[PATCH] D50744: [llvm-strip] Add support for -p/--preserve-dates

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 15 10:06:24 PDT 2018


rupprecht added inline comments.


================
Comment at: test/tools/llvm-objcopy/strip-preserve-time.test:1
+# Note: ls -lu prints the accessed timestamp, ls -l prints the modified timestamp
+
----------------
jhenderson wrote:
> Have you run this test both on Windows and Linux to ensure the they work the same? I know a colleague had some issues with access times on Windows at one point, for example.
I don't have access to a Windows machine, but I'll ask a coworker to patch it and take a look.

I'd actually rather use stat if this is linux-only, but I assume that ls is more portable.


================
Comment at: test/tools/llvm-objcopy/strip-preserve-time.test:5
+# RUN: yaml2obj %s > %t.o
+# RUN: touch -a -t 199505050555.55 %t.o
+# RUN: touch -m -t 199705050555.55 %t.o
----------------
jhenderson wrote:
> I'm slightly worried that this might lead to a flaky test, because there's a race condition here: if another process accesses the file some time between file creation and checking, then we'll presumably get a failure (and I could see a virus scanner doing just that...).
I'm not sure if there's a good solution for this. At the very least, I can watch build bots once this is submitted to see if this test causes flakiness. Very little time goes by between file creation and running llvm-strip, so it _probably_ won't cause issues, but I don't know how virus scanners work.


Repository:
  rL LLVM

https://reviews.llvm.org/D50744





More information about the llvm-commits mailing list