[PATCH] D82942: [llvm-readobj] - Simplify the symbols.test
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 1 03:12:04 PDT 2020
grimar created this revision.
grimar added reviewers: jhenderson, MaskRay.
Herald added subscribers: rupprecht, emaste.
Herald added a reviewer: espindola.
Herald added a project: LLVM.
We are able to use YAML macros to avoid having
4 independent YAML descriptions.
https://reviews.llvm.org/D82942
Files:
llvm/test/tools/llvm-readobj/ELF/symbols.test
Index: llvm/test/tools/llvm-readobj/ELF/symbols.test
===================================================================
--- llvm/test/tools/llvm-readobj/ELF/symbols.test
+++ llvm/test/tools/llvm-readobj/ELF/symbols.test
@@ -10,17 +10,17 @@
## Case 1: Test how llvm-readobj and llvm-readelf dumps symbols.
## a) Check relocatable objects.
-# RUN: yaml2obj %s --docnum=1 -o %t64
+# RUN: yaml2obj %s -DBITS=64 -DTYPE=ET_REL -o %t64
# RUN: llvm-readobj --symbols %t64 | FileCheck %s --match-full-lines --strict-whitespace --check-prefix=SYMBOLS-LLVM
# RUN: llvm-readelf --symbols %t64 | FileCheck %s --match-full-lines --strict-whitespace --check-prefix=SYMBOLS-GNU64
-# RUN: yaml2obj %s --docnum=2 -o %t32
+# RUN: yaml2obj %s -DBITS=32 -DTYPE=ET_REL -o %t32
# RUN: llvm-readobj --symbols %t32 | FileCheck %s --match-full-lines --strict-whitespace --check-prefix=SYMBOLS-LLVM
# RUN: llvm-readelf --symbols %t32 | FileCheck %s --match-full-lines --strict-whitespace --check-prefix=SYMBOLS-GNU32
## b) Check dynamic objects.
-# RUN: yaml2obj %s --docnum=3 -o %t64.so
+# RUN: yaml2obj %s -DBITS=64 -DTYPE=ET_DYN -o %t64.so
# RUN: llvm-readobj --symbols %t64.so | FileCheck %s --match-full-lines --strict-whitespace --check-prefix=SYMBOLS-LLVM
# RUN: llvm-readelf --symbols %t64.so | FileCheck %s --match-full-lines --strict-whitespace --check-prefix=SYMBOLS-GNU64
-# RUN: yaml2obj %s --docnum=4 -o %t32.so
+# RUN: yaml2obj %s -DBITS=32 -DTYPE=ET_DYN -o %t32.so
# RUN: llvm-readobj --symbols %t32.so | FileCheck %s --match-full-lines --strict-whitespace --check-prefix=SYMBOLS-LLVM
# RUN: llvm-readelf --symbols %t32.so | FileCheck %s --match-full-lines --strict-whitespace --check-prefix=SYMBOLS-GNU32
@@ -105,9 +105,9 @@
--- !ELF
FileHeader:
- Class: ELFCLASS64
+ Class: ELFCLASS[[BITS]]
Data: ELFDATA2LSB
- Type: ET_REL
+ Type: [[TYPE]]
Machine: EM_X86_64
Symbols:
- Name: foo
@@ -116,45 +116,3 @@
Value: 0x2
DynamicSymbols:
- Name: zed
-
---- !ELF
-FileHeader:
- Class: ELFCLASS32
- Data: ELFDATA2LSB
- Type: ET_REL
- Machine: EM_386
-Symbols:
- - Name: foo
- Value: 0x1
- - Name: bar
- Value: 0x2
-DynamicSymbols:
- - Name: zed
-
---- !ELF
-FileHeader:
- Class: ELFCLASS64
- Data: ELFDATA2LSB
- Type: ET_DYN
- Machine: EM_X86_64
-Symbols:
- - Name: foo
- Value: 0x1
- - Name: bar
- Value: 0x2
-DynamicSymbols:
- - Name: zed
-
---- !ELF
-FileHeader:
- Class: ELFCLASS32
- Data: ELFDATA2LSB
- Type: ET_DYN
- Machine: EM_386
-Symbols:
- - Name: foo
- Value: 0x1
- - Name: bar
- Value: 0x2
-DynamicSymbols:
- - Name: zed
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82942.274732.patch
Type: text/x-patch
Size: 2644 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200701/1ef3becb/attachment-0001.bin>
More information about the llvm-commits
mailing list