[PATCH] D64290: [tools] [llvm-nm] Default to reading from stdin not a.out

Alex Brachet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 9 18:25:10 PDT 2019


abrachet marked 4 inline comments as done.
abrachet added inline comments.


================
Comment at: llvm/test/tools/llvm-nm/stdin.test:12
+## Make sure there is no warning message about no file redirected to stdin.
+# RUN: not grep "warning: can't read from keyboard input." %t.base
+
----------------
jhenderson wrote:
> This isn't what you want:
> 
> a) grep is deprecated in lit tests. Use FileCheck CHECK-NOT/--implicit-check-not.
> b) warnings should be printed to stderr, not stdout, so you're searching the wrong place.
> 
> You want something like:
> 
> ```
> # RUN: llvm-nm %t.o > %t.base 2> %t.err
> # RUN: FileCheck %s --input-file=%t.err --allow-empty --implicit-check-not={{.}}
> ```
> 
> You'll want to add the same check to each of the different test cases.
Thanks a lot!


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

https://reviews.llvm.org/D64290





More information about the llvm-commits mailing list