Skip to content

Commit 4438b4b

Browse files
davidtwcoDavid Wood
authored andcommitted
increase consistency of tests
Lots of minor aesthetic changes (line wrapping, indentation, etc) to make the test suite more consistent. Signed-off-by: David Wood <[email protected]>
1 parent 45b639a commit 4438b4b

17 files changed

+35
-57
lines changed

tests/absolute-paths.test

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
; RUN: rm -rf %t
22
; RUN: mkdir -p %t
3-
; RUN: llc %s -mtriple=x86_64-linux --split-dwarf-file=%t/test.dwo --split-dwarf-output=%t/test.dwo --filetype=obj -o %t/test.o
3+
; RUN: llc %s -mtriple=x86_64-linux --split-dwarf-file=%t/test.dwo \
4+
; RUN: --split-dwarf-output=%t/test.dwo --filetype=obj -o %t/test.o
45
; RUN: llvm-dwarfdump -v %t/test.dwo | FileCheck %s -DPATH=%t
56
; RUN: thorin -e %t/test.o -o %t/test.dwp
67
; RUN: llvm-dwarfdump -v %t/test.dwp | FileCheck %s -DPATH=%t

tests/archive-with-arbitrary.test

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ RUN: rm -rf %t
22
RUN: mkdir %t
33
RUN: cd %t
44
RUN: llvm-ar q inputs.ar \
5-
RUN: %p/inputs/dwos-list-from-exec-a.dwo \
6-
RUN: %p/inputs/dwos-list-from-exec-b.dwo \
7-
RUN: %p/inputs/dwos-list-from-exec-c.dwo \
8-
RUN: %p/inputs/dwos-list-from-exec-d.dwo \
9-
RUN: %p/inputs/dwos-list-from-exec-e.dwo \
10-
RUN: %p/archive-with-arbitrary.test
5+
RUN: %p/inputs/dwos-list-from-exec-a.dwo \
6+
RUN: %p/inputs/dwos-list-from-exec-b.dwo \
7+
RUN: %p/inputs/dwos-list-from-exec-c.dwo \
8+
RUN: %p/inputs/dwos-list-from-exec-d.dwo \
9+
RUN: %p/inputs/dwos-list-from-exec-e.dwo \
10+
RUN: %p/archive-with-arbitrary.test
1111
RUN: thorin inputs.ar \
12-
RUN: -e %p/inputs/dwos-list-from-exec-main \
13-
RUN: -e %p/inputs/dwos-list-from-exec-libd.so -o - | llvm-dwarfdump -v - | FileCheck %s
12+
RUN: -e %p/inputs/dwos-list-from-exec-main \
13+
RUN: -e %p/inputs/dwos-list-from-exec-libd.so -o - | llvm-dwarfdump -v - | FileCheck %s
1414

1515
CHECK-LABEL: .debug_abbrev.dwo contents:
1616

tests/archive.test

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,17 @@ RUN: rm -rf %t
22
RUN: mkdir %t
33
RUN: cd %t
44
RUN: llvm-ar q inputs.ar \
5-
RUN: %p/inputs/dwos-list-from-exec-a.dwo \
6-
RUN: %p/inputs/dwos-list-from-exec-b.dwo \
7-
RUN: %p/inputs/dwos-list-from-exec-c.dwo \
8-
RUN: %p/inputs/dwos-list-from-exec-d.dwo \
9-
RUN: %p/inputs/dwos-list-from-exec-e.dwo
5+
RUN: %p/inputs/dwos-list-from-exec-a.dwo \
6+
RUN: %p/inputs/dwos-list-from-exec-b.dwo \
7+
RUN: %p/inputs/dwos-list-from-exec-c.dwo \
8+
RUN: %p/inputs/dwos-list-from-exec-d.dwo \
9+
RUN: %p/inputs/dwos-list-from-exec-e.dwo
1010
RUN: thorin inputs.ar \
11-
RUN: -e %p/inputs/dwos-list-from-exec-main \
12-
RUN: -e %p/inputs/dwos-list-from-exec-libd.so -o - | llvm-dwarfdump -v - | FileCheck %s
11+
RUN: -e %p/inputs/dwos-list-from-exec-main \
12+
RUN: -e %p/inputs/dwos-list-from-exec-libd.so -o - | llvm-dwarfdump -v - | FileCheck %s
1313
RUN: not thorin \
14-
RUN: -e %p/inputs/dwos-list-from-exec-main \
15-
RUN: -e %p/inputs/dwos-list-from-exec-libd.so -o - 2>&1 | FileCheck --check-prefix=MISSING %s
14+
RUN: -e %p/inputs/dwos-list-from-exec-main \
15+
RUN: -e %p/inputs/dwos-list-from-exec-libd.so -o - 2>&1 | FileCheck --check-prefix=MISSING %s
1616

1717
CHECK-LABEL: .debug_abbrev.dwo contents:
1818

