This is an archive of the discontinued LLVM Phabricator instance.

[yaml2obj][test] Simplify some e_machine EI_CLASS EI_DATA tests
ClosedPublic

Authored by MaskRay on Jan 31 2020, 11:52 PM.

Details

Summary

When both little-endian and big-endian are tested, or both 32-bit and 64-bit are tested, use a template like the following with -D BITS=32 -D ENCODE=LSB

--- !ELF
FileHeader:
 Class:   ELFCLASS[[BITS]]
 Data:    ELFDATA2[[ENCODE]]
 Type:    ET_DYN
 Machine: EM_X86_64

Diff Detail

Event Timeline

MaskRay created this revision.Jan 31 2020, 11:52 PM

Unit tests: pass. 62380 tests passed, 0 failed and 839 were skipped.

clang-tidy: fail. clang-tidy found 0 errors and 5 warnings. 0 of them are added as review comments below (why?).

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.

MaskRay updated this revision to Diff 242168.Feb 3 2020, 1:25 PM
MaskRay retitled this revision from [yaml2obj] Support -D EI_CLASS= to [yaml2obj][test] Simplify some EI_CLASS EI_DATA tests.
MaskRay removed a subscriber: merge_guards_bot.

Update

MaskRay edited the summary of this revision. (Show Details)Feb 3 2020, 1:28 PM
MaskRay updated this revision to Diff 242175.Feb 3 2020, 1:38 PM

Simplify more

Unit tests: fail. 62428 tests passed, 1 failed and 845 were skipped.

failed: LLVM.tools/obj2yaml/relr-section.yaml

clang-tidy: pass.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.

Unit tests: fail. 62428 tests passed, 1 failed and 845 were skipped.

failed: LLVM.tools/obj2yaml/relr-section.yaml

clang-tidy: pass.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.

grimar accepted this revision.Feb 4 2020, 12:39 AM

This LGTM.

This revision is now accepted and ready to land.Feb 4 2020, 12:39 AM
jhenderson added inline comments.Feb 4 2020, 1:31 AM
llvm/test/tools/obj2yaml/relr-section.yaml
12

Copy-paste error? %t.32be

llvm/test/tools/yaml2obj/ELF/class-endianness.yaml
3–7

It might be worth breaking these lines up into 2 each.

Also, it's not a big deal, but to reduce differences it might be worth keeping the LE64/BE64/LE32/BE32 ordering as it was before.

MaskRay updated this revision to Diff 242389.Feb 4 2020, 11:37 AM
MaskRay retitled this revision from [yaml2obj][test] Simplify some EI_CLASS EI_DATA tests to [yaml2obj][test] Simplify some e_machine EI_CLASS EI_DATA tests.
MaskRay edited the summary of this revision. (Show Details)
MaskRay removed a subscriber: rupprecht.

Move a machine clean-up from D73821 to here

Unit tests: unknown.

clang-tidy: unknown.

clang-format: unknown.

Build artifacts: diff.json, console-log.txt

Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.

MaskRay updated this revision to Diff 242397.Feb 4 2020, 12:02 PM
MaskRay marked 2 inline comments as done.

Fix typo

MaskRay marked an inline comment as done.Feb 4 2020, 12:02 PM

Unit tests: unknown.

clang-tidy: pass.

clang-format: pass.

Build artifacts: diff.json, clang-tidy.txt, clang-format.patch, CMakeCache.txt, console-log.txt

Pre-merge checks is in beta. Report issue. Please join beta or enable it for your project.

This revision was automatically updated to reflect the committed changes.