From 77519b60d99233ccea2622ea3e40b30018d2f228 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 5 Feb 2020 10:24:51 -0800 Subject: [PATCH] [test] yaml2obj -docnum => --docnum= --- lld/test/ELF/compressed-input-alignment.test | 4 ++-- lld/test/ELF/invalid/bad-reloc-target.test | 6 +++--- lld/test/ELF/invalid/common-symbol-alignment.test | 4 ++-- lld/test/ELF/invalid/dynamic-section-broken.test | 4 ++-- lld/test/ELF/invalid/symtab-sh-info.s | 6 +++--- lld/test/ELF/mips-elf-flags-err.test | 12 ++++++------ lld/test/ELF/mips-fp-flags-err.test | 14 +++++++------- .../test/Shell/ObjectFile/wasm/unified-debug-sections.yaml | 4 ++-- 8 files changed, 27 insertions(+), 27 deletions(-) diff --git a/lld/test/ELF/compressed-input-alignment.test b/lld/test/ELF/compressed-input-alignment.test index fd71bf3..57dd677 100644 --- a/lld/test/ELF/compressed-input-alignment.test +++ b/lld/test/ELF/compressed-input-alignment.test @@ -1,10 +1,10 @@ # REQUIRES: zlib, x86 -# RUN: yaml2obj -docnum=1 %s -o %t.o +# RUN: yaml2obj --docnum=1 %s -o %t.o # RUN: ld.lld %t.o %t.o -o %t2 # RUN: llvm-readobj --sections --section-data %t2 | FileCheck %s -# RUN: yaml2obj -docnum=2 %s -o %t.o +# RUN: yaml2obj --docnum=2 %s -o %t.o # RUN: ld.lld %t.o %t.o -o %t2 # RUN: llvm-readobj --sections --section-data %t2 | FileCheck %s diff --git a/lld/test/ELF/invalid/bad-reloc-target.test b/lld/test/ELF/invalid/bad-reloc-target.test index 9ab5d9c..7fafe5e 100644 --- a/lld/test/ELF/invalid/bad-reloc-target.test +++ b/lld/test/ELF/invalid/bad-reloc-target.test @@ -1,4 +1,4 @@ -# RUN: yaml2obj -docnum=1 %s -o %t1.o +# RUN: yaml2obj --docnum=1 %s -o %t1.o # RUN: not ld.lld %t1.o -o %t1 2>&1 | FileCheck %s # CHECK: error: {{.*}}.o: unsupported relocation reference @@ -24,7 +24,7 @@ Symbols: - Name: foo Binding: STB_GLOBAL -# RUN: yaml2obj -docnum=2 %s -o %t2.o +# RUN: yaml2obj --docnum=2 %s -o %t2.o # RUN: not ld.lld %t2.o -o %t2 2>&1 | FileCheck %s --check-prefix=ERR2 # ERR2: error: {{.*}}.o: invalid relocated section index: 99 @@ -52,7 +52,7 @@ Symbols: ## Relocation refers to a symbol with index larger than ## symbol table size. Check we report it. -# RUN: yaml2obj -docnum=3 %s -o %t2.o +# RUN: yaml2obj --docnum=3 %s -o %t2.o # RUN: not ld.lld %t2.o -o %t2 2>&1 | FileCheck %s --check-prefix=ERR3 # ERR3: error: {{.*}}.o: invalid symbol index diff --git a/lld/test/ELF/invalid/common-symbol-alignment.test b/lld/test/ELF/invalid/common-symbol-alignment.test index 7b79441..cb8a35a 100644 --- a/lld/test/ELF/invalid/common-symbol-alignment.test +++ b/lld/test/ELF/invalid/common-symbol-alignment.test @@ -1,6 +1,6 @@ ## If an object contains a common symbol with zero alignment, ## check we report it. -# RUN: yaml2obj -docnum=1 %s -o %t1.o +# RUN: yaml2obj --docnum=1 %s -o %t1.o # RUN: not ld.lld %t1.o -o %t 2>&1 | FileCheck %s # CHECK: common symbol 'bar' has invalid alignment: 0 @@ -18,7 +18,7 @@ Symbols: ## If an object contains a common symbol with alignment greater ## than UINT32_MAX, check we report it. -# RUN: yaml2obj -docnum=2 %s -o %t2.o +# RUN: yaml2obj --docnum=2 %s -o %t2.o # RUN: not ld.lld %t2.o -o %t 2>&1 | FileCheck %s --check-prefix=BIG # BIG: common symbol 'bar' has invalid alignment: 271644049215 diff --git a/lld/test/ELF/invalid/dynamic-section-broken.test b/lld/test/ELF/invalid/dynamic-section-broken.test index ecc7834..31317f6 100644 --- a/lld/test/ELF/invalid/dynamic-section-broken.test +++ b/lld/test/ELF/invalid/dynamic-section-broken.test @@ -1,5 +1,5 @@ ## .dynamic section has invalid sh_entsize, check we report it. -# RUN: yaml2obj -docnum=1 %s -o %t.so +# RUN: yaml2obj --docnum=1 %s -o %t.so # RUN: not ld.lld %t.so -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR1 # ERR1: error: {{.*}}.so: section [index 1] has an invalid sh_entsize: 291 @@ -18,7 +18,7 @@ Sections: ## The .dynamic section has invalid sh_size, which is too short and ## even less than entry size. Check we report it. -# RUN: yaml2obj -docnum=2 %s -o %t.so +# RUN: yaml2obj --docnum=2 %s -o %t.so # RUN: not ld.lld %t.so -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR2 # ERR2: error: {{.*}}.so: section [index 1] has an invalid sh_size (1) which is not a multiple of its sh_entsize (16) diff --git a/lld/test/ELF/invalid/symtab-sh-info.s b/lld/test/ELF/invalid/symtab-sh-info.s index 9e694dc..9b9cd4e 100644 --- a/lld/test/ELF/invalid/symtab-sh-info.s +++ b/lld/test/ELF/invalid/symtab-sh-info.s @@ -1,7 +1,7 @@ ## .symtab's sh_info contains zero value. First entry in a .symtab is a ## zero entry that must exist in a valid object, so sh_info can't be null. ## Check we report a proper error for that case. -# RUN: yaml2obj -docnum=1 %s -o %t.o +# RUN: yaml2obj --docnum=1 %s -o %t.o # RUN: not ld.lld %t.o -o %t2 2>&1 | FileCheck %s --check-prefix=ERR1 # ERR1: invalid sh_info in symbol table @@ -21,7 +21,7 @@ Symbols: ## sh_info has value 2 what says that non-local symbol `foo` is local. ## Check we report this case. -# RUN: yaml2obj -docnum=2 %s -o %t.o +# RUN: yaml2obj --docnum=2 %s -o %t.o # RUN: not ld.lld %t.o -o %t2 2>&1 | FileCheck --check-prefix=ERR2 %s # ERR2: broken object: getLocalSymbols returns a non-local symbol @@ -41,7 +41,7 @@ Symbols: ## sh_info has value 0xff what is larger than number of symbols in a .symtab. ## Check we report this case. -# RUN: yaml2obj -docnum=3 %s -o %t.o +# RUN: yaml2obj --docnum=3 %s -o %t.o # RUN: not ld.lld %t.o -o %t2 2>&1 | FileCheck --check-prefix=ERR1 %s --- !ELF diff --git a/lld/test/ELF/mips-elf-flags-err.test b/lld/test/ELF/mips-elf-flags-err.test index 12fd418..c66454a 100644 --- a/lld/test/ELF/mips-elf-flags-err.test +++ b/lld/test/ELF/mips-elf-flags-err.test @@ -3,12 +3,12 @@ # Check warning and errors in case of input # files with incompatible ELF header flags. -# RUN: yaml2obj -docnum 1 %s -o %t-n64.o -# RUN: yaml2obj -docnum 2 %s -o %t-o64.o -# RUN: yaml2obj -docnum 3 %s -o %t-n32.o -# RUN: yaml2obj -docnum 4 %s -o %t-o32.o -# RUN: yaml2obj -docnum 5 %s -o %t-eabi64.o -# RUN: yaml2obj -docnum 6 %s -o %t-eabi32.o +# RUN: yaml2obj --docnum=1 %s -o %t-n64.o +# RUN: yaml2obj --docnum=2 %s -o %t-o64.o +# RUN: yaml2obj --docnum=3 %s -o %t-n32.o +# RUN: yaml2obj --docnum=4 %s -o %t-o32.o +# RUN: yaml2obj --docnum=5 %s -o %t-eabi64.o +# RUN: yaml2obj --docnum=6 %s -o %t-eabi32.o # RUN: not ld.lld %t-n64.o %t-eabi64.o -shared -o /dev/null 2>&1 \ # RUN: | FileCheck -check-prefixes=MM64,N64EABI64 %s diff --git a/lld/test/ELF/mips-fp-flags-err.test b/lld/test/ELF/mips-fp-flags-err.test index 68a290c..514f58a 100644 --- a/lld/test/ELF/mips-fp-flags-err.test +++ b/lld/test/ELF/mips-fp-flags-err.test @@ -3,13 +3,13 @@ # Check warning and errors in case of input # files with incompatible floating point ABI flags. -# RUN: yaml2obj -docnum 1 %s -o %t-dbl.o -# RUN: yaml2obj -docnum 2 %s -o %t-sgl.o -# RUN: yaml2obj -docnum 3 %s -o %t-soft.o -# RUN: yaml2obj -docnum 4 %s -o %t-fp64.o -# RUN: yaml2obj -docnum 5 %s -o %t-fp64old.o -# RUN: yaml2obj -docnum 6 %s -o %t-fp64a.o -# RUN: yaml2obj -docnum 7 %s -o %t-fpxx.o +# RUN: yaml2obj --docnum=1 %s -o %t-dbl.o +# RUN: yaml2obj --docnum=2 %s -o %t-sgl.o +# RUN: yaml2obj --docnum=3 %s -o %t-soft.o +# RUN: yaml2obj --docnum=4 %s -o %t-fp64.o +# RUN: yaml2obj --docnum=5 %s -o %t-fp64old.o +# RUN: yaml2obj --docnum=6 %s -o %t-fp64a.o +# RUN: yaml2obj --docnum=7 %s -o %t-fpxx.o # RUN: not ld.lld %t-dbl.o %t-fp64.o -shared -o /dev/null 2>&1 \ # RUN: | FileCheck -check-prefixes=DBLFP64 %s diff --git a/lldb/test/Shell/ObjectFile/wasm/unified-debug-sections.yaml b/lldb/test/Shell/ObjectFile/wasm/unified-debug-sections.yaml index 852fbb6..182690e 100644 --- a/lldb/test/Shell/ObjectFile/wasm/unified-debug-sections.yaml +++ b/lldb/test/Shell/ObjectFile/wasm/unified-debug-sections.yaml @@ -1,8 +1,8 @@ # RUN: rm -rf %t # RUN: mkdir %t # RUN: cd %t -# RUN: yaml2obj -docnum=1 %s > test.wasm -# RUN: yaml2obj -docnum=2 %s > test_sym.wasm +# RUN: yaml2obj --docnum=1 %s > test.wasm +# RUN: yaml2obj --docnum=2 %s > test_sym.wasm # RUN: lldb-test object-file test.wasm | FileCheck %s # This test checks that SymbolVendorWasm correctly loads DWARF debug sections -- 2.7.4