[llvm] 37dd8b6 - [llvm-readobj] - Simplify the symbols.test
Georgii Rymar via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 1 05:27:28 PDT 2020
Author: Georgii Rymar
Date: 2020-07-01T15:26:05+03:00
New Revision: 37dd8b6ce5f3ad6c5b9f6b5498606f8b7723e8ab
URL: https://github.com/llvm/llvm-project/commit/37dd8b6ce5f3ad6c5b9f6b5498606f8b7723e8ab
DIFF: https://github.com/llvm/llvm-project/commit/37dd8b6ce5f3ad6c5b9f6b5498606f8b7723e8ab.diff
LOG: [llvm-readobj] - Simplify the symbols.test
We are able to use YAML macros to avoid having
4 independent YAML descriptions.
Differential revision: https://reviews.llvm.org/D82942
Added:
Modified:
llvm/test/tools/llvm-readobj/ELF/symbols.test
Removed:
################################################################################
diff --git a/llvm/test/tools/llvm-readobj/ELF/symbols.test b/llvm/test/tools/llvm-readobj/ELF/symbols.test
index a8feaba97c30..ef45b71f4aad 100644
--- a/llvm/test/tools/llvm-readobj/ELF/symbols.test
+++ b/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 @@ Symbols:
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
More information about the llvm-commits
mailing list