[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
Tue Jun 25 05:57:25 PDT 2019


jhenderson added a comment.

FWIW, I think this test is generally testing the behaviour of libObject code, so arguably belongs exactly where it is.



================
Comment at: test/Object/invalid.test:36
+
+# RUN: not llvm-objdump -s %p/Inputs/invalid-strtab-size.elf 2>&1 \
+# RUN:   | FileCheck %s --check-prefix=INVALIDERR
----------------
Comment?


================
Comment at: test/Object/invalid.test:39
+
+## Check that llvm-dwarfdump reports an error during relocations resolution
+## when instead of expected SHT_RELA section it locates a section of a different type.
----------------
relocations -> relocation


================
Comment at: test/Object/invalid.test:55
+    Type: SHT_PROGBITS
+    Content: 380000000200210000000101FB0E0D00010101010000000100000100676C6F62616C2E63707000000000000009020000000000000000130237000101
+  - Name: .rela.debug_line
----------------
I think this requires a comment explaining the contents. As things stand, it's about as opaque as a canned binary.


================
Comment at: test/Object/invalid.test:63
+...
+
+
----------------
Double blank-line?


================
Comment at: test/Object/invalid.test:65
+
+## Check that llvm-objdump reports an error when tries to dump section names
+## and .shstrtab is not null-terminated.
----------------
when tries -> when it tries

same below


================
Comment at: test/Object/invalid.test:126
+# RUN: yaml2obj %s --docnum=7 -o %t7
+# RUN: not llvm-readobj --dyn-symbols %t7 2>&1 | FileCheck --check-prefix=INVALID-SYM-SIZE2 %s
+
----------------
How about INVALID-DYNSYM-SIZE?


================
Comment at: test/Object/invalid.test:189
+
+# RUN: not llvm-readobj --symbols %p/Inputs/invalid-e_shnum.elf 2>&1 | FileCheck --check-prefix=INVALID-SH-NUM %s
+# INVALID-SH-NUM: invalid e_phentsize
----------------
Comments for these test cases?


================
Comment at: test/Object/invalid.test:209
+
+## Check that llvm-readobj reports an error if relocation contains a
+## incorrect (too large) symbol index.
----------------
if a relocation contains an


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

https://reviews.llvm.org/D63762





More information about the llvm-commits mailing list