[PATCH] D72357: Fix llvm-objcopy when directory contains "bar".

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 7 13:56:44 PST 2020


MaskRay added inline comments.


================
Comment at: llvm/test/tools/llvm-objcopy/ELF/only-section-strip-undefined.test:6
 # RUN: llvm-objcopy -j .other.section %t.o %t2.o
-# RUN: llvm-readobj --symbols %t2.o | FileCheck %s --implicit-check-not=bar
+# RUN: llvm-readobj --symbols %t2.o | FileCheck %s --implicit-check-not=barrr
 
----------------
`--implicit-check-not='Name: bar'`


================
Comment at: llvm/test/tools/llvm-objcopy/ELF/only-section-strip-undefined.test:6
 # RUN: llvm-objcopy -j .other.section %t.o %t2.o
-# RUN: llvm-readobj --symbols %t2.o | FileCheck %s --implicit-check-not=bar
+# RUN: llvm-readobj --symbols %t2.o | FileCheck %s --implicit-check-not=barrr
 
----------------
rupprecht wrote:
> MaskRay wrote:
> > `--implicit-check-not='Name: bar'`
> I assume the match you're getting is the first line from llvm-readobj:
> 
> ```
> File: /Users/jlebar/path/to/something.o
> Format: ELF64-x86-64
> Arch: x86_64
> AddressSize: 64bit
> ```
> 
> Piping from stdin will remove that filename; can you instead try:
> ```
> # RUN: llvm-readobj --symbols < %t2.o | FileCheck %s --implicit-check-not=bar
> ```
Using `< file` input redirection may leave us in a very inconvenient situation. Maybe we should just be more careful when using `--implicit-check-not`, instead of replacing every single use of `llvm-readobj %t` with `llvm-readobj < %t`.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D72357





More information about the llvm-commits mailing list