mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-23 19:50:13 +08:00
[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.
This commit is contained in:
@ -73,45 +73,49 @@ proc test_linux_v2 {} {
|
||||
return 0
|
||||
}
|
||||
|
||||
proc test_register_valid {reg variant} {
|
||||
proc test_register_valid {reg} {
|
||||
gdb_test "info reg $reg" \
|
||||
"$reg\[ \t\]+0x\[0-9a-z\]+\[ \t\]+.*" \
|
||||
"'$reg' exists ($variant)"
|
||||
"'$reg' exists"
|
||||
}
|
||||
|
||||
proc test_register_invalid {reg variant} {
|
||||
proc test_register_invalid {reg} {
|
||||
gdb_test "info reg $reg" \
|
||||
"Invalid register `$reg'.*" \
|
||||
"'$reg' must not exist ($variant)"
|
||||
"'$reg' must not exist"
|
||||
}
|
||||
|
||||
proc test_all_core64 {core type} {
|
||||
set variant "64-bit $type"
|
||||
gdb_core_cmd $core "core-file ($variant)"
|
||||
with_test_prefix $variant {
|
||||
gdb_core_cmd $core "core-file"
|
||||
if { ! [test_linux_v2] } {
|
||||
return
|
||||
}
|
||||
test_register_valid "last_break" $variant
|
||||
gdb_core_cmd "${core}.2" "core-file #2 ($variant)"
|
||||
test_register_invalid "system_call" $variant
|
||||
gdb_core_cmd "${core}.3" "core-file #3 ($variant)"
|
||||
test_register_invalid "last_break" $variant
|
||||
test_register_valid "last_break"
|
||||
gdb_core_cmd "${core}.2" "core-file #2"
|
||||
test_register_invalid "system_call"
|
||||
gdb_core_cmd "${core}.3" "core-file #3"
|
||||
test_register_invalid "last_break"
|
||||
}
|
||||
}
|
||||
|
||||
proc test_all_core31 {core type} {
|
||||
set variant "31-bit $type"
|
||||
gdb_core_cmd $core "core-file ($variant)"
|
||||
with_test_prefix $variant {
|
||||
gdb_core_cmd $core "core-file"
|
||||
if { ! [test_linux_v2] } {
|
||||
return
|
||||
}
|
||||
test_register_valid "r0h" $variant
|
||||
test_register_valid "last_break" $variant
|
||||
gdb_core_cmd "${core}.1" "core-file #1 ($variant)"
|
||||
test_register_invalid "r0h" $variant
|
||||
gdb_core_cmd "${core}.2" "core-file #2 ($variant)"
|
||||
test_register_invalid "system_call" $variant
|
||||
gdb_core_cmd "${core}.3" "core-file #3 ($variant)"
|
||||
test_register_invalid "last_break" $variant
|
||||
test_register_valid "r0h"
|
||||
test_register_valid "last_break"
|
||||
gdb_core_cmd "${core}.1" "core-file #1 "
|
||||
test_register_invalid "r0h"
|
||||
gdb_core_cmd "${core}.2" "core-file #2"
|
||||
test_register_invalid "system_call"
|
||||
gdb_core_cmd "${core}.3" "core-file #3"
|
||||
test_register_invalid "last_break"
|
||||
}
|
||||
}
|
||||
|
||||
set binfile "${binprefix}-64"
|
||||
|
Reference in New Issue
Block a user