aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.opt
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.opt
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.opt')
-rw-r--r--gdb/testsuite/gdb.opt/break-on-_exit.exp2
-rw-r--r--gdb/testsuite/gdb.opt/clobbered-registers-O2.exp2
-rw-r--r--gdb/testsuite/gdb.opt/fortran-string.exp2
-rw-r--r--gdb/testsuite/gdb.opt/solib-intra-step.exp4
4 files changed, 5 insertions, 5 deletions
diff --git a/gdb/testsuite/gdb.opt/break-on-_exit.exp b/gdb/testsuite/gdb.opt/break-on-_exit.exp
index d94cc7e..7c2fda6 100644
--- a/gdb/testsuite/gdb.opt/break-on-_exit.exp
+++ b/gdb/testsuite/gdb.opt/break-on-_exit.exp
@@ -50,7 +50,7 @@ save_vars { GDBFLAGS } {
}
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
diff --git a/gdb/testsuite/gdb.opt/clobbered-registers-O2.exp b/gdb/testsuite/gdb.opt/clobbered-registers-O2.exp
index 66ec5c8..617ebff 100644
--- a/gdb/testsuite/gdb.opt/clobbered-registers-O2.exp
+++ b/gdb/testsuite/gdb.opt/clobbered-registers-O2.exp
@@ -26,7 +26,7 @@ if {[prepare_for_testing "failed to prepare" $testfile \
return -1
}
-if { ![runto start_sequence] } then {
+if {![runto start_sequence]} {
return
}
diff --git a/gdb/testsuite/gdb.opt/fortran-string.exp b/gdb/testsuite/gdb.opt/fortran-string.exp
index 8d4018e..5798ad0 100644
--- a/gdb/testsuite/gdb.opt/fortran-string.exp
+++ b/gdb/testsuite/gdb.opt/fortran-string.exp
@@ -27,7 +27,7 @@ if { [prepare_for_testing "prepare for testing" ${testfile} ${srcfile} \
return -1
}
-if ![runto f] then {
+if {![runto f]} {
perror "couldn't run to f"
return
}
diff --git a/gdb/testsuite/gdb.opt/solib-intra-step.exp b/gdb/testsuite/gdb.opt/solib-intra-step.exp
index e803a7d..9306ced 100644
--- a/gdb/testsuite/gdb.opt/solib-intra-step.exp
+++ b/gdb/testsuite/gdb.opt/solib-intra-step.exp
@@ -39,7 +39,7 @@ if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != ""
clean_restart ${binfile}
gdb_load_shlib $binfile_lib
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}
@@ -92,7 +92,7 @@ gdb_test_multiple "step" $test {
}
}
-if ![runto_main] then {
+if {![runto_main]} {
return 0
}