tests/cu-and-tu-info-section-v5.s

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,12 @@
1-
# This test checks if thorin can find the compilation unit if
2-
# both type and compile units are available in the debug info section (v5)
3-
4-
# RUN: llvm-mc --triple=x86_64-unknown-linux --filetype=obj --split-dwarf-file=%t.dwo -dwarf-version=5 %s -o %t.o
1+
# RUN: llvm-mc --triple=x86_64-unknown-linux --filetype=obj --split-dwarf-file=%t.dwo \
2+
# RUN: -dwarf-version=5 %s -o %t.o
53
# RUN: thorin %t.dwo -o %t.dwp
64
# RUN: llvm-dwarfdump -debug-info -debug-tu-index %t.dwp | FileCheck %s
75

8-
## Note: For this test we do not need to define the DIE for the structure type, as we only want to
9-
## have the info on the type and compile units.
10-
116
# CHECK-DAG: .debug_info.dwo contents
127
# CHECK: 0x00000000: Type Unit: length = 0x00000017, format = DWARF32, version = 0x0005, unit_type = DW_UT_split_type, abbr_offset = 0x0000, addr_size = 0x08, name = '', type_signature = {{.*}}, type_offset = 0x0019 (next unit at 0x0000001b)
138
# CHECK: 0x0000001b: Compile Unit: length = 0x00000011, format = DWARF32, version = 0x0005, unit_type = DW_UT_split_compile, abbr_offset = 0x0000, addr_size = 0x08, DWO_id = {{.*}} (next unit at 0x00000030)
9+
1410
.section .debug_info.dwo,"e",@progbits
1511
.long .Ldebug_info_dwo_end0-.Ldebug_info_dwo_start0 # Length of Unit
1612
.Ldebug_info_dwo_start0:

tests/debug-macro-v5.s

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
# This test checks the support for writing macro sections and their index (v5).
2-
3-
# RUN: llvm-mc -triple x86_64-unknown-linux --filetype=obj --split-dwarf-file=%t.dwo -dwarf-version=5 %s -o %t.o
1+
# RUN: llvm-mc -triple x86_64-unknown-linux --filetype=obj --split-dwarf-file=%t.dwo \
2+
# RUN: -dwarf-version=5 %s -o %t.o
43
# RUN: thorin %t.dwo -o %t.dwp 2>&1
54
# RUN: llvm-dwarfdump -debug-macro -debug-cu-index %t.dwp | FileCheck %s
65

tests/gcc-type.test

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@ RUN: not thorin %p/inputs/gcc-type.dwo %p/inputs/gcc-type.dwo -o %t 2>&1 | FileC
44
CHECK: Type Unit
55
CHECK: Type Unit
66

7-
// Check that thorin can parse DW_FORM_string for CU name
87
DUP: Error: Failed to add input object to DWARF package
98
DUP: Found duplicate split compilation unit ({{.*}})

tests/handle-strx.test

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,6 @@ RUN: llvm-dwarfdump --verbose %t 2>/dev/null | FileCheck --check-prefix=READ_STR
44
RUN: not thorin %p/inputs/handle-strx-v5.dwo %p/inputs/handle-strx-v5.dwo -o %t 2>&1 \
55
RUN: | FileCheck --check-prefix=PARSE_STRX %s
66

7-
8-
dw5.o is compiled from a file that contains a single empty void function,
9-
with options -gdwarf-5 and -gsplit-dwarf.
10-
117
READ_STRX: DW_AT_name [DW_FORM_strx1]{{.*}}dw5.cc
128

139
PARSE_STRX: Error: Failed to add input object to DWARF package

tests/info-v5.s

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,10 @@
1-
# this checks thorin handling of DWARFv5 Info section header.
2-
31
# RUN: llvm-mc --triple=x86_64-unknown-linux --filetype=obj --split-dwarf-file=%t.dwo -dwarf-version=5 %s -o %t.o
42

53
# RUN: thorin %t.dwo -o %t.dwp
64
# RUN: llvm-dwarfdump -v %t.dwp | FileCheck %s
75

8-
#CHECK-DAG: .debug_info.dwo contents:
9-
#CHECK: 0x00000000: Compile Unit: length = 0x00000050, format = DWARF32, version = 0x0005, unit_type = DW_UT_split_compile, abbr_offset = 0x0000, addr_size = 0x08, DWO_id = [[DWOID:.*]] (next unit at 0x00000054)
6+
# CHECK-DAG: .debug_info.dwo contents:
7+
# CHECK: 0x00000000: Compile Unit: length = 0x00000050, format = DWARF32, version = 0x0005, unit_type = DW_UT_split_compile, abbr_offset = 0x0000, addr_size = 0x08, DWO_id = [[DWOID:.*]] (next unit at 0x00000054)
108

119
# CHECK-DAG: .debug_cu_index contents:
1210
# CHECK: version = 5, units = 1, slots = 2

tests/invalid-cu-header-length-type.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
# CHECK: Error: Failed to add input object to DWARF package
66
# CHECK: 0: Failed to parse unit header
77
# CHECK: 1: Hit the end of input before it was expected
8+
89
.section .debug_info.dwo,"e",@progbits
910
.short 0 # Length of Unit

tests/invalid-cu-header-version.s

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@
55
# CHECK: Error: Failed to add input object to DWARF package
66
# CHECK: 0: Failed to parse unit header
77
# CHECK: 1: Hit the end of input before it was expected
8+
89
.section .debug_info.dwo,"e",@progbits
910
.long 0 # Length of Unit

0 commit comments

Comments
 (0)