diff options
author | Andrew Burgess <aburgess@redhat.com> | 2022-11-14 14:31:52 +0000 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2022-11-28 21:04:10 +0000 |
commit | f50c72da4dc7ab67ea244e9c6e97404a04700c2d (patch) | |
tree | 4578749e362a255867a99829736e24bf543a34b0 /gdb/testsuite/gdb.opt | |
parent | 0216141ac37843192e3525dda4cc3c58810ee195 (diff) | |
download | binutils-f50c72da4dc7ab67ea244e9c6e97404a04700c2d.zip binutils-f50c72da4dc7ab67ea244e9c6e97404a04700c2d.tar.gz binutils-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.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.opt/clobbered-registers-O2.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.opt/fortran-string.exp | 2 | ||||
-rw-r--r-- | gdb/testsuite/gdb.opt/solib-intra-step.exp | 4 |
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 } |