[PATCH] D62973: [llvm-objcopy] Changed command line parsing errors

Jordan Rupprecht via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 6 15:37:36 PDT 2019


rupprecht accepted this revision.
rupprecht added a comment.
This revision is now accepted and ready to land.

I'm good with this after these two comments:



================
Comment at: llvm/test/tools/llvm-objcopy/ELF/invalid-preserve-dates.test:2
+# RUN: not llvm-objcopy --preserve-dates - %t < %p/Inputs/alloc-symtab.o
+# CHECK: error: --preserve-dates requires a file
+
----------------
This actually isn't being run because there is no FileCheck command above. The commands should be like:

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


================
Comment at: llvm/test/tools/llvm-objcopy/ELF/invalid-preserve-dates.test:4
+
+# RUN: not llvm-objcopy --preserve-dates %p/Inputs/alloc-symtab.o - 
+# CHECK: error: --preserve-dates requires a file
----------------
Can you add some cases for strip?

```
# Testing N args
not llvm-strip --preserve-dates -
not llvm-strip --preserve-dates %p/Inputs/alloc-symtab.o -
not llvm-strip --preserve-dates - %p/Inputs/alloc-symtab.o
not llvm-strip --preserve-dates %p/Inputs/alloc-symtab.o - %p/Inputs/alloc-symtab.o

# Testing -o
not llvm-strip --preserve-dates - -o %p/Inputs/alloc-symtab.o
not llvm-strip --preserve-dates %p/Inputs/alloc-symtab.o -o -
```
(and others if you think of any)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D62973





More information about the llvm-commits mailing list