aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-11-14 14:31:52 +0000
committerAndrew Burgess <aburgess@redhat.com>2022-11-28 21:04:10 +0000
commitf50c72da4dc7ab67ea244e9c6e97404a04700c2d (patch)
tree4578749e362a255867a99829736e24bf543a34b0 /gdb/testsuite/gdb.mi
parent0216141ac37843192e3525dda4cc3c58810ee195 (diff)
downloadgdb-f50c72da4dc7ab67ea244e9c6e97404a04700c2d.zip
gdb-f50c72da4dc7ab67ea244e9c6e97404a04700c2d.tar.gz
gdb-f50c72da4dc7ab67ea244e9c6e97404a04700c2d.tar.bz2
gdb/testsuite: remove use of then keyword from gdb.*/*.exp scripts
The canonical form of 'if' in modern TCL is 'if {} {}'. But there's still a bunch of places in the testsuite where we make use of the 'then' keyword, and sometimes these get copies into new tests, which just spreads poor practice. This commit removes all use of the 'then' keyword from the remaining gdb.*/*.exp scripts. Previous commits have done the bulk of this removal, this commit just handles the remaining directories that each contain a low number of instances. There should be no changes in what is tested after this commit.
Diffstat (limited to 'gdb/testsuite/gdb.mi')
-rw-r--r--gdb/testsuite/gdb.mi/list-thread-groups-available.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-async.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-corefile.exp2
-rw-r--r--gdb/testsuite/gdb.mi/mi-frame-regs.exp4
-rw-r--r--gdb/testsuite/gdb.mi/mi-info-os.exp4
-rw-r--r--gdb/testsuite/gdb.mi/mi-regs.exp2
6 files changed, 8 insertions, 8 deletions
diff --git a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
index c4cad20..4b3c6d7 100644
--- a/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
+++ b/gdb/testsuite/gdb.mi/list-thread-groups-available.exp
@@ -21,7 +21,7 @@ set MIFLAGS "-i=mi"
standard_testfile
# Support for XML is needed to run this test.
-if [gdb_skip_xml_test] then {
+if {[gdb_skip_xml_test]} {
unsupported "list-thread-groups-available.exp"
return -1
}
diff --git a/gdb/testsuite/gdb.mi/mi-async.exp b/gdb/testsuite/gdb.mi/mi-async.exp
index af16b4a..756ca11 100644
--- a/gdb/testsuite/gdb.mi/mi-async.exp
+++ b/gdb/testsuite/gdb.mi/mi-async.exp
@@ -21,7 +21,7 @@
# mi_run_cmd, it ignores whatever target the rest of GDB testsuite is
# using, and always tries to run natively. So, don't do anything unless
# we're actually testing native.
-if { !([isnative] && [istarget *-linux*]) } then {
+if {!([isnative] && [istarget *-linux*])} {
return
}
diff --git a/gdb/testsuite/gdb.mi/mi-corefile.exp b/gdb/testsuite/gdb.mi/mi-corefile.exp
index d8ca6b3..61aec32 100644
--- a/gdb/testsuite/gdb.mi/mi-corefile.exp
+++ b/gdb/testsuite/gdb.mi/mi-corefile.exp
@@ -18,7 +18,7 @@
load_lib mi-support.exp
set MIFLAGS "-i=mi"
-if ![isnative] then {
+if {![isnative]} {
return
}
diff --git a/gdb/testsuite/gdb.mi/mi-frame-regs.exp b/gdb/testsuite/gdb.mi/mi-frame-regs.exp
index 94a02dd..df15c59 100644
--- a/gdb/testsuite/gdb.mi/mi-frame-regs.exp
+++ b/gdb/testsuite/gdb.mi/mi-frame-regs.exp
@@ -98,7 +98,7 @@ proc_with_prefix do_floating_varobj_test {} {
# Get the address of the current breakpoint.
set bpaddr [breakpoint_address $bpnum]
- if {$bpaddr == ""} then { return }
+ if {$bpaddr == ""} { return }
# Check that the addresses are the same.
gdb_assert [expr $bpaddr == $pcval] "\$pc equals address of breakpoint in callee$i"
@@ -145,7 +145,7 @@ proc_with_prefix do_fixed_varobj_test {} {
for {set i 0} {$i < 4} {incr i} {
- if { $i == 1 } then { set first_unchanging_varnum $varnum }
+ if {$i == 1} { set first_unchanging_varnum $varnum }
mi_gdb_test "-var-create --thread 1 --frame $i - \* \$pc" \
"\\^done,.*value=\"$hex.*" \
diff --git a/gdb/testsuite/gdb.mi/mi-info-os.exp b/gdb/testsuite/gdb.mi/mi-info-os.exp
index ea4acf9..fde70bb 100644
--- a/gdb/testsuite/gdb.mi/mi-info-os.exp
+++ b/gdb/testsuite/gdb.mi/mi-info-os.exp
@@ -17,13 +17,13 @@ load_lib mi-support.exp
set MIFLAGS "-i=mi"
# This test is Linux-only.
-if ![istarget *-*-linux*] then {
+if {![istarget *-*-linux*]} {
unsupported "mi-info-os.exp"
return -1
}
# Support for XML-output is needed to run this test.
-if [gdb_skip_xml_test] then {
+if {[gdb_skip_xml_test]} {
unsupported "mi-info-os.exp"
return -1
}
diff --git a/gdb/testsuite/gdb.mi/mi-regs.exp b/gdb/testsuite/gdb.mi/mi-regs.exp
index da253e6..983e107 100644
--- a/gdb/testsuite/gdb.mi/mi-regs.exp
+++ b/gdb/testsuite/gdb.mi/mi-regs.exp
@@ -104,7 +104,7 @@ proc sparc_register_tests { } {
"list changed registers"
}
-if [istarget "sparc-*-*"] then {
+if {[istarget "sparc-*-*"]} {
mi_clean_restart
sparc_register_tests_no_exec
mi_clean_restart $binfile