llvm-objcopy/strip now error when -p is specified when reading from stdin or writing to stdout
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/test/tools/llvm-objcopy/ELF/invalid-preserve-dates.test | ||
---|---|---|
8 | These lines were getting very long. I tried to split it up with '\' but it didn't work. Is there another way to do this or is it fine to have very long lines? | |
llvm/tools/llvm-objcopy/CopyConfig.cpp | ||
743 | I switched this to StringRef so std::find isn't comparing pointers |
llvm/test/tools/llvm-objcopy/ELF/invalid-preserve-dates.test | ||
---|---|---|
8 | You should be able to use \. Maybe you forgot to start the continuation line with RUN:? That's what was happening to me when I couldn't get it to work. See bad-output-format.test as an example. There's no rule for short lines in tests, but when they get too long (>100 columns), I find it more readable to split them up around 80 columns. |
llvm/test/tools/llvm-objcopy/ELF/invalid-preserve-dates.test | ||
---|---|---|
8 | Yup, that's what I was missing. Thanks, Jordan! |
llvm/test/tools/llvm-objcopy/ELF/invalid-preserve-dates.test | ||
---|---|---|
2 | A brief explanation at the start of the file as to what this test file is covering would be useful. | |
5 | Add a full stop to the end of comments, and use '##' to indicate they are comments for new tests. | |
8 | 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 |
Added a comment to test case explaining its purpose. Also reformatted long RUN: lines.
A brief explanation at the start of the file as to what this test file is covering would be useful.