[gdb/testsuite] Use require for ensure_gdb_index
Replace: ... if { [ensure_gdb_index $binfile] == -1 } { return -1 } ... with: ... require {ensure_gdb_index $binfile} != -1 ... and consequently, add a missing UNTESTED message. Tested on x86_64-linux, both with native and target board readnow.
This commit is contained in:
parent
dbfc69bef9
commit
19abf6c542
6 changed files with 9 additions and 15 deletions
|
@ -24,9 +24,7 @@ if {[prepare_for_testing "failed to prepare" $testfile "$srcfile $srcfile2" \
|
|||
return -1
|
||||
}
|
||||
|
||||
if { [ensure_gdb_index $binfile] == -1 } {
|
||||
return -1
|
||||
}
|
||||
require {ensure_gdb_index $binfile} != -1
|
||||
|
||||
clean_restart $binfile
|
||||
|
||||
|
|
|
@ -29,9 +29,7 @@ with_test_prefix non-symlink {
|
|||
return -1
|
||||
}
|
||||
|
||||
if { [ensure_gdb_index $binfile] == -1 } {
|
||||
return -1
|
||||
}
|
||||
require {ensure_gdb_index $binfile} != -1
|
||||
}
|
||||
|
||||
# Regenerate exec without index.
|
||||
|
|
|
@ -27,9 +27,7 @@ if { [prepare_for_testing "failed to prepare" "${testfile}" \
|
|||
return -1
|
||||
}
|
||||
|
||||
if { [ensure_gdb_index $binfile] == -1 } {
|
||||
return -1
|
||||
}
|
||||
require {ensure_gdb_index $binfile} != -1
|
||||
|
||||
# Ok, we have a copy of $binfile with an index.
|
||||
# Restart gdb and verify the index was used.
|
||||
|
|
|
@ -74,9 +74,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
|
|||
return -1
|
||||
}
|
||||
|
||||
if { [ensure_gdb_index $binfile] == -1 } {
|
||||
return -1
|
||||
}
|
||||
require {ensure_gdb_index $binfile} != -1
|
||||
|
||||
clean_restart ${binfile}
|
||||
|
||||
|
|
|
@ -26,9 +26,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug rust}]} {
|
|||
return -1
|
||||
}
|
||||
|
||||
if {[ensure_gdb_index $binfile "-dwarf-5"] == -1} {
|
||||
return -1
|
||||
}
|
||||
require {ensure_gdb_index $binfile -dwarf-5} != -1
|
||||
|
||||
gdb_exit
|
||||
gdb_start
|
||||
|
|
|
@ -8247,6 +8247,10 @@ proc require { fn arg1 {arg2 ""} } {
|
|||
|
||||
switch "$fn $op $val" {
|
||||
"gdb_skip_xml_test == 0" { set msg "missing xml support" }
|
||||
"ensure_gdb_index $binfile != -1" -
|
||||
"ensure_gdb_index $binfile -dwarf-5 != -1" {
|
||||
set msg "Couldn't ensure index in binfile"
|
||||
}
|
||||
default { set msg "$fn != $val" }
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue