[PATCH] D72357: Fix llvm-objcopy when directory contains "bar".
Jordan Rupprecht via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 7 14:06:29 PST 2020
rupprecht 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
----------------
MaskRay wrote:
> MaskRay wrote:
> > 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`.
> I'd like to hear @jhenderson what wants to say here.
When you say it's inconvenient, can you clarify why?
The practice of using piping to avoid the filename present is documented here, albeit for a different tool (opt instead of llvm-readobj): http://llvm.org/docs/TestingGuide.html#fragile-tests
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