[PATCH] D79612: [Object] Add tests for parsing invalid .dynamic section.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 12 05:20:36 PDT 2020


grimar added a comment.

We have an existent test for testing similar cases: `llvm\test\Object\invalid.test`. I'd definitely try to avoid adding one more `elf-invalid-*` test case to  `llvm\test\Object`.
I think we might want to make a cleanup and split/refine this test, but probably not necessary right now.
(I believe that having a unittest for each error `lib/Object` reports would be the best possible way to go. Because API tests ideally should be independent from tools tests,
as tools might change the behavior and break the coverage.)

This patch could just add test cases to llvm-objdump's test directory. And so its title could be something like: [llvm-objdump] - Test dumping of invalid .dynamic sections".
Testing the llvm-readobj (assuming we have no similar tests) can be a follow-up independent change and seems useful to me as might produce a different output for the same cases.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79612





More information about the llvm-commits mailing list