[PATCH] D72313: [llvm-symbolizer]Fix printing of malformed address values not passed via stdin
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 7 03:04:28 PST 2020
jhenderson added inline comments.
================
Comment at: llvm/test/tools/llvm-symbolizer/Inputs/response_addr.txt:2
+"some text" 0x40054d "some text2"
\ No newline at end of file
----------------
TH3CHARLie wrote:
> I'll update a newline here
A more appropriate thing to do is have these tests generate their input files on the fly with something like the following:
```
# RUN: echo "some text" 0x40054d "some text2" > %t.rsp
# RUN: llvm-symbolizer @%t.rsp ...
```
A similar pattern can be used for the stdin reading.
(note: I'm not sure if those quotes will appear in the output or not - you'd best double-check that).
================
Comment at: llvm/test/tools/llvm-symbolizer/sym.test:21-22
RUN: llvm-symbolizer -print-address -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
+RUN: llvm-symbolizer -print-address -obj=%p/Inputs/addr.exe "some text" 0x40054d "some text2" | FileCheck %s
+RUN: llvm-symbolizer -print-address -obj=%p/Inputs/addr.exe @%p/Inputs/response_addr.txt | FileCheck %s
RUN: llvm-symbolizer -addresses -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
----------------
If you're adding the test cases in a new test, you don't need these cases in this test too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72313/new/
https://reviews.llvm.org/D72313
More information about the llvm-commits
mailing list