Skip to content

Commit f5c697b

Browse files
committed
[gdb/testsuite] Fix DUPLICATEs in s390-multiarch.exp
On s390x-linux, I run into: ... DUPLICATE: gdb.arch/s390-multiarch.exp: Linux v2 DUPLICATE: gdb.arch/s390-multiarch.exp: Linux v2 DUPLICATE: gdb.arch/s390-multiarch.exp: Linux v2 ... Fix this by using with_test_prefix. Tested on s390x-linux.
1 parent a496d4a commit f5c697b

File tree

1 file changed

+27
-23
lines changed

1 file changed

+27
-23
lines changed

gdb/testsuite/gdb.arch/s390-multiarch.exp

Lines changed: 27 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -73,45 +73,49 @@ proc test_linux_v2 {} {
7373
return 0
7474
}
7575

76-
proc test_register_valid {reg variant} {
76+
proc test_register_valid {reg} {
7777
gdb_test "info reg $reg" \
7878
"$reg\[ \t\]+0x\[0-9a-z\]+\[ \t\]+.*" \
79-
"'$reg' exists ($variant)"
79+
"'$reg' exists"
8080
}
8181

82-
proc test_register_invalid {reg variant} {
82+
proc test_register_invalid {reg} {
8383
gdb_test "info reg $reg" \
8484
"Invalid register `$reg'.*" \
85-
"'$reg' must not exist ($variant)"
85+
"'$reg' must not exist"
8686
}
8787

8888
proc test_all_core64 {core type} {
8989
set variant "64-bit $type"
90-
gdb_core_cmd $core "core-file ($variant)"
91-
if { ! [test_linux_v2] } {
92-
return
90+
with_test_prefix $variant {
91+
gdb_core_cmd $core "core-file"
92+
if { ! [test_linux_v2] } {
93+
return
94+
}
95+
test_register_valid "last_break"
96+
gdb_core_cmd "${core}.2" "core-file #2"
97+
test_register_invalid "system_call"
98+
gdb_core_cmd "${core}.3" "core-file #3"
99+
test_register_invalid "last_break"
93100
}
94-
test_register_valid "last_break" $variant
95-
gdb_core_cmd "${core}.2" "core-file #2 ($variant)"
96-
test_register_invalid "system_call" $variant
97-
gdb_core_cmd "${core}.3" "core-file #3 ($variant)"
98-
test_register_invalid "last_break" $variant
99101
}
100102

101103
proc test_all_core31 {core type} {
102104
set variant "31-bit $type"
103-
gdb_core_cmd $core "core-file ($variant)"
104-
if { ! [test_linux_v2] } {
105-
return
105+
with_test_prefix $variant {
106+
gdb_core_cmd $core "core-file"
107+
if { ! [test_linux_v2] } {
108+
return
109+
}
110+
test_register_valid "r0h"
111+
test_register_valid "last_break"
112+
gdb_core_cmd "${core}.1" "core-file #1 "
113+
test_register_invalid "r0h"
114+
gdb_core_cmd "${core}.2" "core-file #2"
115+
test_register_invalid "system_call"
116+
gdb_core_cmd "${core}.3" "core-file #3"
117+
test_register_invalid "last_break"
106118
}
107-
test_register_valid "r0h" $variant
108-
test_register_valid "last_break" $variant
109-
gdb_core_cmd "${core}.1" "core-file #1 ($variant)"
110-
test_register_invalid "r0h" $variant
111-
gdb_core_cmd "${core}.2" "core-file #2 ($variant)"
112-
test_register_invalid "system_call" $variant
113-
gdb_core_cmd "${core}.3" "core-file #3 ($variant)"
114-
test_register_invalid "last_break" $variant
115119
}
116120

117121
set binfile "${binprefix}-64"

0 commit comments

Comments
 (0)