[PATCH] D63762: [Object/invalid.test] - Convert most of the sub tests to YAML.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 26 04:52:24 PDT 2019


jhenderson added inline comments.


================
Comment at: test/Object/invalid.test:36-37
+
+## Check that llvm-objdump reports an error when .shstrtab has invalid size
+## that overlaps the file bound.
+
----------------
I'd rephrase this slightly:

"... has an invalid size that goes past the end of the file."


================
Comment at: test/Object/invalid.test:60
+## The exact content does not matter here. We can use any minimal valid debug section
+## which is a target for relocation, idea is to trigger the code that reads the
+## relocation's addend during relocation resolution. It should fail if called on
----------------
relocation, idea -> relocation. The idea


================
Comment at: test/Object/invalid.test:61-62
+## which is a target for relocation, idea is to trigger the code that reads the
+## relocation's addend during relocation resolution. It should fail if called on
+## non-SHT_RELA section.
+    Content: 380000000200210000000101FB0E0D00010101010000000100000100676C6F62616C2E63707000000000000009020000000000000000130237000101
----------------
on a non-SHT_RELA


================
Comment at: test/Object/invalid.test:149
+
+## Check that llvm-readobj reports an error if .symtab has invalid sh_link value,
+## which is greater than number of sections.
----------------
has an invalid


================
Comment at: test/Object/invalid.test:168
+
+## Check that llvm-readobj reports an error when tries to dump sections
+## when the e_shentsize field is broken.
----------------
tries -> trying


================
Comment at: test/Object/invalid.test:225
+
+## Check that llvm-readobj reports an error if e_phentsize field is broken.
+
----------------
if the e_phentsize


================
Comment at: test/Object/invalid.test:240
+
+## Check that llvm-readobj reports an error if relocation section
+## has broken sh_offset (too large).
----------------
if a relocation


================
Comment at: test/Object/invalid.test:241
+## Check that llvm-readobj reports an error if relocation section
+## has broken sh_offset (too large).
+
----------------
has a broken sh_offset (past the end of the file)

(I think that would be clearer)


================
Comment at: test/Object/invalid.test:258
+
+## Check that llvm-readobj reports an error when tries to dump sections
+## when the e_shnum field is broken.
----------------
tries -> trying


================
Comment at: test/Object/invalid.test:259
+## Check that llvm-readobj reports an error when tries to dump sections
+## when the e_shnum field is broken.
+
----------------
It's probably worth explaining how it is broken.


================
Comment at: test/Object/invalid.test:274
+
+## Check that llvm-readobj reports an error if relocation contains an
+## incorrect (too large) symbol index.
----------------
You missed the "a" between "if" and "relocation": should be "if a relocation..."


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

https://reviews.llvm.org/D63762





More information about the llvm-commits mailing list