[llvm] r352847 - [llvm-symbolizer][test] Rename and tweak tests using llvm-symbolizer
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 1 02:24:55 PST 2019
Author: jhenderson
Date: Fri Feb 1 02:24:55 2019
New Revision: 352847
URL: http://llvm.org/viewvc/llvm-project?rev=352847&view=rev
Log:
[llvm-symbolizer][test] Rename and tweak tests using llvm-symbolizer
Prior to this change, there are a few tests called llvm-symbolizer* in
the DebugInfo test area. These really were testing either the DebugInfo
or Symbolizer library, rather than the llvm-symbolizer tool itself, so
this patch renames them to be clearer that they aren't explicitly tests
for llvm-symbolizer (such tests belong in test/tools/llvm-symbolizer).
This patch also reinstates the copying of a DWO file, removed previously
in r352752. The test needs this so that it could possibly fail.
Finally, some of the tests have been simplified slightly by removing
unnecessary switches and/or unused check-prefixes.
Reviewed by: dblaikie
Differential Revision: https://reviews.llvm.org/D57518
Added:
llvm/trunk/test/DebugInfo/symbolize-split-dwarf-empty.test
- copied, changed from r352844, llvm/trunk/test/DebugInfo/llvm-symbolizer-split-dwarf-empty.test
llvm/trunk/test/DebugInfo/symbolize-split-dwarf-no-skel-address.test
- copied, changed from r352844, llvm/trunk/test/DebugInfo/llvm-symbolizer-split-dwarf-no-skel-address.test
llvm/trunk/test/DebugInfo/symbolize-tu.test
- copied unchanged from r352844, llvm/trunk/test/DebugInfo/llvm-symbolizer-tu.test
llvm/trunk/test/DebugInfo/symbolize-zlib.test
- copied unchanged from r352844, llvm/trunk/test/DebugInfo/llvm-symbolizer-zlib.test
llvm/trunk/test/DebugInfo/symbolize.test
- copied, changed from r352844, llvm/trunk/test/DebugInfo/llvm-symbolizer.test
Removed:
llvm/trunk/test/DebugInfo/llvm-symbolizer-split-dwarf-empty.test
llvm/trunk/test/DebugInfo/llvm-symbolizer-split-dwarf-no-skel-address.test
llvm/trunk/test/DebugInfo/llvm-symbolizer-tu.test
llvm/trunk/test/DebugInfo/llvm-symbolizer-zlib.test
llvm/trunk/test/DebugInfo/llvm-symbolizer.test
Removed: llvm/trunk/test/DebugInfo/llvm-symbolizer-split-dwarf-empty.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/llvm-symbolizer-split-dwarf-empty.test?rev=352846&view=auto
==============================================================================
--- llvm/trunk/test/DebugInfo/llvm-symbolizer-split-dwarf-empty.test (original)
+++ llvm/trunk/test/DebugInfo/llvm-symbolizer-split-dwarf-empty.test (removed)
@@ -1,10 +0,0 @@
-RUN: rm -rf %t && mkdir -p %t
-RUN: cd %t
-RUN: cp %p/Inputs/split-dwarf-empty.dwo %t
-RUN: echo "%p/Inputs/split-dwarf-empty.o 0xdeadbeef" > %t.input
-
-RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false \
-RUN: --default-arch=i386 < %t.input | FileCheck %s
-
-CHECK: ??
-CHECK: ??:0:0
Removed: llvm/trunk/test/DebugInfo/llvm-symbolizer-split-dwarf-no-skel-address.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/llvm-symbolizer-split-dwarf-no-skel-address.test?rev=352846&view=auto
==============================================================================
--- llvm/trunk/test/DebugInfo/llvm-symbolizer-split-dwarf-no-skel-address.test (original)
+++ llvm/trunk/test/DebugInfo/llvm-symbolizer-split-dwarf-no-skel-address.test (removed)
@@ -1,17 +0,0 @@
-RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false \
-RUN: --default-arch=i386 --obj=%p/Inputs/split-dwarf-no-skel-address.o 0x4 | FileCheck %s
-
-Built from the following source:
-void f1();
-__attribute__((always_inline)) inline void f2() { f1(); }
-void f3() { f2(); }
-
-Compiled to assembly with clang, modified the skeleton CU to remove the
-high/low pc (& update the CU length field and abbrev to match) & then
-compile/objcopy to make the .o and .dwo.
-
-Ensure that the f2 inlined frame is not included - it's inefficient to have to
-go and load all the debug info and search for the address ranges, so assume
-that a lack of ranges on the CU means the CU covers no addresses.
-
-CHECK-NOT: _Z2f2v
Removed: llvm/trunk/test/DebugInfo/llvm-symbolizer-tu.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/llvm-symbolizer-tu.test?rev=352846&view=auto
==============================================================================
--- llvm/trunk/test/DebugInfo/llvm-symbolizer-tu.test (original)
+++ llvm/trunk/test/DebugInfo/llvm-symbolizer-tu.test (removed)
@@ -1,7 +0,0 @@
-RUN: llvm-symbolizer --obj=%p/Inputs/llvm-symbolizer-tu.elf-x86-64 0x0 | FileCheck %s
-
-Built from the following source:
-
-...
-
-CHECK: b.cpp:3:0
Removed: llvm/trunk/test/DebugInfo/llvm-symbolizer-zlib.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/llvm-symbolizer-zlib.test?rev=352846&view=auto
==============================================================================
--- llvm/trunk/test/DebugInfo/llvm-symbolizer-zlib.test (original)
+++ llvm/trunk/test/DebugInfo/llvm-symbolizer-zlib.test (removed)
@@ -1,7 +0,0 @@
-REQUIRES: zlib
-
-RUN: llvm-symbolizer --obj=%p/Inputs/dwarfdump-test-zlib.elf-x86-64 0x4005e9 | FileCheck %s
-RUN: llvm-symbolizer --obj=%p/Inputs/dwarfdump-test-zlibgnu.elf-x86-64 0x4005e9 | FileCheck %s
-
-CHECK: main
-CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test-zlib.cc:16
Removed: llvm/trunk/test/DebugInfo/llvm-symbolizer.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/llvm-symbolizer.test?rev=352846&view=auto
==============================================================================
--- llvm/trunk/test/DebugInfo/llvm-symbolizer.test (original)
+++ llvm/trunk/test/DebugInfo/llvm-symbolizer.test (removed)
@@ -1,30 +0,0 @@
-RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x40113f" > %t.input
-RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x401020" >> %t.input
-RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x40110e" >> %t.input
-RUN: echo "%p/Inputs/dwarfdump-test.elf-x86-64 0x401160" >> %t.input
-RUN: echo "%p/Inputs/dwarfdump-test2.elf-x86-64 0x4004e8" >> %t.input
-RUN: echo "%p/Inputs/dwarfdump-test2.elf-x86-64 0x4004f4" >> %t.input
-RUN: echo "%p/Inputs/dwarfdump-test4.elf-x86-64 0x62c" >> %t.input
-
-RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false \
-RUN: < %t.input | FileCheck --check-prefix=CHECK --check-prefix=SPLIT --check-prefix=DWO %s
-
-CHECK: main
-CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16
-
-CHECK: _start
-
-CHECK: _Z1fii
-CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:11
-
-CHECK: DummyClass
-CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:4
-
-CHECK: a
-CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test2-helper.cc:2
-
-CHECK: main
-CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test2-main.cc:4
-
-CHECK: _Z1cv
-CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test4-part1.cc:2
Copied: llvm/trunk/test/DebugInfo/symbolize-split-dwarf-empty.test (from r352844, llvm/trunk/test/DebugInfo/llvm-symbolizer-split-dwarf-empty.test)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/symbolize-split-dwarf-empty.test?p2=llvm/trunk/test/DebugInfo/symbolize-split-dwarf-empty.test&p1=llvm/trunk/test/DebugInfo/llvm-symbolizer-split-dwarf-empty.test&r1=352844&r2=352847&rev=352847&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/llvm-symbolizer-split-dwarf-empty.test (original)
+++ llvm/trunk/test/DebugInfo/symbolize-split-dwarf-empty.test Fri Feb 1 02:24:55 2019
@@ -1,10 +1,9 @@
+cd and copy the DWO into the same directory so that it can be found by the
+symbolizer.
RUN: rm -rf %t && mkdir -p %t
RUN: cd %t
RUN: cp %p/Inputs/split-dwarf-empty.dwo %t
-RUN: echo "%p/Inputs/split-dwarf-empty.o 0xdeadbeef" > %t.input
-
-RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false \
-RUN: --default-arch=i386 < %t.input | FileCheck %s
+RUN: llvm-symbolizer --inlining --obj=%p/Inputs/split-dwarf-empty.o 0xdeadbeef | FileCheck %s
CHECK: ??
CHECK: ??:0:0
Copied: llvm/trunk/test/DebugInfo/symbolize-split-dwarf-no-skel-address.test (from r352844, llvm/trunk/test/DebugInfo/llvm-symbolizer-split-dwarf-no-skel-address.test)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/symbolize-split-dwarf-no-skel-address.test?p2=llvm/trunk/test/DebugInfo/symbolize-split-dwarf-no-skel-address.test&p1=llvm/trunk/test/DebugInfo/llvm-symbolizer-split-dwarf-no-skel-address.test&r1=352844&r2=352847&rev=352847&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/llvm-symbolizer-split-dwarf-no-skel-address.test (original)
+++ llvm/trunk/test/DebugInfo/symbolize-split-dwarf-no-skel-address.test Fri Feb 1 02:24:55 2019
@@ -1,5 +1,10 @@
-RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false \
-RUN: --default-arch=i386 --obj=%p/Inputs/split-dwarf-no-skel-address.o 0x4 | FileCheck %s
+Copy the DWO and then cd into the output directory, so that the symbolizer would
+find the DWO if it attempted to.
+RUN: rm -rf %t && mkdir -p %t
+RUN: cd %t
+RUN: cp %p/Inputs/split-dwarf-no-skel-address.dwo %t
+RUN: llvm-symbolizer --inlining --no-demangle \
+RUN: --obj=%p/Inputs/split-dwarf-no-skel-address.o 0x4 | FileCheck %s
Built from the following source:
void f1();
Copied: llvm/trunk/test/DebugInfo/symbolize.test (from r352844, llvm/trunk/test/DebugInfo/llvm-symbolizer.test)
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/symbolize.test?p2=llvm/trunk/test/DebugInfo/symbolize.test&p1=llvm/trunk/test/DebugInfo/llvm-symbolizer.test&r1=352844&r2=352847&rev=352847&view=diff
==============================================================================
--- llvm/trunk/test/DebugInfo/llvm-symbolizer.test (original)
+++ llvm/trunk/test/DebugInfo/symbolize.test Fri Feb 1 02:24:55 2019
@@ -6,25 +6,24 @@ RUN: echo "%p/Inputs/dwarfdump-test2.elf
RUN: echo "%p/Inputs/dwarfdump-test2.elf-x86-64 0x4004f4" >> %t.input
RUN: echo "%p/Inputs/dwarfdump-test4.elf-x86-64 0x62c" >> %t.input
-RUN: llvm-symbolizer --functions=linkage --inlining --demangle=false \
-RUN: < %t.input | FileCheck --check-prefix=CHECK --check-prefix=SPLIT --check-prefix=DWO %s
+RUN: llvm-symbolizer < %t.input | FileCheck %s
CHECK: main
CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:16
CHECK: _start
-CHECK: _Z1fii
+CHECK: f(int, int)
CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:11
-CHECK: DummyClass
+CHECK: DummyClass
CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test.cc:4
-CHECK: a
+CHECK: a
CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test2-helper.cc:2
-CHECK: main
+CHECK: main
CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test2-main.cc:4
-CHECK: _Z1cv
+CHECK: c()
CHECK-NEXT: /tmp/dbginfo{{[/\\]}}dwarfdump-test4-part1.cc:2
More information about the llvm-commits
mailing list