[PATCH] D73686: [llvm-readobj][test] - Cleanup testing of the --sections command line option.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 30 02:44:05 PST 2020


grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added subscribers: rupprecht, atanasyan, arichardson, sdardis, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.

We have the `ELF\sections.test` to test --sections.

`ELF\sections.test` uses precompiled objects, it has a bug (does not test -s alias properly).
Also, we test machine specific section types in `ELF\machine-specific-section-types.test`,
so we probably do not need to test `--sections` for a MIPS object in `ELF\sections.test`.
I think it is enough to test ELF32 and ELF64 (we do not test ELF64 in this test).

`Object/readobj-shared-object.test` also tests how llvm-readobj handles
`--sections`. It is location is wrong, it is not complete, it uses precompiled binaries
and it duplicates the `ELF\sections.test` partially (it tests both ELF32 and ELF64).

We have `ELF\readelf-s-alias.test` that tests the `-s` alias for `--sections` in llvm-readobj
and `-s` as an alias for `--symbols` in llvm-readelf.
There is no need to have a separate test for such things.
The test for the `-s` alias for `--sections` can be included into the `ELF\sections.test`.
And the test for `-s` for llvm-readelf is already included into `ELF\symbols.test`.

So, this patch:

1. Removes `Object/readobj-shared-object.test`.
2. Removes `ELF\readelf-s-alias.test`
3. Rewrites the `ELF\sections.test`.
4. Removes ELF/Inputs/trivial.obj.elf-mipsel.


https://reviews.llvm.org/D73686

Files:
  llvm/test/Object/readobj-shared-object.test
  llvm/test/tools/llvm-readobj/ELF/Inputs/trivial.obj.elf-mipsel
  llvm/test/tools/llvm-readobj/ELF/readelf-s-alias.test
  llvm/test/tools/llvm-readobj/ELF/sections.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73686.241380.patch
Type: text/x-patch
Size: 10100 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200130/82a1e8b2/attachment.bin>


More information about the llvm-commits mailing list