This is an archive of the discontinued LLVM Phabricator instance.

[llvm-readelf][test] - Refine the sections-ext.test
ClosedPublic

Authored by grimar on Aug 24 2020, 7:59 AM.

Details

Summary

The sections-ext.test is a test for ELF that is used
to test --st, --sr and --sd extension options for -S.

There are 2 problems with it:

  1. It is broken, because for CHECK lines it contains there is

no corresponding FileCheck call.

  1. It uses the precompiled object: trivial.obj.elf-i386.

This is the last ELF test where trivial.obj.elf-i386 is used so we can get rid of the binary
and use an YAML description.

Also, there is a Inputs/trivial.ll file that describes how trivial* objects
in Inputs folders are created. I've removed it from ELF, because it is not
actual anymore (we have no more input binaries created with the use of trivial.ll there)
and copied the refined versions of it to COFF, MachO and wasm Input folders.

Diff Detail

Event Timeline

grimar created this revision.Aug 24 2020, 7:59 AM
grimar requested review of this revision.Aug 24 2020, 7:59 AM
MaskRay added inline comments.Aug 24 2020, 11:14 AM
llvm/test/tools/llvm-readobj/ELF/sections-ext.test
192

Can the three RUN lines be combined into one?

jhenderson added inline comments.Aug 25 2020, 12:24 AM
llvm/test/tools/llvm-readobj/ELF/sections-ext.test
6–10
12–16
18–23
192

They are combined into one (see the line above). I don't think we need the individual versions personally.

grimar updated this revision to Diff 287603.Aug 25 2020, 2:43 AM
grimar marked 5 inline comments as done.
  • Addressed review comments.
llvm/test/tools/llvm-readobj/ELF/sections-ext.test
192

I don't think we need the individual versions personally.

These are independent options still, even when we test them in a "3 in 1" test.
I can easily imagine a broken code which will fail or crash or leave uncovered places or whatever with
one of options, but not with 3. It is just safer to cover them independently. So, I'd keep all of them.

Other than the inline comment, LG

llvm/test/tools/llvm-readobj/ELF/sections-ext.test
192

The 3 options extend --sections and do independent things. I still feel that one 3-in-1 RUN line is sufficient...

jhenderson accepted this revision.Aug 26 2020, 12:01 AM

LGTM. I don't care strongly either way with regards to the 3-in-1 RUN line thing.

This revision is now accepted and ready to land.Aug 26 2020, 12:01 AM
grimar marked an inline comment as done.Aug 26 2020, 4:06 AM
grimar added inline comments.
llvm/test/tools/llvm-readobj/ELF/sections-ext.test
192

OK, I'll remove.

This revision was automatically updated to reflect the committed changes.
grimar marked an inline comment as done.