[PATCH] D153219: [symbolizer] Exit early if input file is absent

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 26 09:54:23 PDT 2023


MaskRay added inline comments.


================
Comment at: llvm/test/tools/llvm-symbolizer/pdb/missing_pdb.test:1
-RUN: llvm-symbolizer 0x401000 0x401001 --obj="%p/Inputs/missing_pdb.exe" 2>%t.err \
-RUN:    | FileCheck %s
-RUN: FileCheck -DMSG=%errc_ENOENT --check-prefix=ERROR %s < %t.err
+RUN: not llvm-symbolizer 0x401000 0x401001 --obj="%p/Inputs/missing_pdb.exe" 2>%t.err
+RUN: FileCheck -DMSG=%errc_ENOENT %s < %t.err
----------------
sepavloff wrote:
> jhenderson wrote:
> > I think the point of this test was (in part) to show llvm-symbolizer's stdout output too. If that is now empty, you should check that explicitly.
> Previously the error message went to stderr, and the result of recognition to stdout. Now only error message presents. Attempt to feed empty stream to FileCheck results in error: `FileCheck error: '<stdin>' is empty`.
If we want to explicitly test that stdout output is empty, we can use:
```
not llvm-symbolizer ... 2> %t.err | count 0
FileCheck --input-file=%t.err
```



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153219



More information about the llvm-commits mailing list