[PATCH] D63090: [objcopy] Error when --preserve-dates is specified with standard streams

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 11 01:56:03 PDT 2019


jhenderson added inline comments.


================
Comment at: llvm/test/tools/llvm-objcopy/ELF/invalid-preserve-dates.test:1
+# RUN: not llvm-objcopy --preserve-dates - %t 2>&1 | FileCheck %s
+# RUN: not llvm-objcopy --preserve-dates %p/Inputs/alloc-symtab.o - 2>&1 | FileCheck %s
----------------
A brief explanation at the start of the file as to what this test file is covering would be useful.


================
Comment at: llvm/test/tools/llvm-objcopy/ELF/invalid-preserve-dates.test:4
+
+# Testing N args
+# RUN: not llvm-strip --preserve-dates - < %p/Inputs/alloc-symtab.o 2>&1 | FileCheck %s
----------------
Add a full stop to the end of comments, and use '##' to indicate they are comments for new tests.


================
Comment at: llvm/test/tools/llvm-objcopy/ELF/invalid-preserve-dates.test:7
+# RUN: not llvm-strip --preserve-dates %p/Inputs/alloc-symtab.o - < \
+# RUN: %p/Inputs/alloc-symtab.o 2>&1 | FileCheck %s
+# RUN: not llvm-strip --preserve-dates - %p/Inputs/alloc-symtab.o < \
----------------
I find it easier to read if the follow-on lines are indented for a long RUN command like this:

```
# RUN: not llvm-strip --preserve-dates %p/Inputs/alloc-symtab.o - < \
# RUN:   %p/Inputs/alloc-symtab.o 2>&1 | FileCheck %s
```
Depending on the length of the main command, it is often easier to reflow the lines at the end of a command too:

```
# RUN: not llvm-strip --preserve-dates %p/Inputs/alloc-symtab.o - < %p/Inputs/alloc-symtab.o 2>&1 \
# RUN:   | FileCheck %s
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63090/new/

https://reviews.llvm.org/D63090





More information about the llvm-commits mailing list