This is an archive of the discontinued LLVM Phabricator instance.

[llvm-objcopy] Add additional testing for various cases
ClosedPublic

Authored by jhenderson on May 9 2019, 5:47 AM.

Diff Detail

Repository
rL LLVM

Event Timeline

jhenderson created this revision.May 9 2019, 5:47 AM
jhenderson updated this revision to Diff 198805.May 9 2019, 6:00 AM

Add one more test case for overlapping sections inside segments.

MaskRay added inline comments.May 9 2019, 6:34 AM
test/tools/llvm-objcopy/ELF/common-suffix-string-tables.test
22

Indent the output as other tests do?

test/tools/llvm-objcopy/ELF/invalid-e_phoff.test
16

'r+b' if you want to make it work on Python 3 as well though.

jhenderson updated this revision to Diff 198813.May 9 2019, 6:53 AM
jhenderson marked 2 inline comments as done.

Address review comments:

  • Use extra indentation
  • Use r+b for python binary editing
MaskRay added inline comments.May 9 2019, 7:02 PM
test/tools/llvm-objcopy/ELF/common-suffix-string-tables.test
3

It is tail merge, not substring merge.

69

Add another section to make tail merging clear? e.g. .a.b.c .b.c .c

test/tools/llvm-objcopy/ELF/strip-sections.test
39

Nit: # -> # .

jhenderson marked 3 inline comments as done.

Address review comments:

  • Add extra spacing.
  • Rename tail merging test/update comments.
  • Add extra symbol and section to tail merging test.
  • Remove unnecessary switches from tail merging test.
MaskRay accepted this revision.May 10 2019, 5:09 AM
This revision is now accepted and ready to land.May 10 2019, 5:09 AM
This revision was automatically updated to reflect the committed changes.
thakis added a subscriber: thakis.Apr 5 2020, 6:32 AM
thakis added inline comments.
llvm/trunk/test/tools/llvm-objcopy/ELF/shared-strtab-shstrtab.s
63 ↗(On Diff #199006)

This makes the test fail if "foo" is a substring of the path of your build dir. Could you make this more robust against accidentally matching the directory name?

jhenderson marked an inline comment as done.Apr 6 2020, 6:10 AM
jhenderson added inline comments.
llvm/trunk/test/tools/llvm-objcopy/ELF/shared-strtab-shstrtab.s
63 ↗(On Diff #199006)

See D77546.