This is an archive of the discontinued LLVM Phabricator instance.

[lld test] Tighten ELF/pre_init_fini_array.s test
ClosedPublic

Authored by thopre on Mar 26 2020, 7:53 AM.

Details

Summary

Make use of FileCheck numeric variable to tighten symbol address checks
in ELF/pre_init_fini_array.s test.

Diff Detail

Event Timeline

thopre created this revision.Mar 26 2020, 7:53 AM
thopre updated this revision to Diff 252877.Mar 26 2020, 9:16 AM

Incorporate DISASM improvements from D75631

Thanks for the improvement. This is definitely more robust. llvm-readobj's section/symbol dump is known to be verbose. llvm-readelf -S -s is conciser/better. Can you check whether the new FileCheck feature (D60389 https://llvm.org/docs/CommandGuide/FileCheck.html#filecheck-numeric-substitution-blocks) help with llvm-readelf -S -s output?

Looks good from my perspective. I'll leave it up to @MaskRay to approve once you've taken a look at his suggestion.

thopre updated this revision to Diff 253118.Mar 27 2020, 7:40 AM

Use readelf instead of readobj

MaskRay accepted this revision.Mar 27 2020, 11:16 AM

Looks great!

lld/test/ELF/pre_init_fini_array.s
6–7

-S --dynamic -r -s (or -S -d -r -s) is better because the option order matches the output order.

30–34

Section Headers:

47

Value is misaligned.

This revision is now accepted and ready to land.Mar 27 2020, 11:16 AM
thopre updated this revision to Diff 253225.Mar 27 2020, 2:43 PM
thopre marked 3 inline comments as done.

Address last set of comments

This revision was automatically updated to reflect the committed changes.