[PATCH] D97664: [llvm-objcopy][test] Fix test that could have passed spuriously

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 4 02:59:03 PST 2021


jhenderson added inline comments.


================
Comment at: llvm/test/tools/llvm-objcopy/ELF/strip-unneeded-all-symbols.test:14
   Data:     ELFDATA2LSB
   Type:     ET_EXEC
   Machine:  EM_X86_64
----------------
MaskRay wrote:
> If I change `ET_EXEC` to `ET_REL`, the test fails as intended.
> 
> Adding more tests is fine. Perhaps we need two tests (use something like `Type: [[type]]`).
I can add a test case here that shows the same input (but ET_REL instead) does produce a symbol table, if you want, to act as a validity test, but that overlaps other tests (see for example strip-unneeded.test). I think there is some benefit still, because it ensures the CHECK-NOT with no other checks is somewhat safe.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97664



More information about the llvm-commits mailing list