[PATCH] D76282: [obj2yaml] - SHT_REL*, SHT_DYNAMIC sections: add tests to document the behavior when sh_entsize is broken.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 19 03:11:35 PDT 2020


jhenderson accepted this revision.
jhenderson added a comment.

LGTM, with comment updates.



================
Comment at: llvm/test/tools/obj2yaml/dynamic-section.test:254
+
+## Document the current behavior when sh_entsize is invalid.
+## Here we use 0xFE as an arbitrary broken value instead of expected 0x16.
----------------
Maybe just change this comment to "Test the behavior when ..." since presumably when you fix it, you'll just update the test case.

Optionally then add a FIXME saying how it should change.


================
Comment at: llvm/test/tools/obj2yaml/rel-rela-section.yaml:35
+
+## Document the behavior when the sh_entsize field is broken.
+## Here we use the 0xFE value instead of expected 0x18/0x10.
----------------
Same as above.


================
Comment at: llvm/test/tools/obj2yaml/relr-section.yaml:71
+
+## Test we are able to dump SHT_RELR section when sh_entsize is invalid.
+## Here we use 0xFE as a value instead of expected 0x8.
----------------
"dump a SHT_RELR" (or possibly "dump an SHT_RELR" - I'm not sure what the English grammar rules are here!)


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D76282/new/

https://reviews.llvm.org/D76282





More information about the llvm-commits mailing list