[llvm] 2f75fda - [test] Avoid llvm-symbolizer/llvm-addr2line one-dash long options
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 20 09:34:41 PDT 2021
Author: Fangrui Song
Date: 2021-07-20T09:34:35-07:00
New Revision: 2f75fda5dc2549e900916a04dbd27134a31d574c
URL: https://github.com/llvm/llvm-project/commit/2f75fda5dc2549e900916a04dbd27134a31d574c
DIFF: https://github.com/llvm/llvm-project/commit/2f75fda5dc2549e900916a04dbd27134a31d574c.diff
LOG: [test] Avoid llvm-symbolizer/llvm-addr2line one-dash long options
Added:
Modified:
llvm/test/DebugInfo/X86/symbolize_function_start.s
llvm/test/tools/llvm-symbolizer/coff-dwarf.test
llvm/test/tools/llvm-symbolizer/coff-exports.test
llvm/test/tools/llvm-symbolizer/dsym.test
llvm/test/tools/llvm-symbolizer/fat.test
llvm/test/tools/llvm-symbolizer/flag-grouping.test
llvm/test/tools/llvm-symbolizer/padding-x86_64.ll
llvm/test/tools/llvm-symbolizer/ppc64.test
llvm/test/tools/llvm-symbolizer/print_context.c
llvm/test/tools/llvm-symbolizer/split-debug.test
llvm/test/tools/llvm-symbolizer/sym-verbose.test
llvm/test/tools/llvm-symbolizer/sym.test
Removed:
################################################################################
diff --git a/llvm/test/DebugInfo/X86/symbolize_function_start.s b/llvm/test/DebugInfo/X86/symbolize_function_start.s
index e2efc6bcc72fc..fb08c68349880 100644
--- a/llvm/test/DebugInfo/X86/symbolize_function_start.s
+++ b/llvm/test/DebugInfo/X86/symbolize_function_start.s
@@ -2,7 +2,7 @@
# RUN: mkdir %t
# RUN: llvm-mc -filetype=obj -triple=x86_64 -dwarf-version=4 %s -o %t/test.o
# RUN: cd %t
-# RUN: llvm-symbolizer -verbose 0x0 -obj=test.o | FileCheck --check-prefix=SYM %s
+# RUN: llvm-symbolizer --verbose 0x0 --obj=test.o | FileCheck --check-prefix=SYM %s
# RUN: llvm-dwarfdump -lookup=0x1 test.o | FileCheck --check-prefix=LOOKUP %s
# SYM: Filename: .{{[/\\]}}.{{[/\\]}}./test.h
diff --git a/llvm/test/tools/llvm-symbolizer/coff-dwarf.test b/llvm/test/tools/llvm-symbolizer/coff-dwarf.test
index 21d06b197ee9f..73dfd4d776bb5 100644
--- a/llvm/test/tools/llvm-symbolizer/coff-dwarf.test
+++ b/llvm/test/tools/llvm-symbolizer/coff-dwarf.test
@@ -1,8 +1,8 @@
-RUN: llvm-symbolizer 0x5009 0x5038 --inlining --relative-address -obj="%p/Inputs/coff-dwarf.exe" \
+RUN: llvm-symbolizer 0x5009 0x5038 --inlining --relative-address --obj="%p/Inputs/coff-dwarf.exe" \
RUN: | FileCheck %s
-RUN: llvm-symbolizer 0x5009 0x5038 --inlines --relative-address -obj="%p/Inputs/coff-dwarf.exe" \
+RUN: llvm-symbolizer 0x5009 0x5038 --inlines --relative-address --obj="%p/Inputs/coff-dwarf.exe" \
RUN: | FileCheck %s
-RUN: llvm-symbolizer 0x5009 0x5038 -i --relative-address -obj="%p/Inputs/coff-dwarf.exe" \
+RUN: llvm-symbolizer 0x5009 0x5038 -i --relative-address --obj="%p/Inputs/coff-dwarf.exe" \
RUN: | FileCheck %s
CHECK: foo(void)
diff --git a/llvm/test/tools/llvm-symbolizer/coff-exports.test b/llvm/test/tools/llvm-symbolizer/coff-exports.test
index a5d972f6e49dd..4fdeb5c057980 100644
--- a/llvm/test/tools/llvm-symbolizer/coff-exports.test
+++ b/llvm/test/tools/llvm-symbolizer/coff-exports.test
@@ -1,8 +1,8 @@
-RUN: llvm-symbolizer 0x500A 0x5038 0x504B --inlining --relative-address -obj="%p/Inputs/coff-exports.exe" \
+RUN: llvm-symbolizer 0x500A 0x5038 0x504B --inlining --relative-address --obj="%p/Inputs/coff-exports.exe" \
RUN: | FileCheck %s
-RUN: llvm-symbolizer 0x500A 0x5038 0x504B --inlines --relative-address -obj="%p/Inputs/coff-exports.exe" \
+RUN: llvm-symbolizer 0x500A 0x5038 0x504B --inlines --relative-address --obj="%p/Inputs/coff-exports.exe" \
RUN: | FileCheck %s
-RUN: llvm-symbolizer 0x500A 0x5038 0x504B -i --relative-address -obj="%p/Inputs/coff-exports.exe" \
+RUN: llvm-symbolizer 0x500A 0x5038 0x504B -i --relative-address --obj="%p/Inputs/coff-exports.exe" \
RUN: | FileCheck %s
We get the expected stack trace, except 'foo' appears for the 'bar' frame
diff --git a/llvm/test/tools/llvm-symbolizer/dsym.test b/llvm/test/tools/llvm-symbolizer/dsym.test
index 326602d3f7336..366224d4422d7 100644
--- a/llvm/test/tools/llvm-symbolizer/dsym.test
+++ b/llvm/test/tools/llvm-symbolizer/dsym.test
@@ -1,7 +1,7 @@
RUN: echo "%p/Inputs/dsym-test-exe 0x0000000100000f90" > %t.input
RUN: echo "%p/Inputs/dsym-test-exe-second 0x0000000100000f90" >> %t.input
RUN: llvm-symbolizer < %t.input | FileCheck %s --check-prefix=CHECK-NOHINT
-RUN: llvm-symbolizer -dsym-hint=%p/Inputs/dsym-test-exe-
diff erentname.dSYM < %t.input | FileCheck %s --check-prefix=CHECK-HINT
+RUN: llvm-symbolizer --dsym-hint=%p/Inputs/dsym-test-exe-
diff erentname.dSYM < %t.input | FileCheck %s --check-prefix=CHECK-HINT
CHECK-NOHINT: main
CHECK-NOHINT: dsym-test.c
diff --git a/llvm/test/tools/llvm-symbolizer/fat.test b/llvm/test/tools/llvm-symbolizer/fat.test
index 4596b4e079dbe..2721708ff7fcf 100644
--- a/llvm/test/tools/llvm-symbolizer/fat.test
+++ b/llvm/test/tools/llvm-symbolizer/fat.test
@@ -1,8 +1,8 @@
-RUN: llvm-symbolizer 0 -obj=%p/Inputs/fat.o -default-arch=x86_64 | FileCheck --check-prefix=X86_64 %s
-RUN: llvm-symbolizer 0 -obj=%p/Inputs/fat.o -default-arch=x86_64h | FileCheck --check-prefix=X86_64H %s
-RUN: llvm-symbolizer 0 -obj=%p/Inputs/fat.o -default-arch=armv7 | FileCheck --check-prefix=ARMV7 %s
-RUN: llvm-symbolizer 0 -obj=%p/Inputs/fat.o -default-arch=armv7em | FileCheck --check-prefix=ARMV7EM %s
-RUN: llvm-symbolizer 0 -obj=%p/Inputs/fat.o -default-arch=armv7m | FileCheck --check-prefix=ARMV7M %s
+RUN: llvm-symbolizer 0 --obj=%p/Inputs/fat.o --default-arch=x86_64 | FileCheck --check-prefix=X86_64 %s
+RUN: llvm-symbolizer 0 --obj=%p/Inputs/fat.o --default-arch=x86_64h | FileCheck --check-prefix=X86_64H %s
+RUN: llvm-symbolizer 0 --obj=%p/Inputs/fat.o --default-arch=armv7 | FileCheck --check-prefix=ARMV7 %s
+RUN: llvm-symbolizer 0 --obj=%p/Inputs/fat.o --default-arch=armv7em | FileCheck --check-prefix=ARMV7EM %s
+RUN: llvm-symbolizer 0 --obj=%p/Inputs/fat.o --default-arch=armv7m | FileCheck --check-prefix=ARMV7M %s
X86_64: x86_64_function
X86_64H: x86_64h_function
diff --git a/llvm/test/tools/llvm-symbolizer/flag-grouping.test b/llvm/test/tools/llvm-symbolizer/flag-grouping.test
index edc6d02c2b9f6..cc2dbfdc893d9 100644
--- a/llvm/test/tools/llvm-symbolizer/flag-grouping.test
+++ b/llvm/test/tools/llvm-symbolizer/flag-grouping.test
@@ -1,4 +1,4 @@
-RUN: llvm-symbolizer -apCi -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
+RUN: llvm-symbolizer -apCi --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
RUN: llvm-symbolizer -apCie %p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
RUN: llvm-symbolizer -apCie=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
RUN: llvm-symbolizer -apCie%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
diff --git a/llvm/test/tools/llvm-symbolizer/padding-x86_64.ll b/llvm/test/tools/llvm-symbolizer/padding-x86_64.ll
index 7b2cff8b276d3..e8f4c6323038c 100644
--- a/llvm/test/tools/llvm-symbolizer/padding-x86_64.ll
+++ b/llvm/test/tools/llvm-symbolizer/padding-x86_64.ll
@@ -2,9 +2,9 @@
; Checks if symbolizer can correctly symbolize address in the padding between
; functions.
; RUN: llc -o %t.o -filetype=obj -mtriple=x86_64-pc-linux %s
-; RUN: llvm-symbolizer 0x5 -obj=%t.o | FileCheck %s --check-prefix=FOO
-; RUN: llvm-symbolizer 0xd -obj=%t.o | FileCheck %s --check-prefix=PADDING
-; RUN: llvm-symbolizer 0x10 -obj=%t.o | FileCheck %s --check-prefix=MAIN
+; RUN: llvm-symbolizer 0x5 --obj=%t.o | FileCheck %s --check-prefix=FOO
+; RUN: llvm-symbolizer 0xd --obj=%t.o | FileCheck %s --check-prefix=PADDING
+; RUN: llvm-symbolizer 0x10 --obj=%t.o | FileCheck %s --check-prefix=MAIN
;FOO: foo
;PADDING: ??
diff --git a/llvm/test/tools/llvm-symbolizer/ppc64.test b/llvm/test/tools/llvm-symbolizer/ppc64.test
index 681557cd2e54d..803e1c84ab190 100644
--- a/llvm/test/tools/llvm-symbolizer/ppc64.test
+++ b/llvm/test/tools/llvm-symbolizer/ppc64.test
@@ -4,7 +4,7 @@ int foo() { return 0; }
int bar() { return foo(); }
int _start() { return bar(); }
-RUN: llvm-symbolizer 0x1000014c 0x1000018c 0x100001cc -obj=%p/Inputs/ppc64 | FileCheck %s
+RUN: llvm-symbolizer 0x1000014c 0x1000018c 0x100001cc --obj=%p/Inputs/ppc64 | FileCheck %s
CHECK: foo
CHECK: bar
diff --git a/llvm/test/tools/llvm-symbolizer/print_context.c b/llvm/test/tools/llvm-symbolizer/print_context.c
index 94a1108bd9b38..9df41cf107527 100644
--- a/llvm/test/tools/llvm-symbolizer/print_context.c
+++ b/llvm/test/tools/llvm-symbolizer/print_context.c
@@ -13,7 +13,7 @@ int main() {
// RUN: cp %s %t/
// RUN: cp %p/Inputs/print_context.o %t
// RUN: cd %t
-// RUN: llvm-symbolizer -obj=%t/print_context.o 0x0 -print-source-context-lines=5 | FileCheck %s
+// RUN: llvm-symbolizer --obj=%t/print_context.o 0x0 --print-source-context-lines=5 | FileCheck %s
// Inputs/print_context.o built with plain -g -c from this source file
// Specifying -Xclang -fdebug-compilation-dir -Xclang . to make the debug info
diff --git a/llvm/test/tools/llvm-symbolizer/split-debug.test b/llvm/test/tools/llvm-symbolizer/split-debug.test
index 8904683228df6..7b9f01a8bbd8b 100644
--- a/llvm/test/tools/llvm-symbolizer/split-debug.test
+++ b/llvm/test/tools/llvm-symbolizer/split-debug.test
@@ -20,7 +20,7 @@
RUN: mkdir -p %t/.debug
RUN: llvm-objcopy --keep-section=.debug_info %p/Inputs/addr.exe %t/.debug/addr
RUN: llvm-objcopy --strip-debug --add-gnu-debuglink=%t/.debug/addr %p/Inputs/addr.exe %t/addr.exe
-RUN: llvm-symbolizer -print-address -obj=%t/addr.exe 0x40054d | FileCheck %s
+RUN: llvm-symbolizer --print-address --obj=%t/addr.exe 0x40054d | FileCheck %s
#CHECK: 0x40054d
#CHECK: {{[/\]+}}tmp{{[/\]+}}x.c:14:0
diff --git a/llvm/test/tools/llvm-symbolizer/sym-verbose.test b/llvm/test/tools/llvm-symbolizer/sym-verbose.test
index 2962b98662b80..9b6f9867a26a9 100644
--- a/llvm/test/tools/llvm-symbolizer/sym-verbose.test
+++ b/llvm/test/tools/llvm-symbolizer/sym-verbose.test
@@ -11,7 +11,7 @@
#}
#Build as : clang -gmlt -fdebug-info-for-profiling -O2 discrim.c -o discrim
-RUN: llvm-symbolizer -verbose -print-address -obj=%p/Inputs/discrim < %p/Inputs/discrim.inp | FileCheck %s
+RUN: llvm-symbolizer --verbose --print-address --obj=%p/Inputs/discrim < %p/Inputs/discrim.inp | FileCheck %s
#CHECK: some text
diff --git a/llvm/test/tools/llvm-symbolizer/sym.test b/llvm/test/tools/llvm-symbolizer/sym.test
index 73097b2c4b9b6..4bb3eb0aaf5be 100644
--- a/llvm/test/tools/llvm-symbolizer/sym.test
+++ b/llvm/test/tools/llvm-symbolizer/sym.test
@@ -17,34 +17,34 @@
#
#Build as : clang -g -O2 addr.c
-RUN: llvm-symbolizer -print-address -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
-RUN: llvm-symbolizer -addresses -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
-RUN: llvm-symbolizer -a -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
-RUN: llvm-symbolizer -inlining -print-address -pretty-print -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
-RUN: llvm-symbolizer -inlining -print-address -p -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
-RUN: llvm-symbolizer -inlines -print-address -pretty-print -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
-RUN: llvm-symbolizer -inlines -print-address -p -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
-RUN: llvm-symbolizer -i -print-address -pretty-print -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
-RUN: llvm-symbolizer -i -print-address -p -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
+RUN: llvm-symbolizer --print-address --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
+RUN: llvm-symbolizer --addresses --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
+RUN: llvm-symbolizer -a --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck %s
+RUN: llvm-symbolizer --inlining --print-address --pretty-print --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
+RUN: llvm-symbolizer --inlining --print-address -p --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
+RUN: llvm-symbolizer --inlines --print-address --pretty-print --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
+RUN: llvm-symbolizer --inlines --print-address -p --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
+RUN: llvm-symbolizer -i --print-address --pretty-print --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
+RUN: llvm-symbolizer -i --print-address -p --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
## Before 2020-08-04, asan_symbolize.py passed --inlining=true.
## Support this compatibility alias for a while.
RUN: llvm-symbolizer --inlining=true --print-address -p --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix="PRETTY" %s
RUN: echo "0x1" > %t.input
-RUN: llvm-symbolizer -obj=%p/Inputs/zero < %t.input | FileCheck -check-prefix="ZERO" %s
+RUN: llvm-symbolizer --obj=%p/Inputs/zero < %t.input | FileCheck -check-prefix="ZERO" %s
-RUN: llvm-addr2line -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix=A2L %s
-RUN: llvm-addr2line -a -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2L,A2L_A %s
-RUN: llvm-addr2line -f -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2L,A2L_F %s
-RUN: llvm-addr2line -i -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2L,A2L_I %s
-RUN: llvm-addr2line -fi -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2L,A2L_F,A2L_I,A2L_FI %s
+RUN: llvm-addr2line --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefix=A2L %s
+RUN: llvm-addr2line -a --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2L,A2L_A %s
+RUN: llvm-addr2line -f --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2L,A2L_F %s
+RUN: llvm-addr2line -i --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2L,A2L_I %s
+RUN: llvm-addr2line -fi --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2L,A2L_F,A2L_I,A2L_FI %s
-RUN: llvm-addr2line -pa -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_A %s
-RUN: llvm-addr2line -pf -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_F %s
-RUN: llvm-addr2line -paf -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_AF %s
-RUN: llvm-addr2line -pai -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_A,A2LP_I %s
-RUN: llvm-addr2line -pfi -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_F,A2LP_FI %s
-RUN: llvm-addr2line -pafi -obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_AF,A2LP_FI %s
+RUN: llvm-addr2line -pa --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_A %s
+RUN: llvm-addr2line -pf --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_F %s
+RUN: llvm-addr2line -paf --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_AF %s
+RUN: llvm-addr2line -pai --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_A,A2LP_I %s
+RUN: llvm-addr2line -pfi --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_F,A2LP_FI %s
+RUN: llvm-addr2line -pafi --obj=%p/Inputs/addr.exe < %p/Inputs/addr.inp | FileCheck -check-prefixes=A2LP,A2LP_AF,A2LP_FI %s
# CHECK: some text
# CHECK-NEXT: 0x40054d
More information about the llvm-commits
mailing list