[05/27] Minor "require" fixups
Commit Message
I found a couple of spots that could use "require", and one spot where
hoisting the "require" closer to the top of the file made it more
clear.
---
gdb/testsuite/gdb.btrace/enable.exp | 5 +----
gdb/testsuite/gdb.mi/list-thread-groups-available.exp | 3 +--
gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp | 5 ++---
3 files changed, 4 insertions(+), 9 deletions(-)
@@ -76,10 +76,7 @@ gdb_exit
# skip the rerun test when using gdbserver
# otherwise rerun twice, target should be automatically disabled
load_lib gdbserver-support.exp
-if {![allow_gdbserver_tests]} {
- unsupported "target does not support gdbserver"
- return 0
-}
+require allow_gdbserver_tests
clean_restart $testfile
if ![runto_main] {
return -1
@@ -22,6 +22,7 @@ standard_testfile
# Support for XML is needed to run this test.
require allow_xml_test
+require can_spawn_for_attach
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested "failed to compile"
@@ -32,8 +33,6 @@ if [mi_gdb_start] {
return
}
-require can_spawn_for_attach
-
set string_re {(?:[^\\"]|\\.)*}
set id_re "id=\"$decimal\""
@@ -28,9 +28,8 @@ if [info exists COMPILE] {
# make check RUNTESTFLAGS="gdb.mi/mi2-amd64-entry-value.exp COMPILE=1"
set srcfile ${testfile}.c
lappend opts debug optimize=-O2
-} elseif { ![istarget x86_64-*-* ] || ![is_lp64_target] } {
- verbose "Skipping mi2-amd64-entry-value."
- return
+} else {
+ require {istarget x86_64-*-*} is_lp64_target
}
set executable ${testfile}