This is an archive of the discontinued LLVM Phabricator instance.

[llvm-readobj] - Massive test cases cleanup.
ClosedPublic

Authored by grimar on Jul 31 2020, 3:01 AM.

Details

Summary

This patch does the following:

  1. Starts using YAML macro to reduce the number of YAML documents in tests.
  2. Adds # before 'RUN'/CHECK lines in a few tests where it is missing.
  3. Removes unused YAML keys.
  4. Starts using ENTSIZE=<none> to simplify tests (see D84526).
  5. Removes trailing white spaces in a few places.

Diff Detail

Event Timeline

grimar created this revision.Jul 31 2020, 3:01 AM
jhenderson added inline comments.Aug 3 2020, 1:42 AM
llvm/test/tools/llvm-readobj/ELF/dependent-libraries.test
37
llvm/test/tools/llvm-readobj/ELF/dynamic-table-dtnull.s
17–18

You might want to remove all the extra spacing in this YAML too.

llvm/test/tools/llvm-readobj/ELF/hidden-versym.test
9–10

You could probably clean up some of the spacing in this file too, if you want.

llvm/test/tools/llvm-readobj/ELF/merged.test
10

Nit: # RUN:

llvm/test/tools/llvm-readobj/ELF/packed-relocs.test
29–30

Spacing clean-up?

llvm/test/tools/llvm-readobj/ELF/reloc-symbol-with-versioning.test
23–24

Spacing clean-up?

23–24

Seems like you should be able to improve this YAML further by removing extra keys/replacing them with direct section name references etc? Same goes with .rela.plt below too.

grimar updated this revision to Diff 282565.Aug 3 2020, 3:22 AM
grimar marked 4 inline comments as done.
  • Addressed review comments.
llvm/test/tools/llvm-readobj/ELF/reloc-symbol-with-versioning.test
23–24

I was able to simplify the YAML below, but I see nothing I can do for this place.
Note, that "Info" here is a number of dependencies, not a section index.

jhenderson accepted this revision.Aug 3 2020, 3:48 AM

LGTM! Thanks for this.

This revision is now accepted and ready to land.Aug 3 2020, 3:48 AM
This revision was automatically updated to reflect the committed changes.