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

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 16 10:56:08 PDT 2018


rupprecht marked 3 inline comments as done.
rupprecht added inline comments.


================
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:
> rupprecht wrote:
> > 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.
> Yeah, I don't really know either. If it starts causing flakiness, we might just want to sacrifice that part of the test, and just verify it manually...
So, apparently windows is fine with "ls -lu" etc., but barfs on the parens used to pipe several commands to FileCheck

```
$ "C:\src\clang\bin\llvm-strip.EXE" "-p" "C:\src\clang\test\tools\llvm-objcopy\Output\strip-preserve-time.test.tmp.1.o" "-o" "C:\src\clang\test\tools\llvm-objcopy\Output\strip-preserve-time.test.tmp-preserved.1.o"
$ ":" "RUN: at line 8"
$ "(ls" "-lu" "C:\src\clang\test\tools\llvm-objcopy\Output\strip-preserve-time.test.tmp-preserved.1.o"
# command stderr:
'(ls': command not found
error: command failed with exit status: 127
```

Splitting it into two with different access/modify time check-prefixes seems to work.


Repository:
  rL LLVM

https://reviews.llvm.org/D50744





More information about the llvm-commits mailing list