[llvm] 531fad7 - [test] yaml2obj -docnum => --docnum=
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 4 10:33:57 PST 2020
Author: Fangrui Song
Date: 2020-02-04T10:33:21-08:00
New Revision: 531fad736eddc1fa299b5154d32efa3b78bb31e6
URL: https://github.com/llvm/llvm-project/commit/531fad736eddc1fa299b5154d32efa3b78bb31e6
DIFF: https://github.com/llvm/llvm-project/commit/531fad736eddc1fa299b5154d32efa3b78bb31e6.diff
LOG: [test] yaml2obj -docnum => --docnum=
Make usage more consistent, and make it possible to enable LongOptionsUseDoubleDash.
Added:
Modified:
llvm/test/tools/llvm-readobj/ELF/dynamic-table-dtnull.s
llvm/test/tools/llvm-readobj/ELF/packed-relocs.test
llvm/test/tools/llvm-readobj/ELF/relr-relocs.test
llvm/test/tools/obj2yaml/dynamic-section-arch-tags.test
llvm/test/tools/yaml2obj/ELF/local-symbols.yaml
llvm/test/tools/yaml2obj/multi-doc.yaml
Removed:
################################################################################
diff --git a/llvm/test/tools/llvm-readobj/ELF/dynamic-table-dtnull.s b/llvm/test/tools/llvm-readobj/ELF/dynamic-table-dtnull.s
index b613e4137d12..5524bdde154c 100644
--- a/llvm/test/tools/llvm-readobj/ELF/dynamic-table-dtnull.s
+++ b/llvm/test/tools/llvm-readobj/ELF/dynamic-table-dtnull.s
@@ -1,6 +1,6 @@
# Check we are able to dump the dynamic section without a DT_NULL entry correctly.
-# RUN: yaml2obj -docnum=1 %s -o %t.o
+# RUN: yaml2obj --docnum=1 %s -o %t.o
# RUN: llvm-readobj --dynamic-table %t.o | FileCheck %s --check-prefix=NONULL-LLVM
# RUN: llvm-readelf --dynamic-table %t.o | FileCheck %s --check-prefix=NONULL-GNU
@@ -42,7 +42,7 @@ ProgramHeaders:
# length of its entries. In this case, we should not try to dump anything
# past the DT_NULL entry, which works as a terminator.
-# RUN: yaml2obj -docnum=2 %s -o %t.o
+# RUN: yaml2obj --docnum=2 %s -o %t.o
# RUN: llvm-readobj --dynamic-table %t.o | FileCheck %s --check-prefix=LONG-LLVM
# RUN: llvm-readelf --dynamic-table %t.o | FileCheck %s --check-prefix=LONG-GNU
diff --git a/llvm/test/tools/llvm-readobj/ELF/packed-relocs.test b/llvm/test/tools/llvm-readobj/ELF/packed-relocs.test
index 4c1ddfcb40f6..330426c710ec 100644
--- a/llvm/test/tools/llvm-readobj/ELF/packed-relocs.test
+++ b/llvm/test/tools/llvm-readobj/ELF/packed-relocs.test
@@ -1,7 +1,7 @@
# The binary blobs in this file were created like this:
# llvm-mc -filetype=obj -triple x86_64-pc-linux-gnu Inputs/elf-packed-relocs1.s -o - | obj2yaml | grep Content:
-# RUN: yaml2obj -docnum 1 %s | llvm-readobj --relocations - | FileCheck --check-prefix=LLVM1 %s
+# RUN: yaml2obj --docnum=1 %s | llvm-readobj --relocations - | FileCheck --check-prefix=LLVM1 %s
# LLVM1: Section (1) .rela.dyn {
# LLVM1-NEXT: 0x1100 R_X86_64_RELATIVE - 0x0
# LLVM1-NEXT: 0x1180 R_X86_64_RELATIVE - 0x0
@@ -13,7 +13,7 @@
# LLVM1-NEXT: 0x119F R_X86_64_64 sym2 0xA
# LLVM1-NEXT: }
-# RUN: yaml2obj -docnum 1 %s | llvm-readelf -relocations - | FileCheck --check-prefix=GNU1 %s
+# RUN: yaml2obj --docnum=1 %s | llvm-readelf -relocations - | FileCheck --check-prefix=GNU1 %s
# GNU1: Relocation section '.rela.dyn' at offset 0x40 contains 8 entries:
# GNU1: 0000000000001100 0000000000000008 R_X86_64_RELATIVE 0
# GNU1-NEXT: 0000000000001180 0000000000000008 R_X86_64_RELATIVE 0
@@ -47,7 +47,7 @@ Symbols:
Binding: STB_GLOBAL
...
-# RUN: yaml2obj -docnum 2 %s | llvm-readobj --relocations - | FileCheck --check-prefix=LLVM2 %s
+# RUN: yaml2obj --docnum=2 %s | llvm-readobj --relocations - | FileCheck --check-prefix=LLVM2 %s
# LLVM2: Section (1) .rel.dyn {
# LLVM2-NEXT: 0x1008 R_386_32 sym1 0x0
# LLVM2-NEXT: 0x1010 R_386_GOT32 sym2 0x0
@@ -61,7 +61,7 @@ Symbols:
# LLVM2-NEXT: 0xFF0 R_386_RELATIVE - 0x0
# LLVM2-NEXT: }
-# RUN: yaml2obj -docnum 2 %s | llvm-readelf -relocations - | FileCheck --check-prefix=GNU2 %s
+# RUN: yaml2obj --docnum=2 %s | llvm-readelf -relocations - | FileCheck --check-prefix=GNU2 %s
# GNU2: Relocation section '.rel.dyn' at offset 0x34 contains 10 entries:
# GNU2: 00001008 00000101 R_386_32 00000000 sym1
# GNU2-NEXT: 00001010 00000203 R_386_GOT32 00000000 sym2
@@ -97,7 +97,7 @@ Symbols:
Binding: STB_GLOBAL
...
-# RUN: yaml2obj -docnum 3 %s | llvm-readobj --relocations - | FileCheck --check-prefix=LLVM3 %s
+# RUN: yaml2obj --docnum=3 %s | llvm-readobj --relocations - | FileCheck --check-prefix=LLVM3 %s
#
# LLVM3: Section (1) .rela.dyn {
# LLVM3-NEXT: 0x1100 R_X86_64_RELATIVE - 0x0
@@ -108,7 +108,7 @@ Symbols:
# LLVM3-NEXT: 0x1218 R_X86_64_64 sym2 0x8
# LLVM3-NEXT: }
-# RUN: yaml2obj -docnum 3 %s | llvm-readelf -relocations - | FileCheck --check-prefix=GNU3 %s
+# RUN: yaml2obj --docnum=3 %s | llvm-readelf -relocations - | FileCheck --check-prefix=GNU3 %s
# GNU3: Relocation section '.rela.dyn' at offset 0x40 contains 6 entries:
# GNU3: 0000000000001100 0000000000000008 R_X86_64_RELATIVE 0
# GNU3-NEXT: 0000000000001180 0000000000000008 R_X86_64_RELATIVE 8
diff --git a/llvm/test/tools/llvm-readobj/ELF/relr-relocs.test b/llvm/test/tools/llvm-readobj/ELF/relr-relocs.test
index bef963ec3d5c..0d381c746f22 100644
--- a/llvm/test/tools/llvm-readobj/ELF/relr-relocs.test
+++ b/llvm/test/tools/llvm-readobj/ELF/relr-relocs.test
@@ -1,6 +1,6 @@
## This is a test to test how SHT_RELR sections are dumped.
-# RUN: yaml2obj -docnum 1 %s \
+# RUN: yaml2obj --docnum=1 %s \
# RUN: | llvm-readobj --relocations --raw-relr - \
# RUN: | FileCheck --check-prefix=RAW-LLVM1 %s
# RAW-LLVM1: Section (1) .relr.dyn {
@@ -11,7 +11,7 @@
# RAW-LLVM1-NEXT: 0xA700550400009
# RAW-LLVM1-NEXT: }
-# RUN: yaml2obj -docnum 1 %s \
+# RUN: yaml2obj --docnum=1 %s \
# RUN: | llvm-readobj --relocations - \
# RUN: | FileCheck --check-prefix=LLVM1 %s
# LLVM1: Section (1) .relr.dyn {
@@ -38,7 +38,7 @@
# LLVM1-NEXT: 0x20390 R_X86_64_RELATIVE - 0x0
# LLVM1-NEXT: }
-# RUN: yaml2obj -docnum 1 %s \
+# RUN: yaml2obj --docnum=1 %s \
# RUN: | llvm-readelf -relocations -raw-relr - \
# RUN: | FileCheck --check-prefix=RAW-GNU1 %s
# RAW-GNU1: Relocation section '.relr.dyn' at offset 0x40 contains 5 entries:
@@ -48,7 +48,7 @@
# RAW-GNU1-NEXT: 00000000000f0501
# RAW-GNU1-NEXT: 000a700550400009
-# RUN: yaml2obj -docnum 1 %s \
+# RUN: yaml2obj --docnum=1 %s \
# RUN: | llvm-readelf -relocations - \
# RUN: | FileCheck --check-prefix=GNU1 %s
# GNU1: Relocation section '.relr.dyn' at offset 0x40 contains 21 entries:
@@ -88,7 +88,7 @@ Sections:
Entries: [ 0x0000000000010D60, 0x0000000000000103, 0x0000000000020000,
0x00000000000F0501, 0x000A700550400009 ]
-# RUN: yaml2obj -docnum 2 %s \
+# RUN: yaml2obj --docnum=2 %s \
# RUN: | llvm-readobj --relocations --raw-relr - \
# RUN: | FileCheck --check-prefix=RAW-LLVM2 %s
# RAW-LLVM2: Section (1) .relr.dyn {
@@ -99,7 +99,7 @@ Sections:
# RAW-LLVM2-NEXT: 0x50400009
# RAW-LLVM2-NEXT: }
-# RUN: yaml2obj -docnum 2 %s \
+# RUN: yaml2obj --docnum=2 %s \
# RUN: | llvm-readobj --relocations - \
# RUN: | FileCheck --check-prefix=LLVM2 %s
# LLVM2: Section (1) .relr.dyn {
@@ -119,7 +119,7 @@ Sections:
# LLVM2-NEXT: 0x200F4 R_386_RELATIVE - 0x0
# LLVM2-NEXT: }
-# RUN: yaml2obj -docnum 2 %s \
+# RUN: yaml2obj --docnum=2 %s \
# RUN: | llvm-readelf -relocations -raw-relr - \
# RUN: | FileCheck --check-prefix=RAW-GNU2 %s
# RAW-GNU2: Relocation section '.relr.dyn' at offset 0x34 contains 5 entries:
@@ -129,7 +129,7 @@ Sections:
# RAW-GNU2-NEXT: 000f0501
# RAW-GNU2-NEXT: 50400009
-# RUN: yaml2obj -docnum 2 %s \
+# RUN: yaml2obj --docnum=2 %s \
# RUN: | llvm-readelf -relocations - \
# RUN: | FileCheck --check-prefix=GNU2 %s
# GNU2: Relocation section '.relr.dyn' at offset 0x34 contains 14 entries:
diff --git a/llvm/test/tools/obj2yaml/dynamic-section-arch-tags.test b/llvm/test/tools/obj2yaml/dynamic-section-arch-tags.test
index 090477e66743..2c2d5841764f 100644
--- a/llvm/test/tools/obj2yaml/dynamic-section-arch-tags.test
+++ b/llvm/test/tools/obj2yaml/dynamic-section-arch-tags.test
@@ -2,7 +2,7 @@
## containing architecture specific dynamic tags.
## Check we can handle MIPS specific tags.
-# RUN: yaml2obj -docnum=1 %s -o %t1
+# RUN: yaml2obj --docnum=1 %s -o %t1
# RUN: obj2yaml %t1 | FileCheck %s --check-prefix=MIPS
# MIPS: - Tag: DT_MIPS_RLD_VERSION
@@ -202,7 +202,7 @@ Sections:
Value: 0x000000000000002E
## Check we can handle Hexagon specific tags.
-# RUN: yaml2obj -docnum=2 %s -o %t2
+# RUN: yaml2obj --docnum=2 %s -o %t2
# RUN: obj2yaml %t2 | FileCheck %s --check-prefix=HEXAGON
# HEXAGON: - Tag: DT_HEXAGON_SYMSZ
@@ -230,7 +230,7 @@ Sections:
Value: 0x0000000000000003
## Check we can handle PPC specific tags.
-# RUN: yaml2obj -docnum=3 %s -o %t3
+# RUN: yaml2obj --docnum=3 %s -o %t3
# RUN: obj2yaml %t3 | FileCheck %s --check-prefix=EM_PPC
# EM_PPC: - Tag: DT_PPC_GOT
@@ -254,7 +254,7 @@ Sections:
Value: 0x0000000000000001
## Check we can handle PPC64 specific tags.
-# RUN: yaml2obj -docnum=4 %s -o %t4
+# RUN: yaml2obj --docnum=4 %s -o %t4
# RUN: obj2yaml %t4 | FileCheck %s --check-prefix=EM_PPC64
# EM_PPC64: - Tag: DT_PPC64_GLINK
@@ -274,7 +274,7 @@ Sections:
Value: 0x0000000000000001
## Check we can handle AARCH64 specific tags.
-# RUN: yaml2obj -docnum=5 %s -o %t2
+# RUN: yaml2obj --docnum=5 %s -o %t2
# RUN: obj2yaml %t2 | FileCheck %s --check-prefix=AARCH64
# AARCH64: - Tag: DT_AARCH64_BTI_PLT
@@ -302,7 +302,7 @@ Sections:
## Here for EM_PPC64 we are trying to use DT_HEXAGON_SYMSZ
## instead of DT_PPC64_GLINK. They both have value of 0x70000000.
-# RUN: not yaml2obj -docnum=6 %s 2>&1 | FileCheck %s --check-prefix=ERR
+# RUN: not yaml2obj --docnum=6 %s 2>&1 | FileCheck %s --check-prefix=ERR
# ERR: error: invalid hex64 number
# ERR-NEXT: - Tag: DT_HEXAGON_SYMSZ
diff --git a/llvm/test/tools/yaml2obj/ELF/local-symbols.yaml b/llvm/test/tools/yaml2obj/ELF/local-symbols.yaml
index 4c1800ea4c19..dabb71d9320c 100644
--- a/llvm/test/tools/yaml2obj/ELF/local-symbols.yaml
+++ b/llvm/test/tools/yaml2obj/ELF/local-symbols.yaml
@@ -2,7 +2,7 @@
## A symbol table section's sh_info section header member holds
## the symbol table index for the first non-local symbol.
-# RUN: yaml2obj -docnum=1 %s -o %t
+# RUN: yaml2obj --docnum=1 %s -o %t
# RUN: llvm-readobj --sections %t | FileCheck %s --check-prefix=ONE
# ONE: Name: .symtab
# ONE: Info: 2
@@ -18,7 +18,7 @@ Symbols:
- Name: global
Binding: STB_GLOBAL
-# RUN: yaml2obj -docnum=2 %s -o %t
+# RUN: yaml2obj --docnum=2 %s -o %t
# RUN: llvm-readobj --sections %t | FileCheck %s --check-prefix=TWO
# TWO: Name: .symtab
# TWO: Info: 3
diff --git a/llvm/test/tools/yaml2obj/multi-doc.yaml b/llvm/test/tools/yaml2obj/multi-doc.yaml
index 327d625bfb37..8f9e9f7e810c 100644
--- a/llvm/test/tools/yaml2obj/multi-doc.yaml
+++ b/llvm/test/tools/yaml2obj/multi-doc.yaml
@@ -1,15 +1,15 @@
## Check we are able to have multiple YAMLs in a file and switch between
## them using --docnum=x option.
-# RUN: yaml2obj -docnum=1 %s \
+# RUN: yaml2obj --docnum=1 %s \
# RUN: | llvm-readobj --symbols - | FileCheck -check-prefix=DOC1 %s
-# RUN: yaml2obj -docnum=2 %s \
+# RUN: yaml2obj --docnum=2 %s \
# RUN: | llvm-readobj --symbols - | FileCheck -check-prefix=DOC2 %s
-# RUN: yaml2obj -docnum=3 %s \
+# RUN: yaml2obj --docnum=3 %s \
# RUN: | llvm-readobj --symbols - | FileCheck -check-prefix=DOC3 %s
-# RUN: yaml2obj -docnum=4 %s \
+# RUN: yaml2obj --docnum=4 %s \
# RUN: | llvm-readobj --symbols - | FileCheck -check-prefix=DOC4 %s
-# RUN: not yaml2obj -docnum=5 %s 2>&1 \
+# RUN: not yaml2obj --docnum=5 %s 2>&1 \
# RUN: | FileCheck -check-prefix=DOC5 %s
# DOC1: Name: _sym1
More information about the llvm-commits
mailing list