public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] gdb/testsuite: remove use of then keyword from gdb.base/*.exp
@ 2022-11-28 21:04 Andrew Burgess
  0 siblings, 0 replies; only message in thread
From: Andrew Burgess @ 2022-11-28 21:04 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=65a33d75c2667895f067cc5f9079215126cbb2eb

commit 65a33d75c2667895f067cc5f9079215126cbb2eb
Author: Andrew Burgess <aburgess@redhat.com>
Date:   Mon Nov 14 11:31:04 2022 +0000

    gdb/testsuite: remove use of then keyword from gdb.base/*.exp
    
    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 gdb.base/
    test script directory.
    
    There should be no changes in what is tested after this commit.

Diff:
---
 gdb/testsuite/gdb.base/a2-run.exp                  |  4 +-
 gdb/testsuite/gdb.base/advance.exp                 |  2 +-
 gdb/testsuite/gdb.base/alias.exp                   |  2 +-
 gdb/testsuite/gdb.base/all-bin.exp                 |  2 +-
 .../gdb.base/annota-input-while-running.exp        |  2 +-
 gdb/testsuite/gdb.base/annota1.exp                 |  2 +-
 gdb/testsuite/gdb.base/anon.exp                    |  2 +-
 gdb/testsuite/gdb.base/arithmet.exp                |  2 +-
 gdb/testsuite/gdb.base/arrayidx.exp                |  2 +-
 gdb/testsuite/gdb.base/assign.exp                  |  2 +-
 gdb/testsuite/gdb.base/async.exp                   |  2 +-
 gdb/testsuite/gdb.base/attach-wait-input.exp       |  2 +-
 gdb/testsuite/gdb.base/attach.exp                  |  2 +-
 .../gdb.base/auto-connect-native-target.exp        |  2 +-
 gdb/testsuite/gdb.base/auxv.exp                    |  2 +-
 gdb/testsuite/gdb.base/backtrace.exp               |  2 +-
 gdb/testsuite/gdb.base/bfp-test.exp                |  2 +-
 gdb/testsuite/gdb.base/bigcore.exp                 |  4 +-
 gdb/testsuite/gdb.base/bitfields2.exp              |  8 +--
 gdb/testsuite/gdb.base/bp-permanent.exp            |  2 +-
 gdb/testsuite/gdb.base/break-idempotent.exp        |  2 +-
 gdb/testsuite/gdb.base/break-unload-file.exp       |  2 +-
 gdb/testsuite/gdb.base/break.exp                   | 18 +++----
 gdb/testsuite/gdb.base/bt-on-error-and-warning.exp |  2 +-
 gdb/testsuite/gdb.base/bt-on-fatal-signal.exp      |  2 +-
 gdb/testsuite/gdb.base/bt-selected-frame.exp       |  2 +-
 gdb/testsuite/gdb.base/call-ar-st.exp              |  4 +-
 gdb/testsuite/gdb.base/call-rt-st.exp              |  2 +-
 gdb/testsuite/gdb.base/call-sc.exp                 |  2 +-
 gdb/testsuite/gdb.base/call-strs.exp               |  2 +-
 gdb/testsuite/gdb.base/callfuncs.exp               | 10 ++--
 gdb/testsuite/gdb.base/catch-fork-static.exp       |  2 +-
 .../gdb.base/catch-signal-siginfo-cond.exp         |  2 +-
 gdb/testsuite/gdb.base/catch-syscall.exp           | 28 +++++-----
 gdb/testsuite/gdb.base/checkpoint.exp              |  2 +-
 gdb/testsuite/gdb.base/clear_non_user_bp.exp       |  2 +-
 gdb/testsuite/gdb.base/compare-sections.exp        |  2 +-
 gdb/testsuite/gdb.base/completion.exp              |  2 +-
 gdb/testsuite/gdb.base/complex-parts.exp           |  2 +-
 gdb/testsuite/gdb.base/complex.exp                 |  6 +--
 gdb/testsuite/gdb.base/cond-eval-mode.exp          |  2 +-
 gdb/testsuite/gdb.base/cond-expr.exp               |  2 +-
 gdb/testsuite/gdb.base/condbreak-call-false.exp    |  2 +-
 gdb/testsuite/gdb.base/consecutive-step-over.exp   |  2 +-
 gdb/testsuite/gdb.base/consecutive.exp             |  8 +--
 gdb/testsuite/gdb.base/constvars.exp               |  4 +-
 gdb/testsuite/gdb.base/coredump-filter.exp         |  2 +-
 gdb/testsuite/gdb.base/corefile.exp                |  6 +--
 gdb/testsuite/gdb.base/corefile2.exp               |  4 +-
 gdb/testsuite/gdb.base/ctf-constvars.exp           |  2 +-
 gdb/testsuite/gdb.base/ctf-ptype.exp               | 10 ++--
 gdb/testsuite/gdb.base/decl-before-def.exp         |  2 +-
 gdb/testsuite/gdb.base/default.exp                 | 10 ++--
 gdb/testsuite/gdb.base/define.exp                  |  2 +-
 gdb/testsuite/gdb.base/dfp-test.exp                |  2 +-
 gdb/testsuite/gdb.base/disabled-location.exp       |  2 +-
 gdb/testsuite/gdb.base/display.exp                 |  2 +-
 gdb/testsuite/gdb.base/dprintf-detach.exp          |  2 +-
 gdb/testsuite/gdb.base/dump.exp                    | 20 ++++----
 gdb/testsuite/gdb.base/duplicate-bp.exp            |  2 +-
 gdb/testsuite/gdb.base/eh_return.exp               |  2 +-
 gdb/testsuite/gdb.base/ena-dis-br.exp              | 16 +++---
 gdb/testsuite/gdb.base/endianity.exp               |  2 +-
 gdb/testsuite/gdb.base/enum_cond.exp               |  2 +-
 gdb/testsuite/gdb.base/eval-skip.exp               |  2 +-
 gdb/testsuite/gdb.base/exe-lock.exp                |  2 +-
 gdb/testsuite/gdb.base/exec-invalid-sysroot.exp    |  2 +-
 .../gdb.base/execl-update-breakpoints.exp          |  6 +--
 gdb/testsuite/gdb.base/exprs.exp                   |  2 +-
 gdb/testsuite/gdb.base/fileio.exp                  |  2 +-
 gdb/testsuite/gdb.base/finish.exp                  |  4 +-
 gdb/testsuite/gdb.base/fixsection.exp              |  2 +-
 gdb/testsuite/gdb.base/float.exp                   | 30 +++++------
 gdb/testsuite/gdb.base/float128.exp                |  2 +-
 gdb/testsuite/gdb.base/floatn.exp                  |  2 +-
 gdb/testsuite/gdb.base/foll-exec-mode.exp          |  6 +--
 gdb/testsuite/gdb.base/foll-exec.exp               | 14 ++---
 gdb/testsuite/gdb.base/foll-vfork.exp              |  2 +-
 gdb/testsuite/gdb.base/fork-running-state.exp      |  2 +-
 gdb/testsuite/gdb.base/frame-args.exp              |  2 +-
 gdb/testsuite/gdb.base/frame-info-consistent.exp   |  2 +-
 gdb/testsuite/gdb.base/frameapply.exp              |  2 +-
 gdb/testsuite/gdb.base/funcargs.exp                | 28 +++++-----
 gdb/testsuite/gdb.base/gcore-buffer-overflow.exp   |  2 +-
 gdb/testsuite/gdb.base/gcore.exp                   |  8 +--
 gdb/testsuite/gdb.base/gdb1090.exp                 |  2 +-
 gdb/testsuite/gdb.base/gdb11530.exp                |  2 +-
 gdb/testsuite/gdb.base/gdb11531.exp                |  2 +-
 gdb/testsuite/gdb.base/gdb1250.exp                 |  2 +-
 gdb/testsuite/gdb.base/gdb1555.exp                 |  2 +-
 gdb/testsuite/gdb.base/gdb1821.exp                 |  2 +-
 gdb/testsuite/gdb.base/gnu-ifunc.exp               |  4 +-
 gdb/testsuite/gdb.base/gnu_vector.exp              |  2 +-
 gdb/testsuite/gdb.base/gold-gdb-index.exp          |  2 +-
 .../gdb.base/hbreak-in-shr-unsupported.exp         |  2 +-
 gdb/testsuite/gdb.base/hbreak2.exp                 |  8 +--
 gdb/testsuite/gdb.base/hook-stop.exp               |  2 +-
 gdb/testsuite/gdb.base/huge.exp                    |  2 +-
 gdb/testsuite/gdb.base/infcall-input.exp           |  2 +-
 gdb/testsuite/gdb.base/inferior-args.exp           |  2 +-
 gdb/testsuite/gdb.base/inferior-died.exp           |  2 +-
 gdb/testsuite/gdb.base/info-fun.exp                |  2 +-
 .../gdb.base/info-locals-unused-static-var.exp     |  2 +-
 gdb/testsuite/gdb.base/info-os.exp                 |  6 +--
 gdb/testsuite/gdb.base/info-proc.exp               |  2 +-
 gdb/testsuite/gdb.base/info-program.exp            |  2 +-
 gdb/testsuite/gdb.base/info_qt.exp                 |  2 +-
 .../gdb.base/inline-frame-cycle-unwind.exp         |  2 +-
 gdb/testsuite/gdb.base/interp.exp                  |  2 +-
 gdb/testsuite/gdb.base/interrupt.exp               |  4 +-
 gdb/testsuite/gdb.base/jit-reader-exec.exp         |  2 +-
 gdb/testsuite/gdb.base/jump.exp                    |  2 +-
 gdb/testsuite/gdb.base/label-without-address.exp   |  2 +-
 gdb/testsuite/gdb.base/langs.exp                   | 12 ++---
 gdb/testsuite/gdb.base/large-frame.exp             |  2 +-
 gdb/testsuite/gdb.base/list-missing-source.exp     |  2 +-
 gdb/testsuite/gdb.base/list.exp                    |  8 +--
 gdb/testsuite/gdb.base/logical.exp                 |  2 +-
 gdb/testsuite/gdb.base/long-inferior-output.exp    |  2 +-
 gdb/testsuite/gdb.base/long_long.exp               |  2 +-
 gdb/testsuite/gdb.base/longjmp.exp                 |  2 +-
 gdb/testsuite/gdb.base/maint-info-sections.exp     |  2 +-
 gdb/testsuite/gdb.base/maint-print-frame-id.exp    |  2 +-
 gdb/testsuite/gdb.base/maint.exp                   |  2 +-
 gdb/testsuite/gdb.base/max-value-size.exp          |  6 +--
 gdb/testsuite/gdb.base/memattr.exp                 | 16 +++---
 gdb/testsuite/gdb.base/mips_pro.exp                |  6 +--
 gdb/testsuite/gdb.base/miscexprs.exp               |  2 +-
 gdb/testsuite/gdb.base/multi-forks.exp             |  2 +-
 gdb/testsuite/gdb.base/nodebug.exp                 |  4 +-
 gdb/testsuite/gdb.base/non-lazy-array-index.exp    |  2 +-
 gdb/testsuite/gdb.base/noreturn-finish.exp         |  2 +-
 gdb/testsuite/gdb.base/noreturn-return.exp         |  2 +-
 gdb/testsuite/gdb.base/opaque.exp                  | 10 ++--
 gdb/testsuite/gdb.base/overlays.exp                | 14 ++---
 .../gdb.base/paginate-after-ctrl-c-running.exp     |  2 +-
 gdb/testsuite/gdb.base/paginate-bg-execution.exp   |  2 +-
 gdb/testsuite/gdb.base/paginate-inferior-exit.exp  |  2 +-
 gdb/testsuite/gdb.base/pc-fp.exp                   |  2 +-
 gdb/testsuite/gdb.base/permissions.exp             |  2 +-
 gdb/testsuite/gdb.base/pie-execl.exp               |  4 +-
 gdb/testsuite/gdb.base/pointers.exp                |  2 +-
 gdb/testsuite/gdb.base/pr11022.exp                 |  2 +-
 .../gdb.base/premature-dummy-frame-removal.exp     |  2 +-
 gdb/testsuite/gdb.base/printcmds.exp               |  2 +-
 gdb/testsuite/gdb.base/prologue.exp                |  2 +-
 gdb/testsuite/gdb.base/ptype.exp                   | 12 ++---
 gdb/testsuite/gdb.base/quit-live.exp               |  2 +-
 gdb/testsuite/gdb.base/radix.exp                   |  4 +-
 gdb/testsuite/gdb.base/readnever.exp               |  2 +-
 gdb/testsuite/gdb.base/recurse.exp                 |  2 +-
 gdb/testsuite/gdb.base/reggroups.exp               |  2 +-
 gdb/testsuite/gdb.base/relational.exp              |  2 +-
 gdb/testsuite/gdb.base/remote.exp                  | 10 ++--
 gdb/testsuite/gdb.base/return.exp                  |  2 +-
 gdb/testsuite/gdb.base/return2.exp                 |  6 +--
 gdb/testsuite/gdb.base/savedregs.exp               |  2 +-
 gdb/testsuite/gdb.base/scope.exp                   | 60 +++++++++++-----------
 gdb/testsuite/gdb.base/sect-cmd.exp                |  2 +-
 gdb/testsuite/gdb.base/sepdebug.exp                | 16 +++---
 gdb/testsuite/gdb.base/set-noassign.exp            |  2 +-
 gdb/testsuite/gdb.base/setshow.exp                 |  4 +-
 gdb/testsuite/gdb.base/setvar.exp                  |  4 +-
 gdb/testsuite/gdb.base/shlib-call.exp              |  2 +-
 gdb/testsuite/gdb.base/shreloc.exp                 |  2 +-
 gdb/testsuite/gdb.base/sigall.exp                  |  8 +--
 gdb/testsuite/gdb.base/sigaltstack.exp             |  2 +-
 gdb/testsuite/gdb.base/sigbpt.exp                  |  2 +-
 gdb/testsuite/gdb.base/siginfo-addr.exp            |  2 +-
 gdb/testsuite/gdb.base/siginfo-obj.exp             |  4 +-
 gdb/testsuite/gdb.base/siginfo-thread.exp          |  2 +-
 gdb/testsuite/gdb.base/siginfo.exp                 |  2 +-
 gdb/testsuite/gdb.base/signals-state-child.exp     |  2 +-
 gdb/testsuite/gdb.base/signals.exp                 |  2 +-
 gdb/testsuite/gdb.base/signest.exp                 |  2 +-
 gdb/testsuite/gdb.base/signull.exp                 |  2 +-
 gdb/testsuite/gdb.base/sigrepeat.exp               |  2 +-
 gdb/testsuite/gdb.base/sizeof.exp                  |  2 +-
 gdb/testsuite/gdb.base/so-impl-ld.exp              |  2 +-
 gdb/testsuite/gdb.base/solib-disc.exp              |  2 +-
 gdb/testsuite/gdb.base/solib-display.exp           |  2 +-
 gdb/testsuite/gdb.base/solib-symbol.exp            |  2 +-
 gdb/testsuite/gdb.base/source-dir.exp              |  2 +-
 gdb/testsuite/gdb.base/source-execution.exp        |  2 +-
 gdb/testsuite/gdb.base/sss-bp-on-user-bp.exp       |  2 +-
 gdb/testsuite/gdb.base/stack-checking.exp          |  2 +-
 gdb/testsuite/gdb.base/stack-protector.exp         |  2 +-
 gdb/testsuite/gdb.base/step-break.exp              |  2 +-
 gdb/testsuite/gdb.base/step-line.exp               |  2 +-
 gdb/testsuite/gdb.base/step-over-syscall.exp       |  4 +-
 gdb/testsuite/gdb.base/step-test.exp               |  4 +-
 gdb/testsuite/gdb.base/store.exp                   |  2 +-
 gdb/testsuite/gdb.base/structs.exp                 |  2 +-
 gdb/testsuite/gdb.base/structs2.exp                |  2 +-
 gdb/testsuite/gdb.base/sym-file.exp                | 12 ++---
 gdb/testsuite/gdb.base/symbol-alias.exp            |  2 +-
 gdb/testsuite/gdb.base/term.exp                    |  2 +-
 gdb/testsuite/gdb.base/twice.exp                   |  2 +-
 gdb/testsuite/gdb.base/type-opaque.exp             |  2 +-
 gdb/testsuite/gdb.base/until.exp                   |  2 +-
 gdb/testsuite/gdb.base/unwind-on-each-insn.exp     |  2 +-
 gdb/testsuite/gdb.base/varargs.exp                 |  2 +-
 gdb/testsuite/gdb.base/volatile.exp                |  4 +-
 gdb/testsuite/gdb.base/watch-cond-infcall.exp      |  2 +-
 gdb/testsuite/gdb.base/watch-cond.exp              |  6 +--
 gdb/testsuite/gdb.base/watch-non-mem.exp           |  2 +-
 gdb/testsuite/gdb.base/watch-read.exp              |  2 +-
 gdb/testsuite/gdb.base/watch-vfork.exp             |  2 +-
 gdb/testsuite/gdb.base/watch_thread_num.exp        |  2 +-
 gdb/testsuite/gdb.base/watchpoint-reuse-slot.exp   |  2 +-
 .../gdb.base/watchpoint-stops-at-right-insn.exp    |  4 +-
 gdb/testsuite/gdb.base/watchpoint.exp              | 18 +++----
 gdb/testsuite/gdb.base/wchar.exp                   |  2 +-
 gdb/testsuite/gdb.base/whatis-exp.exp              |  2 +-
 gdb/testsuite/gdb.base/whatis-ptype-typedefs.exp   |  4 +-
 gdb/testsuite/gdb.base/whatis.exp                  |  6 +--
 216 files changed, 435 insertions(+), 435 deletions(-)

diff --git a/gdb/testsuite/gdb.base/a2-run.exp b/gdb/testsuite/gdb.base/a2-run.exp
index 0b814335053..5c94becc592 100644
--- a/gdb/testsuite/gdb.base/a2-run.exp
+++ b/gdb/testsuite/gdb.base/a2-run.exp
@@ -124,7 +124,7 @@ if {$res == 0} {
 
 # The remaining tests don't work for targets can't take arguments...
 
-if [target_info exists noargs] then {
+if {[target_info exists noargs]} {
     verbose "Skipping rest of a2-run.exp because of noargs."
     return
 }
@@ -166,7 +166,7 @@ gdb_test_stdio "" "720" "" "run \"$testfile\" again after setting args"
 
 # GOAL: Test that shell is being used with "run".  For remote debugging
 # targets, there is no guarantee that a "shell" (whatever that is) is used.
-if ![is_remote target] then {
+if {![is_remote target]} {
     gdb_test_stdio "run `echo 8`" \
 	"40320" "" "run \"$testfile\" with shell"
 }
diff --git a/gdb/testsuite/gdb.base/advance.exp b/gdb/testsuite/gdb.base/advance.exp
index cbc7515749d..10f81174ad0 100644
--- a/gdb/testsuite/gdb.base/advance.exp
+++ b/gdb/testsuite/gdb.base/advance.exp
@@ -21,7 +21,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/alias.exp b/gdb/testsuite/gdb.base/alias.exp
index d73a2183c98..98f660ae771 100644
--- a/gdb/testsuite/gdb.base/alias.exp
+++ b/gdb/testsuite/gdb.base/alias.exp
@@ -32,7 +32,7 @@ proc test_abbrev_not_present { alias_name } {
 	    exp_continue
 	}
 	-re ".*$gdb_prompt $" {
-	    if { !$alias_present } then {
+	    if {!$alias_present} {
 		pass $test_name
 	    } else {
 		fail $test_name
diff --git a/gdb/testsuite/gdb.base/all-bin.exp b/gdb/testsuite/gdb.base/all-bin.exp
index cf53cd7997e..2bb9cfe900e 100644
--- a/gdb/testsuite/gdb.base/all-bin.exp
+++ b/gdb/testsuite/gdb.base/all-bin.exp
@@ -37,7 +37,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
 # set it up at a breakpoint so we can play with the variable values
 #
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
diff --git a/gdb/testsuite/gdb.base/annota-input-while-running.exp b/gdb/testsuite/gdb.base/annota-input-while-running.exp
index 2b4c5e17321..2eff5be733f 100644
--- a/gdb/testsuite/gdb.base/annota-input-while-running.exp
+++ b/gdb/testsuite/gdb.base/annota-input-while-running.exp
@@ -24,7 +24,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug] == -1} {
 
 # Because runto_main doesn't know how to handle the prompt with annotations,
 # run to main before we set the annotation level.
-if ![runto_main] then {
+if {![runto_main]} {
    return 1
 }
 
diff --git a/gdb/testsuite/gdb.base/annota1.exp b/gdb/testsuite/gdb.base/annota1.exp
index 8060d3c8934..675f3afe2d4 100644
--- a/gdb/testsuite/gdb.base/annota1.exp
+++ b/gdb/testsuite/gdb.base/annota1.exp
@@ -501,7 +501,7 @@ proc thread_test {} {
 	gdb_start
 	gdb_reinitialize_dir $srcdir/$subdir
 	gdb_load ${binfile}
-	if { ![runto_main] } then {
+	if {![runto_main]} {
 	    return
 	}
 
diff --git a/gdb/testsuite/gdb.base/anon.exp b/gdb/testsuite/gdb.base/anon.exp
index 83db599bf72..8d67b8e1b07 100644
--- a/gdb/testsuite/gdb.base/anon.exp
+++ b/gdb/testsuite/gdb.base/anon.exp
@@ -20,7 +20,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug}] } {
     return -1
 }
 
-if { ![runto_main] } then {
+if {![runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/arithmet.exp b/gdb/testsuite/gdb.base/arithmet.exp
index 4905c2e2706..4fa2ab2f888 100644
--- a/gdb/testsuite/gdb.base/arithmet.exp
+++ b/gdb/testsuite/gdb.base/arithmet.exp
@@ -37,7 +37,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarning
 # set it up at a breakpoint so we can play with the variable values
 #
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
diff --git a/gdb/testsuite/gdb.base/arrayidx.exp b/gdb/testsuite/gdb.base/arrayidx.exp
index 7df03346045..677e4f0fcc3 100644
--- a/gdb/testsuite/gdb.base/arrayidx.exp
+++ b/gdb/testsuite/gdb.base/arrayidx.exp
@@ -26,7 +26,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debu
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
diff --git a/gdb/testsuite/gdb.base/assign.exp b/gdb/testsuite/gdb.base/assign.exp
index a0dd46d7bb2..526e0638fcc 100644
--- a/gdb/testsuite/gdb.base/assign.exp
+++ b/gdb/testsuite/gdb.base/assign.exp
@@ -40,7 +40,7 @@ clean_restart ${binfile}
 # set it up at a breakpoint so we can play with the variable values
 #
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
diff --git a/gdb/testsuite/gdb.base/async.exp b/gdb/testsuite/gdb.base/async.exp
index 83e56e71580..7630581edca 100644
--- a/gdb/testsuite/gdb.base/async.exp
+++ b/gdb/testsuite/gdb.base/async.exp
@@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
 #
 # set it up at a breakpoint so we can play with it
 #
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
diff --git a/gdb/testsuite/gdb.base/attach-wait-input.exp b/gdb/testsuite/gdb.base/attach-wait-input.exp
index 2f02c14f1d2..b4b19ac8592 100644
--- a/gdb/testsuite/gdb.base/attach-wait-input.exp
+++ b/gdb/testsuite/gdb.base/attach-wait-input.exp
@@ -47,7 +47,7 @@ proc start_program {binfile} {
 
     clean_restart $binfile
 
-    if ![runto setup_done] then {
+    if {![runto setup_done]} {
 	return 0
     }
 
diff --git a/gdb/testsuite/gdb.base/attach.exp b/gdb/testsuite/gdb.base/attach.exp
index cfe806bb9dd..453fdbc7857 100644
--- a/gdb/testsuite/gdb.base/attach.exp
+++ b/gdb/testsuite/gdb.base/attach.exp
@@ -453,7 +453,7 @@ proc_with_prefix do_command_attach_tests {} {
     global gdb_prompt
     global binfile
 
-    if ![isnative] then {
+    if {![isnative]} {
 	unsupported "command attach test"
 	return 0
     }
diff --git a/gdb/testsuite/gdb.base/auto-connect-native-target.exp b/gdb/testsuite/gdb.base/auto-connect-native-target.exp
index 94220464d7a..b60cf8fad01 100644
--- a/gdb/testsuite/gdb.base/auto-connect-native-target.exp
+++ b/gdb/testsuite/gdb.base/auto-connect-native-target.exp
@@ -68,7 +68,7 @@ if { $topmost != "exec" } {
 
 # Check which target this board connects to.  If testing with a native
 # target board, this should cause the native target to auto connect.
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/auxv.exp b/gdb/testsuite/gdb.base/auxv.exp
index 390f559a4a3..a1bb38d4b2c 100644
--- a/gdb/testsuite/gdb.base/auxv.exp
+++ b/gdb/testsuite/gdb.base/auxv.exp
@@ -56,7 +56,7 @@ if {$core_works} {
     }
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 set print_core_line [gdb_get_line_number "ABORT;"]
diff --git a/gdb/testsuite/gdb.base/backtrace.exp b/gdb/testsuite/gdb.base/backtrace.exp
index dec4ed6abb4..6e584287ad9 100644
--- a/gdb/testsuite/gdb.base/backtrace.exp
+++ b/gdb/testsuite/gdb.base/backtrace.exp
@@ -21,7 +21,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/bfp-test.exp b/gdb/testsuite/gdb.base/bfp-test.exp
index 07282595b44..174152140f9 100644
--- a/gdb/testsuite/gdb.base/bfp-test.exp
+++ b/gdb/testsuite/gdb.base/bfp-test.exp
@@ -25,7 +25,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debu
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
diff --git a/gdb/testsuite/gdb.base/bigcore.exp b/gdb/testsuite/gdb.base/bigcore.exp
index 13b70f7dd5d..8acb716c9b5 100644
--- a/gdb/testsuite/gdb.base/bigcore.exp
+++ b/gdb/testsuite/gdb.base/bigcore.exp
@@ -20,7 +20,7 @@
 # Are we on a target board?  As of 2004-02-12, GDB didn't have a
 # mechanism that would let it efficiently access a remote corefile.
 
-if ![isnative] then {
+if {![isnative]} {
     untested "remote system"
     return
 }
@@ -55,7 +55,7 @@ gdb_test_no_output "set width 0"
 # Get the core into the output directory.
 set_inferior_cwd_to_output_dir
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 set print_core_line [gdb_get_line_number "Dump core"]
diff --git a/gdb/testsuite/gdb.base/bitfields2.exp b/gdb/testsuite/gdb.base/bitfields2.exp
index f71ca423f5d..5b89455572d 100644
--- a/gdb/testsuite/gdb.base/bitfields2.exp
+++ b/gdb/testsuite/gdb.base/bitfields2.exp
@@ -160,7 +160,7 @@ proc bitfield_signedness {} {
     }
 
     set test "most negative signed bitfield values"
-    if $has_signed_bitfields then {
+    if {$has_signed_bitfields} {
         gdb_test "print flags" "u1 = 0, u2 = 0, u3 = 0, s1 = -16384, s2 = -4294967296, s3 = -32768.*" $test
     } else {
 	unsupported $test
@@ -169,7 +169,7 @@ proc bitfield_signedness {} {
     continue_test break4 "#2"
 
     set test "signed bitfields containing -1"
-    if $has_signed_bitfields then {
+    if {$has_signed_bitfields} {
 	gdb_test "print flags" "u1 = 0, u2 = 0, u3 = 0, s1 = -1, s2 = -1, s3 = -1.*" $test
     } else {
 	unsupported $test
@@ -212,7 +212,7 @@ proc bitfield_set {} {
     gdb_test "print flags" "u1 = 0, u2 = 4294967296, u3 = 0, s1 = 0, s2 = 2147483648, s3 = 0.*" "long long bitfield values after set"
 
     set test "set long long signed bitfield negative"
-    if $has_signed_bitfields then {
+    if {$has_signed_bitfields} {
 	gdb_test_multiple "print flags.s2 = -1" $test {
 	    -re "warning: Value does not fit.*$gdb_prompt $" {
 		fail "$test"
@@ -226,7 +226,7 @@ proc bitfield_set {} {
     }
 
     set test  "long long bitfield values after set negative"
-    if $has_signed_bitfields then {
+    if {$has_signed_bitfields} {
 	gdb_test "print flags" "u1 = 0, u2 = 4294967296, u3 = 0, s1 = 0, s2 = -1, s3 = 0.*" $test
     } else {
 	unsupported $test
diff --git a/gdb/testsuite/gdb.base/bp-permanent.exp b/gdb/testsuite/gdb.base/bp-permanent.exp
index 1ad9a698db8..5997b5685d0 100644
--- a/gdb/testsuite/gdb.base/bp-permanent.exp
+++ b/gdb/testsuite/gdb.base/bp-permanent.exp
@@ -44,7 +44,7 @@ proc test {always_inserted sw_watchpoint} {
 
     clean_restart $binfile
 
-    if ![runto_main] then {
+    if {![runto_main]} {
 	return -1
     }
 
diff --git a/gdb/testsuite/gdb.base/break-idempotent.exp b/gdb/testsuite/gdb.base/break-idempotent.exp
index 837ac000b57..b3500101a1a 100644
--- a/gdb/testsuite/gdb.base/break-idempotent.exp
+++ b/gdb/testsuite/gdb.base/break-idempotent.exp
@@ -115,7 +115,7 @@ proc test_break { always_inserted break_command } {
     with_test_prefix "$cmd" {
 	delete_breakpoints
 
-	if ![runto_main] then {
+	if {![runto_main]} {
 	    return
 	}
 
diff --git a/gdb/testsuite/gdb.base/break-unload-file.exp b/gdb/testsuite/gdb.base/break-unload-file.exp
index ed14772e71c..83edaedb45c 100644
--- a/gdb/testsuite/gdb.base/break-unload-file.exp
+++ b/gdb/testsuite/gdb.base/break-unload-file.exp
@@ -59,7 +59,7 @@ proc test_break { initial_load always_inserted break_command } {
 	gdb_reload
 	set GDBFLAGS $saved_gdbflags
 
-	if ![runto_main] then {
+	if {![runto_main]} {
 	    return
 	}
 
diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp
index 258c468ed00..7ef588edf08 100644
--- a/gdb/testsuite/gdb.base/break.exp
+++ b/gdb/testsuite/gdb.base/break.exp
@@ -161,7 +161,7 @@ proc_with_prefix test_break {} {
 	    exp_continue
 	}
 	-re ".*$::gdb_prompt $" {
-	    if { !$see1 && $see2 && !$see3 && $see4 && !$see5 && $see6 } then {
+	    if {!$see1 && $see2 && !$see3 && $see4 && !$see5 && $see6} {
 		pass "info break 2 4 6"
 	    } else {
 		fail "info break 2 4 6"
@@ -202,7 +202,7 @@ proc_with_prefix test_break {} {
 	    exp_continue
 	}
 	-re ".*$::gdb_prompt $" {
-	    if { !$see1 && !$see2 && $see3 && $see4 && $see5 && !$see6 } then {
+	    if {!$see1 && !$see2 && $see3 && $see4 && $see5 && !$see6} {
 		pass "info break 3-5"
 	    } else {
 		fail "info break 3-5"
@@ -260,7 +260,7 @@ proc_with_prefix test_break {} {
 		exp_continue
 	    }
 	    -re ".*$::gdb_prompt $" {
-		if { $see1 && $see2 && $see3 && $see4 && $see5 && $see6 } then {
+		if {$see1 && $see2 && $see3 && $see4 && $see5 && $see6} {
 		    pass "check disable with history values"
 		} else {
 		    fail "check disable with history values"
@@ -308,7 +308,7 @@ proc_with_prefix test_break {} {
 		exp_continue
 	    }
 	    -re ".*$::gdb_prompt $" {
-		if { $see1 && $see2 && $see3 && $see4 && $see5 && $see6 } then {
+		if {$see1 && $see2 && $see3 && $see4 && $see5 && $see6} {
 		    pass "check disable with convenience values"
 		} else {
 		    fail "check disable with convenience values"
@@ -458,7 +458,7 @@ test_tbreak
 proc_with_prefix test_no_break_on_catchpoint {} {
     clean_restart break
 
-    if ![runto_main] then {
+    if {![runto_main]} {
 	return
     }
 
@@ -482,7 +482,7 @@ test_no_break_on_catchpoint
 proc_with_prefix test_break_nonexistent_line {} {
     clean_restart break
 
-    if ![runto_main] then {
+    if {![runto_main]} {
 	return
     }
 
@@ -497,7 +497,7 @@ test_break_nonexistent_line
 proc_with_prefix test_break_default {} {
     clean_restart break
 
-    if ![runto_main] then {
+    if {![runto_main]} {
 	return
     }
 
@@ -541,7 +541,7 @@ test_break_default
 proc_with_prefix test_break_silent_and_more {} {
     clean_restart break
 
-    if ![runto_main] then {
+    if {![runto_main]} {
 	return
     }
 
@@ -686,7 +686,7 @@ test_break_user_call
 proc_with_prefix test_finish_arguments {} {
     clean_restart break
 
-    if ![runto_main] then {
+    if {![runto_main]} {
 	return
     }
 
diff --git a/gdb/testsuite/gdb.base/bt-on-error-and-warning.exp b/gdb/testsuite/gdb.base/bt-on-error-and-warning.exp
index 0dfd13c2428..a9026e1d69c 100644
--- a/gdb/testsuite/gdb.base/bt-on-error-and-warning.exp
+++ b/gdb/testsuite/gdb.base/bt-on-error-and-warning.exp
@@ -25,7 +25,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
 
 # Check we can run to main.  If this works this time then we just
 # assume that it will work later on (when we repeatedly restart GDB).
-if ![runto_main] then {
+if {![runto_main]} {
     return -1
 }
 
diff --git a/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp b/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp
index 1af88d50c4c..bd5e46bcb2f 100644
--- a/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp
+++ b/gdb/testsuite/gdb.base/bt-on-fatal-signal.exp
@@ -34,7 +34,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} {
 
 # Check we can run to main.  If this works this time then we just
 # assume that it will work later on (when we repeatedly restart GDB).
-if ![runto_main] then {
+if {![runto_main]} {
     return -1
 }
 
diff --git a/gdb/testsuite/gdb.base/bt-selected-frame.exp b/gdb/testsuite/gdb.base/bt-selected-frame.exp
index e1018e4992a..912b87512ad 100644
--- a/gdb/testsuite/gdb.base/bt-selected-frame.exp
+++ b/gdb/testsuite/gdb.base/bt-selected-frame.exp
@@ -28,7 +28,7 @@ proc check_selected_frame_after_bt { bt_cmd stack_pattern } {
 
     with_test_prefix $bt_cmd {
 
-	if ![runto_main] then {
+	if {![runto_main]} {
 	    return 0
 	}
 
diff --git a/gdb/testsuite/gdb.base/call-ar-st.exp b/gdb/testsuite/gdb.base/call-ar-st.exp
index 2da438ccd96..a5599d741a6 100644
--- a/gdb/testsuite/gdb.base/call-ar-st.exp
+++ b/gdb/testsuite/gdb.base/call-ar-st.exp
@@ -44,7 +44,7 @@ gdb_test_no_output "set print address off"
 gdb_test_no_output "set width 0"
 
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
@@ -432,7 +432,7 @@ if {!$skip_float_test && \
     # On 32-bit SPARC, some of the args are passed by ref, others by
     # value, and GDB gets confused and says "Invalid cast" because it
     # thinks it has to cast the structure into a pointer to structure.
-    if { [test_debug_format "stabs"] } then {
+    if {[test_debug_format "stabs"]} {
 	setup_kfail "gdb/1539" "sparc-*-*"
     }
 
diff --git a/gdb/testsuite/gdb.base/call-rt-st.exp b/gdb/testsuite/gdb.base/call-rt-st.exp
index 00af32c13a1..63792ee73e5 100644
--- a/gdb/testsuite/gdb.base/call-rt-st.exp
+++ b/gdb/testsuite/gdb.base/call-rt-st.exp
@@ -45,7 +45,7 @@ gdb_test_no_output "set print address off"
 gdb_test_no_output "set width 0"
 
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
diff --git a/gdb/testsuite/gdb.base/call-sc.exp b/gdb/testsuite/gdb.base/call-sc.exp
index ddf2ceedf96..46da6506b25 100644
--- a/gdb/testsuite/gdb.base/call-sc.exp
+++ b/gdb/testsuite/gdb.base/call-sc.exp
@@ -61,7 +61,7 @@ proc start_scalars_test { type } {
     }
 
     # Advance to main
-    if { ![runto_main] } then {
+    if {![runto_main]} {
 	return
     }
 
diff --git a/gdb/testsuite/gdb.base/call-strs.exp b/gdb/testsuite/gdb.base/call-strs.exp
index 58cb3cda38d..f9335815da3 100644
--- a/gdb/testsuite/gdb.base/call-strs.exp
+++ b/gdb/testsuite/gdb.base/call-strs.exp
@@ -42,7 +42,7 @@ gdb_test_no_output "set print address off"
 gdb_test_no_output "set print symbol off"
 gdb_test_no_output "set width 0"
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp
index 44289eebc8b..9b98f681fc1 100644
--- a/gdb/testsuite/gdb.base/callfuncs.exp
+++ b/gdb/testsuite/gdb.base/callfuncs.exp
@@ -368,7 +368,7 @@ proc perform_all_tests {prototypes} {
     # Check if all registers still have the same value.
     set new_reg_content [fetch_all_registers \
 			     "register contents after gdb function calls"]
-    if {$old_reg_content == $new_reg_content} then {
+    if {$old_reg_content == $new_reg_content} {
 	pass "gdb function calls preserve register contents"
     } else {
 	set old_reg_content $new_reg_content
@@ -394,7 +394,7 @@ proc perform_all_tests {prototypes} {
 	     "bt after continuing from call dummy breakpoint"] then {
 		 set new_reg_content [fetch_all_registers \
 					  "register contents after stop in call dummy"]
-		 if {$old_reg_content == $new_reg_content} then {
+		 if {$old_reg_content == $new_reg_content} {
 		     pass "continue after stop in call dummy preserves register contents"
 		 } else {
 		     fail "continue after stop in call dummy preserves register contents"
@@ -420,7 +420,7 @@ proc perform_all_tests {prototypes} {
 	     "bt after finishing from call dummy breakpoint"] then {
 		 set new_reg_content [fetch_all_registers \
 					  "register contents after finish in call dummy"]
-		 if {$old_reg_content == $new_reg_content} then {
+		 if {$old_reg_content == $new_reg_content} {
 		     pass "finish after stop in call dummy preserves register contents"
 		 } else {
 		     fail "finish after stop in call dummy preserves register contents"
@@ -445,7 +445,7 @@ proc perform_all_tests {prototypes} {
 	     "y"] then {
 		 set new_reg_content [fetch_all_registers \
 					  "register contents after return in call dummy"]
-		 if {$old_reg_content == $new_reg_content} then {
+		 if {$old_reg_content == $new_reg_content} {
 		     pass "return after stop in call dummy preserves register contents"
 		 } else {
 		     fail "return after stop in call dummy preserves register contents"
@@ -508,7 +508,7 @@ proc perform_all_tests {prototypes} {
 
     set new_reg_content [fetch_all_registers \
 			     "register contents after nested call dummies"]
-    if {$old_reg_content == $new_reg_content} then {
+    if {$old_reg_content == $new_reg_content} {
 	pass "nested call dummies preserve register contents"
     } else {
 	fail "nested call dummies preserve register contents"
diff --git a/gdb/testsuite/gdb.base/catch-fork-static.exp b/gdb/testsuite/gdb.base/catch-fork-static.exp
index 51031a84fbd..07f05951e2d 100644
--- a/gdb/testsuite/gdb.base/catch-fork-static.exp
+++ b/gdb/testsuite/gdb.base/catch-fork-static.exp
@@ -23,7 +23,7 @@
 
 # Until "catch fork" is implemented on other targets...
 #
-if { ![istarget "*-*-linux*"] && ![istarget "*-*-openbsd*"] } then {
+if {![istarget "*-*-linux*"] && ![istarget "*-*-openbsd*"]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp b/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp
index 85a55b29ea5..c18c5fb0cb8 100644
--- a/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp
+++ b/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp
@@ -41,7 +41,7 @@ if { [prepare_for_testing "failed to prepare" "${testfile}" $srcfile {debug}] }
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return -1
 }
 
diff --git a/gdb/testsuite/gdb.base/catch-syscall.exp b/gdb/testsuite/gdb.base/catch-syscall.exp
index d8b6898b3e0..2364b47bf7e 100644
--- a/gdb/testsuite/gdb.base/catch-syscall.exp
+++ b/gdb/testsuite/gdb.base/catch-syscall.exp
@@ -26,7 +26,7 @@ if  { [prepare_for_testing "failed to prepare" $testfile ${testfile}.c] } {
 }
 
 # Check target supports catch syscall or not.
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
@@ -464,40 +464,40 @@ proc do_syscall_tests {} {
 
     # Testing the 'catch syscall' command without arguments.
     # This test should catch any syscalls.
-    if [runto_main] then { test_catch_syscall_without_args }
+    if {[runto_main]} { test_catch_syscall_without_args }
 
     # Testing the 'catch syscall' command with arguments.
     # This test should only catch the specified syscall.
-    if [runto_main] then { test_catch_syscall_with_args }
+    if {[runto_main]} { test_catch_syscall_with_args }
 
     # Testing the 'catch syscall' command with many arguments.
     # This test should catch $all_syscalls.
-    if [runto_main] then { test_catch_syscall_with_many_args }
+    if {[runto_main]} { test_catch_syscall_with_many_args }
 
     # Testing the 'catch syscall' command with WRONG arguments.
     # This test should not trigger any catchpoints.
-    if [runto_main] then { test_catch_syscall_with_wrong_args }
+    if {[runto_main]} { test_catch_syscall_with_wrong_args }
 
     # Testing the 'catch syscall' command during a restart of
     # the inferior.
-    if [runto_main] then { test_catch_syscall_restarting_inferior }
+    if {[runto_main]} { test_catch_syscall_restarting_inferior }
 
     # Testing the 'catch syscall' command toggling off past a
     # syscall return, then resuming entry/return as normal.
-    if [runto_main] then { test_catch_syscall_skipping_return }
+    if {[runto_main]} { test_catch_syscall_skipping_return }
 
     # Testing the 'catch syscall' command starting mid-vfork.
-    if [runto_main] then { test_catch_syscall_mid_vfork }
+    if {[runto_main]} { test_catch_syscall_mid_vfork }
 
     # Testing that 'catch syscall' entry/return tracks across execve.
-    if [runto_main] then { test_catch_syscall_execve }
+    if {[runto_main]} { test_catch_syscall_execve }
 
     # Testing if the 'catch syscall' command works when switching to
     # different architectures on-the-fly (PR gdb/10737).
-    if [runto_main] then { test_catch_syscall_multi_arch }
+    if {[runto_main]} { test_catch_syscall_multi_arch }
 
     # Testing the 'catch' syscall command for a group of syscalls.
-    if [runto_main] then { test_catch_syscall_group }
+    if {[runto_main]} { test_catch_syscall_group }
 }
 
 proc test_catch_syscall_without_args_noxml {} {
@@ -662,16 +662,16 @@ proc do_syscall_tests_without_xml {} {
 
     # Let's test if we can catch syscalls without XML support.
     # We should succeed, but GDB is not supposed to print syscall names.
-    if [runto_main] then { test_catch_syscall_without_args_noxml }
+    if {[runto_main]} { test_catch_syscall_without_args_noxml }
 
     # The only valid argument "catch syscall" should accept is the
     # syscall number, and not the name (since it can't translate a
     # name to a number).
-    if [runto_main] then { test_catch_syscall_with_args_noxml }
+    if {[runto_main]} { test_catch_syscall_with_args_noxml }
 
     # Now, we'll try to provide a syscall name (valid or not) to the command,
     # and expect it to fail.
-    if [runto_main] then { test_catch_syscall_with_wrong_args_noxml }
+    if {[runto_main]} { test_catch_syscall_with_wrong_args_noxml }
 }
 
 # This procedure fills the vector "all_syscalls_numbers" with the proper
diff --git a/gdb/testsuite/gdb.base/checkpoint.exp b/gdb/testsuite/gdb.base/checkpoint.exp
index e81e4f44e48..0fef9c551bd 100644
--- a/gdb/testsuite/gdb.base/checkpoint.exp
+++ b/gdb/testsuite/gdb.base/checkpoint.exp
@@ -16,7 +16,7 @@
 # Until "set follow-fork-mode" and "catch fork" are implemented on
 # other targets...
 #
-if {![istarget "*-*-linux*"]} then {
+if {![istarget "*-*-linux*"]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/clear_non_user_bp.exp b/gdb/testsuite/gdb.base/clear_non_user_bp.exp
index da694351c87..2995f0d567f 100644
--- a/gdb/testsuite/gdb.base/clear_non_user_bp.exp
+++ b/gdb/testsuite/gdb.base/clear_non_user_bp.exp
@@ -49,7 +49,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/main.c" "${binfile}" executable {debug}]
 # Start with a fresh gdb.
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/compare-sections.exp b/gdb/testsuite/gdb.base/compare-sections.exp
index d9d10d42680..9885b0c0602 100644
--- a/gdb/testsuite/gdb.base/compare-sections.exp
+++ b/gdb/testsuite/gdb.base/compare-sections.exp
@@ -79,7 +79,7 @@ gdb_test_multiple $command $test {
 }
 
 # Now get past startup code.
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index e3803c9d2d5..2a46d4fd21b 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -57,7 +57,7 @@ if {[prepare_for_testing "failed to prepare" $testfile \
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
         perror "tests suppressed"
 }
 
diff --git a/gdb/testsuite/gdb.base/complex-parts.exp b/gdb/testsuite/gdb.base/complex-parts.exp
index 7fa94c72cd4..0075b8333e3 100644
--- a/gdb/testsuite/gdb.base/complex-parts.exp
+++ b/gdb/testsuite/gdb.base/complex-parts.exp
@@ -19,7 +19,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
-if { ![runto_main] } then {
+if {![runto_main]} {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/complex.exp b/gdb/testsuite/gdb.base/complex.exp
index e2c60029593..5d97c87e42a 100644
--- a/gdb/testsuite/gdb.base/complex.exp
+++ b/gdb/testsuite/gdb.base/complex.exp
@@ -20,16 +20,16 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
-if [runto f2] then {
+if {[runto f2]} {
     get_debug_format
-    if { [test_compiler_info gcc-2-*] && [test_debug_format "DWARF \[0-9\]"] } then {
+    if {[test_compiler_info gcc-2-*] && [test_debug_format "DWARF \[0-9\]"]} {
 	setup_xfail "*-*-*"
     }
     gdb_test "p *y" "\\\$\[0-9\]* = \{c = 42 '\\*', f = 1 \\+ 0i\}" \
 	    "print complex packed value in C"
 }
 
-if [runto f4] then {
+if {[runto f4]} {
     gdb_test "p *y" "\\\$\[0-9\]* = \{c = 42 '\\*', f = 1 \\+ 0i\}" \
 	    "print complex value in C"
 }
diff --git a/gdb/testsuite/gdb.base/cond-eval-mode.exp b/gdb/testsuite/gdb.base/cond-eval-mode.exp
index f6e8b3e71b2..61c28b5925d 100644
--- a/gdb/testsuite/gdb.base/cond-eval-mode.exp
+++ b/gdb/testsuite/gdb.base/cond-eval-mode.exp
@@ -29,7 +29,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/cond-expr.exp b/gdb/testsuite/gdb.base/cond-expr.exp
index f0c4c328594..36754f92158 100644
--- a/gdb/testsuite/gdb.base/cond-expr.exp
+++ b/gdb/testsuite/gdb.base/cond-expr.exp
@@ -42,7 +42,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
 clean_restart ${binfile}
 
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
diff --git a/gdb/testsuite/gdb.base/condbreak-call-false.exp b/gdb/testsuite/gdb.base/condbreak-call-false.exp
index 2d0325df18d..4b1ed1b57bc 100644
--- a/gdb/testsuite/gdb.base/condbreak-call-false.exp
+++ b/gdb/testsuite/gdb.base/condbreak-call-false.exp
@@ -22,7 +22,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/consecutive-step-over.exp b/gdb/testsuite/gdb.base/consecutive-step-over.exp
index 5cb12414555..a8cecb50d62 100644
--- a/gdb/testsuite/gdb.base/consecutive-step-over.exp
+++ b/gdb/testsuite/gdb.base/consecutive-step-over.exp
@@ -24,7 +24,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/consecutive.exp b/gdb/testsuite/gdb.base/consecutive.exp
index 4b38de0c3bc..b517b42e623 100644
--- a/gdb/testsuite/gdb.base/consecutive.exp
+++ b/gdb/testsuite/gdb.base/consecutive.exp
@@ -26,7 +26,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug nowarning
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
@@ -55,7 +55,7 @@ gdb_test "break \*$bp_addr" "Breakpoint $decimal at $bp_addr: file .*" \
 gdb_test_multiple "step" "stopped at bp, 2nd instr" {
     -re -wrap "Breakpoint $decimal, ($hex) in foo.*" {
 	set stop_addr $expect_out(1,string)
-	if [eval expr "$bp_addr == $stop_addr"] then {
+	if {[eval expr "$bp_addr == $stop_addr"]} {
 	    pass "stopped at bp, 2nd instr"
 	} else {
 	    fail "stopped at bp, 2nd instr (wrong address)"
@@ -64,9 +64,9 @@ gdb_test_multiple "step" "stopped at bp, 2nd instr" {
     -re -wrap "Breakpoint $decimal, foo.*" {
 	set stop_addr [get_valueof "/x" "\$pc" "" "value of pc"]
 	set stop_addr_is_stmt [hex_in_list $stop_addr $is_stmt]
-	if { ! $stop_addr_is_stmt } {
+	if {!$stop_addr_is_stmt} {
 	    fail "stopped at bp, 2nd instr (missing hex prefix)"
-	} elseif [eval expr "$bp_addr == $stop_addr"] then {
+	} elseif {[eval expr "$bp_addr == $stop_addr"]} {
 	    pass "stopped at bp, 2nd instr"
 	} else {
 	    fail "stopped at bp, 2nd instr (wrong address)"
diff --git a/gdb/testsuite/gdb.base/constvars.exp b/gdb/testsuite/gdb.base/constvars.exp
index 671baf62f01..8d1af0b4fdc 100644
--- a/gdb/testsuite/gdb.base/constvars.exp
+++ b/gdb/testsuite/gdb.base/constvars.exp
@@ -40,7 +40,7 @@ clean_restart ${binfile}
 #
 # set it up at a breakpoint so we can play with the variable values
 #
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
@@ -51,7 +51,7 @@ get_debug_format
 # TODO: check out the hp side of this.
 
 proc local_compiler_xfail_check { } {
-    if { [test_compiler_info gcc-2-*] } then {
+    if {[test_compiler_info gcc-2-*]} {
 	if { ![test_debug_format "HP"] \
 		&& ![test_debug_format "DWARF \[0-9\]"] } then {
 	    setup_xfail "*-*-*" 
diff --git a/gdb/testsuite/gdb.base/coredump-filter.exp b/gdb/testsuite/gdb.base/coredump-filter.exp
index 14c3db44f51..499bfae0fff 100644
--- a/gdb/testsuite/gdb.base/coredump-filter.exp
+++ b/gdb/testsuite/gdb.base/coredump-filter.exp
@@ -16,7 +16,7 @@
 standard_testfile
 
 # This test is Linux-only.
-if ![istarget *-*-linux*] then {
+if {![istarget *-*-linux*]} {
     untested "coredump-filter.exp"
     return -1
 }
diff --git a/gdb/testsuite/gdb.base/corefile.exp b/gdb/testsuite/gdb.base/corefile.exp
index 0a44c2da49b..f15e1e9e81d 100644
--- a/gdb/testsuite/gdb.base/corefile.exp
+++ b/gdb/testsuite/gdb.base/corefile.exp
@@ -17,7 +17,7 @@
 
 
 # are we on a target board
-if ![isnative] then {
+if {![isnative]} {
     return
 }
 
@@ -49,7 +49,7 @@ if {$corefile == ""} {
 # it a pass, but note that the program name is bad.
 
 gdb_exit
-if $verbose>1 then {
+if {$verbose>1} {
     send_user "Spawning $GDB $INTERNAL_GDBFLAGS $GDBFLAGS -core=$corefile\n"
 }
 
@@ -82,7 +82,7 @@ expect {
 
 close
 
-if $verbose>1 then {
+if {$verbose>1} {
     send_user "Spawning $GDB $INTERNAL_GDBFLAGS $GDBFLAGS $binfile -core=$corefile\n"
 }
 
diff --git a/gdb/testsuite/gdb.base/corefile2.exp b/gdb/testsuite/gdb.base/corefile2.exp
index 5ae681b06fb..b08bd714ca9 100644
--- a/gdb/testsuite/gdb.base/corefile2.exp
+++ b/gdb/testsuite/gdb.base/corefile2.exp
@@ -18,7 +18,7 @@
 # coremaker2.c for details.
 
 # are we on a target board
-if ![isnative] then {
+if {![isnative]} {
     return
 }
 
@@ -174,7 +174,7 @@ with_test_prefix "renamed binfile" {
 
 clean_restart $binfile
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/ctf-constvars.exp b/gdb/testsuite/gdb.base/ctf-constvars.exp
index a5e7fe0b015..4a8307e05bf 100644
--- a/gdb/testsuite/gdb.base/ctf-constvars.exp
+++ b/gdb/testsuite/gdb.base/ctf-constvars.exp
@@ -46,7 +46,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \
 #
 # set it up at a breakpoint so we can play with the variable values
 #
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
diff --git a/gdb/testsuite/gdb.base/ctf-ptype.exp b/gdb/testsuite/gdb.base/ctf-ptype.exp
index 28deabb6ac5..2e3b972ebe9 100644
--- a/gdb/testsuite/gdb.base/ctf-ptype.exp
+++ b/gdb/testsuite/gdb.base/ctf-ptype.exp
@@ -64,16 +64,16 @@ gdb_test "ptype struct t_struct" "type = struct t_struct \{.*\[\r\n\]    (unsign
 
 # Test the equivalence between '.' and '->' for struct member references.
 
-if [gdb_test "ptype v_struct1.v_float_member"	"type = float"]<0 then {
+if {[gdb_test "ptype v_struct1.v_float_member"	"type = float"] < 0} {
     return -1
 }
-if [gdb_test "ptype v_struct1->v_float_member"	"type = float"]<0 then {
+if {[gdb_test "ptype v_struct1->v_float_member"	"type = float"] < 0} {
     return -1
 }
-if [gdb_test "ptype v_t_struct_p.v_float_member"	"type = float"]<0 then {
+if {[gdb_test "ptype v_t_struct_p.v_float_member"	"type = float"] < 0} {
     return -1
 }
-if [gdb_test "ptype v_t_struct_p->v_float_member"	"type = float"]<0 then {
+if {[gdb_test "ptype v_t_struct_p->v_float_member"	"type = float"] < 0} {
     return -1
 }
 
@@ -278,7 +278,7 @@ ptype_maybe_prototyped "fffptr" "int (*(*(*)(char))(short int))(long int)" \
 # requires a running process.  These call malloc, and can take a long
 # time to execute over a slow serial link, so increase the timeout.
 
-if [runto_main] then {
+if {[runto_main]} {
 
   if [target_info exists gdb,cannot_call_functions] {
     unsupported "this target can not call functions"
diff --git a/gdb/testsuite/gdb.base/decl-before-def.exp b/gdb/testsuite/gdb.base/decl-before-def.exp
index c4120a2b813..206d5e31b11 100644
--- a/gdb/testsuite/gdb.base/decl-before-def.exp
+++ b/gdb/testsuite/gdb.base/decl-before-def.exp
@@ -25,7 +25,7 @@ gdb_test "maint expand-symtabs"
 
 gdb_test "p a" { = \{1, 2\}} "no running process: p a"
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/default.exp b/gdb/testsuite/gdb.base/default.exp
index f3e4b2867ef..20cbab2e586 100644
--- a/gdb/testsuite/gdb.base/default.exp
+++ b/gdb/testsuite/gdb.base/default.exp
@@ -184,7 +184,7 @@ gdb_expect {
     }
     -re "exec-file.*A program is being debugged already.  Kill it. .y or n.*$" {
 	send_gdb "n\n"
-	if $verbose>1 then {
+	if {$verbose > 1} {
 	    send_user "\tDidn't kill program being debugged\n"
 	}
 	gdb_expect -re "$gdb_prompt $" { }
@@ -208,7 +208,7 @@ gdb_expect {
 	    { pass "file" }
     -re ".*A program is being debugged already.  Kill it. .y or n.*$" {
 	send_gdb "n\n"
-	if $verbose>1 then {
+	if {$verbose > 1} {
 	    send_user "\t\tDidn't kill program being debugged\n"
 	}
 	gdb_expect -re "$gdb_prompt $" { }
@@ -748,7 +748,7 @@ gdb_expect {
     -re "No core file specified..*$gdb_prompt $" { pass "target core" }
     -re ".*A program is being debugged already.  Kill it. .y or n.*$" {
 	send_gdb "n\n"
-	if $verbose>1 then {
+	if {$verbose > 1} {
 	    send_user "\t\tDidn't kill program being debugged\n"
 	}
 	gdb_expect -re "$gdb_prompt $" { }
@@ -766,7 +766,7 @@ gdb_expect {
 			{ pass "target exec" }
 	-re ".*A program is being debugged already.  Kill it. .y or n.*$" {
 	    send_gdb "n\n"
-	    if $verbose>1 then {
+	    if {$verbose > 1} {
 		send_user "\t\tDidn't kill program being debugged\n"
 	    }
 	    gdb_expect -re "$gdb_prompt $" { }
@@ -783,7 +783,7 @@ gdb_expect {
 	{ pass "target remote" }
     -re ".*A program is being debugged already.  Kill it. .y or n.*$" {
 	send_gdb "n\n"
-	if $verbose>1 then {
+	if {$verbose > 1} {
 	    send_user "\t\tDidn't kill program being debugged\n"
 	}
 	gdb_expect -re "$gdb_prompt $" { }
diff --git a/gdb/testsuite/gdb.base/define.exp b/gdb/testsuite/gdb.base/define.exp
index 52a4f0d5e5c..e5616341e6d 100644
--- a/gdb/testsuite/gdb.base/define.exp
+++ b/gdb/testsuite/gdb.base/define.exp
@@ -30,7 +30,7 @@ if {[prepare_for_testing "failed to prepare" ${testfile} \
 set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
 set bp_location11 [gdb_get_line_number "set breakpoint 11 here"]
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/dfp-test.exp b/gdb/testsuite/gdb.base/dfp-test.exp
index 30795212291..0d7314f247b 100644
--- a/gdb/testsuite/gdb.base/dfp-test.exp
+++ b/gdb/testsuite/gdb.base/dfp-test.exp
@@ -30,7 +30,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quie
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
diff --git a/gdb/testsuite/gdb.base/disabled-location.exp b/gdb/testsuite/gdb.base/disabled-location.exp
index d90bc5b91cf..1fc2e155ec2 100644
--- a/gdb/testsuite/gdb.base/disabled-location.exp
+++ b/gdb/testsuite/gdb.base/disabled-location.exp
@@ -19,7 +19,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile}] } {
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
    return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/display.exp b/gdb/testsuite/gdb.base/display.exp
index b26c08433b8..d8ca284da3e 100644
--- a/gdb/testsuite/gdb.base/display.exp
+++ b/gdb/testsuite/gdb.base/display.exp
@@ -60,7 +60,7 @@ if !$use_gdb_stub {
 
 # Ok, on to real life
 #
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/dprintf-detach.exp b/gdb/testsuite/gdb.base/dprintf-detach.exp
index b6da01a2845..6c71c61cba8 100644
--- a/gdb/testsuite/gdb.base/dprintf-detach.exp
+++ b/gdb/testsuite/gdb.base/dprintf-detach.exp
@@ -21,7 +21,7 @@
 load_lib gdbserver-support.exp
 
 # The test relies on "detach/attach".
-if { [use_gdb_stub] } then {
+if {[use_gdb_stub]} {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/dump.exp b/gdb/testsuite/gdb.base/dump.exp
index c7dd1b139fc..1efc3c881b1 100644
--- a/gdb/testsuite/gdb.base/dump.exp
+++ b/gdb/testsuite/gdb.base/dump.exp
@@ -26,7 +26,7 @@ set endian "auto"
 
 set formats {binary ihex srec tekhex  verilog}
 
-if [istarget "alpha*-*-*"] then {
+if {[istarget "alpha*-*-*"]} {
     # SREC etc cannot handle 64-bit addresses.  Force the test
     # program into the low 31 bits of the address space.
     lappend options "ldflags=-Wl,-taso"
@@ -68,7 +68,7 @@ gdb_load ${binfile}
 # IHEX and TEKHEX.  We skip those tests then.
 set max_32bit_address "0xffffffff"
 set data_address [get_hexadecimal_valueof "&intarray" 0x100000000]
-if {${data_address} > ${max_32bit_address}} then {
+if {${data_address} > ${max_32bit_address}} {
     set is64bitonly "yes"
 }
 
@@ -105,7 +105,7 @@ remote_exec host "rm -f $filenames"
 
 # Run target program until data structs are initialized.
 
-if { ! [ runto checkpoint1 ] } then {
+if {![runto checkpoint1]} {
     untested "couldn't run to checkpoint"
     return -1
 }
@@ -283,7 +283,7 @@ proc test_restore_saved_value { restore_args msg oldval newval } {
     }
 }
 
-if ![string compare $is64bitonly "no"] then {
+if {![string compare $is64bitonly "no"]} {
 
 
   test_restore_saved_value "[set intarr1.srec]" "array as value, srec" \
@@ -365,7 +365,7 @@ set struct2_offset \
 print_zero_all
 
 
-if ![string compare $is64bitonly "no"] then {
+if {![string compare $is64bitonly "no"]} {
   test_restore_saved_value "[set intarr1.srec] $array2_offset" \
 	"array copy, srec" \
 	$array_val "intarray2"
@@ -421,7 +421,7 @@ set element3_offset \
 set element4_offset \
 	[capture_value "/x (char *) &intarray\[4\] - (char *) &intarray\[0\]"]
 
-if ![string compare $is64bitonly "no"] then {
+if {![string compare $is64bitonly "no"]} {
   print_zero_all
 
   test_restore_saved_value "[set intarr1.srec] 0 $element3_start $element4_start" \
@@ -456,7 +456,7 @@ test_restore_saved_value \
 gdb_test "print intarray\[2\] == 0" " = 1" "element 2 not changed - 4"
 gdb_test "print intarray\[4\] == 0" " = 1" "element 4 not changed - 4"
 
-if ![string compare $is64bitonly "no"] then {
+if {![string compare $is64bitonly "no"]} {
   print_zero_all
 
   # restore with expressions 
@@ -520,7 +520,7 @@ proc test_reload_saved_value { filename msg oldval newval } {
 }
 
 # srec format can not be loaded for 64-bit-only platforms
-if ![string compare $is64bitonly "no"] then {
+if {![string compare $is64bitonly "no"]} {
   test_reload_saved_value "[set intarr1.srec]" "reload array as value, srec" \
 	$array_val "\*$array_ptr_type"
   test_reload_saved_value "[set intstr1.srec]" "reload struct as value, srec" \
@@ -532,7 +532,7 @@ if ![string compare $is64bitonly "no"] then {
 }
 
 # ihex format can not be loaded for 64-bit-only platforms
-if ![string compare $is64bitonly "no"] then {
+if {![string compare $is64bitonly "no"]} {
 
   test_reload_saved_value "[set intarr1.ihex]" \
       "reload array as value, intel hex" \
@@ -549,7 +549,7 @@ if ![string compare $is64bitonly "no"] then {
 }
 
 # tekhex format can not be loaded for 64-bit-only platforms
-if ![string compare $is64bitonly "no"] then {
+if {![string compare $is64bitonly "no"]} {
   test_reload_saved_value "[set intarr1.tekhex]" \
       "reload array as value, tekhex" \
 	$array_val "\*$array_ptr_type"
diff --git a/gdb/testsuite/gdb.base/duplicate-bp.exp b/gdb/testsuite/gdb.base/duplicate-bp.exp
index 9a512928bae..39ba3a5cbf7 100644
--- a/gdb/testsuite/gdb.base/duplicate-bp.exp
+++ b/gdb/testsuite/gdb.base/duplicate-bp.exp
@@ -26,7 +26,7 @@ proc test_setup { count } {
 
     clean_restart ${binfile}
 
-    if ![runto_main] then {
+    if {![runto_main]} {
 	return 0
     }
 
diff --git a/gdb/testsuite/gdb.base/eh_return.exp b/gdb/testsuite/gdb.base/eh_return.exp
index a6dda78e013..e4781e302a0 100644
--- a/gdb/testsuite/gdb.base/eh_return.exp
+++ b/gdb/testsuite/gdb.base/eh_return.exp
@@ -19,7 +19,7 @@
 standard_testfile
 
 # Set compiler flags.
-if {[istarget "powerpc*"]} then {
+if {[istarget "powerpc*"]} {
     # PowerPC generates a Traceback Table, as defined in the PPC64 ABI,
     # following each function by default.  The Traceback Table information is
     # typically interpreted by the disassembler as data represented with
diff --git a/gdb/testsuite/gdb.base/ena-dis-br.exp b/gdb/testsuite/gdb.base/ena-dis-br.exp
index 93ac124dbc4..8900f534723 100644
--- a/gdb/testsuite/gdb.base/ena-dis-br.exp
+++ b/gdb/testsuite/gdb.base/ena-dis-br.exp
@@ -34,7 +34,7 @@ set bp_location14 [gdb_get_line_number "set breakpoint 14 here" $srcfile2]
 set bp_location15 [gdb_get_line_number "set breakpoint 15 here" $srcfile2]
 set bp_location17 [gdb_get_line_number "set breakpoint 17 here" $srcfile2]
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
@@ -123,7 +123,7 @@ gdb_continue_to_end "no stop at auto-disabled break marker2"
 
 # Verify that we can set a breakpoint to be self-deleting after the
 # first time it triggers.
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
@@ -154,7 +154,7 @@ gdb_test "info break $bp" \
     "\[0-9\]*\[ \t\]+breakpoint\[ \t\]+keep\[ \t\]+n.*" \
     "info break marker4"
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
@@ -193,7 +193,7 @@ gdb_test "continue" \
 # should cause the next N triggers of the bp to be ignored.  (This is
 # a flavor of enablement/disablement, after all.)
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
@@ -254,7 +254,7 @@ gdb_test_multiple "continue" "$test" {
 
 # Verify that we can specify both an ignore count and an auto-delete.
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
@@ -286,7 +286,7 @@ gdb_test "continue" \
 # Verify that a disabled breakpoint's ignore count isn't updated when
 # the bp is encountered.
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
@@ -315,7 +315,7 @@ gdb_test "info break $bp" \
 # (Also verify that GDB gracefully handles the case where the inferior
 # isn't stopped at a breakpoint.)
 #
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
@@ -343,7 +343,7 @@ gdb_test_multiple "continue 2" "$test" {
 # Verify that GDB correctly handles the "enable/disable" command
 # with arguments, that include multiple locations.
 #
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/endianity.exp b/gdb/testsuite/gdb.base/endianity.exp
index a6a87e66a44..243af1c3da7 100644
--- a/gdb/testsuite/gdb.base/endianity.exp
+++ b/gdb/testsuite/gdb.base/endianity.exp
@@ -25,7 +25,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
 }
 
 set bp_location [gdb_get_line_number "START"]
-if ![runto "endianity.c:$bp_location" ] then {
+if {![runto "endianity.c:$bp_location"]} {
   return -1
 }
 
diff --git a/gdb/testsuite/gdb.base/enum_cond.exp b/gdb/testsuite/gdb.base/enum_cond.exp
index 0f03f0296d9..bb5d6c29548 100644
--- a/gdb/testsuite/gdb.base/enum_cond.exp
+++ b/gdb/testsuite/gdb.base/enum_cond.exp
@@ -27,7 +27,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $opts
 
 clean_restart $testfile
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "could not run to main"
     return
 }
diff --git a/gdb/testsuite/gdb.base/eval-skip.exp b/gdb/testsuite/gdb.base/eval-skip.exp
index 659a8b8a61e..fe6f7f0f52a 100644
--- a/gdb/testsuite/gdb.base/eval-skip.exp
+++ b/gdb/testsuite/gdb.base/eval-skip.exp
@@ -42,7 +42,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
 clean_restart ${binfile}
 
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
diff --git a/gdb/testsuite/gdb.base/exe-lock.exp b/gdb/testsuite/gdb.base/exe-lock.exp
index 19b4e1a8732..1276ec0984f 100644
--- a/gdb/testsuite/gdb.base/exe-lock.exp
+++ b/gdb/testsuite/gdb.base/exe-lock.exp
@@ -37,7 +37,7 @@ if { ! [file exists $binfile] } {
     return -1
     }
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
diff --git a/gdb/testsuite/gdb.base/exec-invalid-sysroot.exp b/gdb/testsuite/gdb.base/exec-invalid-sysroot.exp
index 7f7599cbf86..dec631b701a 100644
--- a/gdb/testsuite/gdb.base/exec-invalid-sysroot.exp
+++ b/gdb/testsuite/gdb.base/exec-invalid-sysroot.exp
@@ -50,7 +50,7 @@ proc do_exec_sysroot_test {} {
 
     # Start the program running, and stop at main.
     #
-    if ![runto_main] then {
+    if {![runto_main]} {
 	return
     }
 
diff --git a/gdb/testsuite/gdb.base/execl-update-breakpoints.exp b/gdb/testsuite/gdb.base/execl-update-breakpoints.exp
index 29647958e65..fdea0b442ad 100644
--- a/gdb/testsuite/gdb.base/execl-update-breakpoints.exp
+++ b/gdb/testsuite/gdb.base/execl-update-breakpoints.exp
@@ -42,7 +42,7 @@ if { [gdb_compile $objfile $exec1 executable {debug text_segment=0x1000000}] !=
 # exec2.  If it is, then skip the test as unsupported.
 
 clean_restart ${exec1}
-if ![runto_main] then {
+if {![runto_main]} {
     return -1
 }
 
@@ -56,7 +56,7 @@ gdb_test_multiple "p/x &main" $test {
 }
 
 clean_restart ${exec2}
-if ![runto_main] then {
+if {![runto_main]} {
     return -1
 }
 
@@ -88,7 +88,7 @@ proc test { always_inserted } {
 
     gdb_test_no_output "set breakpoint always-inserted $always_inserted"
 
-    if ![runto_main] then {
+    if {![runto_main]} {
 	return -1
     }
 
diff --git a/gdb/testsuite/gdb.base/exprs.exp b/gdb/testsuite/gdb.base/exprs.exp
index 0605dd62480..7b081ec91f9 100644
--- a/gdb/testsuite/gdb.base/exprs.exp
+++ b/gdb/testsuite/gdb.base/exprs.exp
@@ -32,7 +32,7 @@ clean_restart ${binfile}
 # set it up at a breakpoint so we can play with the variable values
 #
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.exp
index e00a1cefa0a..18e429c7553 100644
--- a/gdb/testsuite/gdb.base/fileio.exp
+++ b/gdb/testsuite/gdb.base/fileio.exp
@@ -55,7 +55,7 @@ gdb_test_no_output "set print sevenbit-strings"
 gdb_test_no_output "set print address off"
 gdb_test_no_output "set width 0"
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
diff --git a/gdb/testsuite/gdb.base/finish.exp b/gdb/testsuite/gdb.base/finish.exp
index e60c33b4d96..a0f5ced718b 100644
--- a/gdb/testsuite/gdb.base/finish.exp
+++ b/gdb/testsuite/gdb.base/finish.exp
@@ -76,7 +76,7 @@ proc finish_void { } {
 
 proc finish_abbreviation { abbrev } {
 
-    if { ! [ runto "int_func" ] } then {
+    if {![runto "int_func"]} {
         return -1
     }
 
@@ -102,7 +102,7 @@ proc finish_no_print {} {
 proc finish_tests { } {
     global gdb_prompt skip_float_test
 
-    if { ! [ runto_main ] } then {
+    if {![runto_main]} {
 	return -1
     }
 
diff --git a/gdb/testsuite/gdb.base/fixsection.exp b/gdb/testsuite/gdb.base/fixsection.exp
index 5734fcaae74..0872017e015 100644
--- a/gdb/testsuite/gdb.base/fixsection.exp
+++ b/gdb/testsuite/gdb.base/fixsection.exp
@@ -42,7 +42,7 @@ gdb_reinitialize_dir $srcdir/$subdir
 gdb_load ${binfile}
 gdb_load_shlib ${lib_sl}
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 1
 }
 
diff --git a/gdb/testsuite/gdb.base/float.exp b/gdb/testsuite/gdb.base/float.exp
index 7fff2b90727..b9c5057c6ee 100644
--- a/gdb/testsuite/gdb.base/float.exp
+++ b/gdb/testsuite/gdb.base/float.exp
@@ -29,18 +29,18 @@ if { [prepare_for_testing "failed to prepare" float float.c] } {
 
 # Set it up at a breakpoint so we have its registers.
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
 
 # Test "info float".
 
-if { [is_aarch64_target] } then {
+if {[is_aarch64_target]} {
     gdb_test "info float" "d0.*d1.*d31.*s0.*s1.*s31.*"
-} elseif { [istarget "alpha*-*-*"] } then {
+} elseif {[istarget "alpha*-*-*"]} {
     gdb_test "info float" "f0.*"
-} elseif { [is_aarch32_target] } then {
+} elseif {[is_aarch32_target]} {
     gdb_test_multiple "info float" "info float" {
 	-re "Software FPU type.*mask:.*flags:.*$gdb_prompt $" {
 	    pass "info float (FPA)"
@@ -54,11 +54,11 @@ if { [is_aarch64_target] } then {
             pass "info float (without FPU)"
 	}
     }
-} elseif { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } then {
+} elseif {[istarget "i?86-*-*"] || [istarget "x86_64-*-*"]} {
     gdb_test "info float" "R7:.*Status Word:.*Opcode:.*"
-} elseif [istarget "ia64-*-*"] then {
+} elseif {[istarget "ia64-*-*"]} {
     gdb_test "info float" "f0.*f1.*f127.*"
-} elseif [istarget "m68k-*-*"] then {
+} elseif {[istarget "m68k-*-*"]} {
     gdb_test_multiple "info float" "info_float" {
         -re "fp0.*fp1.*fp7.*$gdb_prompt $" {
             pass "info float (with FPU)"
@@ -67,7 +67,7 @@ if { [is_aarch64_target] } then {
             pass "info float (without FPU)"
 	}
     }
-} elseif [istarget "mips*-*-*"] then {
+} elseif {[istarget "mips*-*-*"]} {
     gdb_test_multiple "info float" "info float" {
 	-re "fpu type: none / unused\r\n$gdb_prompt $" {
 	      pass "info float (without FPU)"
@@ -76,7 +76,7 @@ if { [is_aarch64_target] } then {
 	      pass "info float (with FPU)"
 	  }
     }
-} elseif [istarget "nds32*-*-*"] then {
+} elseif {[istarget "nds32*-*-*"]} {
     gdb_test_multiple "info float" "info_float" {
         -re "fd0.*fd3.*$gdb_prompt $" {
             pass "info float (with FPU)"
@@ -85,7 +85,7 @@ if { [is_aarch64_target] } then {
             pass "info float (without FPU)"
 	}
     }
-} elseif [istarget "powerpc*-*-*"] then {
+} elseif {[istarget "powerpc*-*-*"]} {
     gdb_test_multiple "info float" "info_float" {
         -re "f0.*f1.*f31.*fpscr.*$gdb_prompt $" {
             pass "info float (with FPU)"
@@ -94,9 +94,9 @@ if { [is_aarch64_target] } then {
             pass "info float (without FPU)"
 	}
     }
-} elseif [istarget "s390*-*-*"] then {
+} elseif {[istarget "s390*-*-*"]} {
     gdb_test "info float" "fpc.*f0.*f1.*f15.*" "info float"
-} elseif [istarget "sh*-*"] then {
+} elseif {[istarget "sh*-*"]} {
     # SH may or may not have an FPU
     gdb_test_multiple "info float" "info float" {
 	-re "fpul.*fr0.*fr1.*fr15.*$gdb_prompt $" {
@@ -106,11 +106,11 @@ if { [is_aarch64_target] } then {
 	      pass "info float (without FPU)"
 	}
     }
-} elseif [istarget "hppa*-*"] then {
+} elseif {[istarget "hppa*-*"]} {
     gdb_test "info float" "fr4.*fr4R.*fr31R.*" "info float"
-} elseif [istarget "sparc*-*-*"] then {
+} elseif {[istarget "sparc*-*-*"]} {
     gdb_test "info float" "f0.*f1.*f31.*d0.*d30.*" "info float"
-} elseif [istarget "riscv*-*-*"] then {
+} elseif {[istarget "riscv*-*-*"]} {
     # RISC-V may or may not have an FPU.  Additionally, the order of
     # fcsr relative to fflags and frm can change depending on whether
     # the fflags and frm registers are implemented as real registers
diff --git a/gdb/testsuite/gdb.base/float128.exp b/gdb/testsuite/gdb.base/float128.exp
index 5e471b39d22..a4d94d4c162 100644
--- a/gdb/testsuite/gdb.base/float128.exp
+++ b/gdb/testsuite/gdb.base/float128.exp
@@ -32,7 +32,7 @@ if { [do_compile] != "" && [do_compile {-mfloat128}] != "" } {
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
diff --git a/gdb/testsuite/gdb.base/floatn.exp b/gdb/testsuite/gdb.base/floatn.exp
index 1e4f94a70e0..58be8eb4c37 100644
--- a/gdb/testsuite/gdb.base/floatn.exp
+++ b/gdb/testsuite/gdb.base/floatn.exp
@@ -32,7 +32,7 @@ if { [do_compile] != "" && [do_compile {-mfloat128}] != "" } {
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
diff --git a/gdb/testsuite/gdb.base/foll-exec-mode.exp b/gdb/testsuite/gdb.base/foll-exec-mode.exp
index cb6d975a767..23700156db4 100644
--- a/gdb/testsuite/gdb.base/foll-exec-mode.exp
+++ b/gdb/testsuite/gdb.base/foll-exec-mode.exp
@@ -35,7 +35,7 @@ if { [target_info exists gdb_protocol]
 
 # Until "catch exec" is implemented on other targets...
 #
-if {![istarget "*-linux*"]} then {
+if {![istarget "*-linux*"]} {
      return
 }
 
@@ -68,7 +68,7 @@ proc do_catch_exec_test { } {
 
     # Start the program running, and stop at main.
     #
-    if ![runto_main] then {
+    if {![runto_main]} {
 	return
     }
 
@@ -107,7 +107,7 @@ proc do_follow_exec_mode_tests { mode cmd infswitch } {
 
 	# Start the program running, and stop at main.
 	#
-	if ![runto_main] then {
+	if {![runto_main]} {
 	    return
 	}
 
diff --git a/gdb/testsuite/gdb.base/foll-exec.exp b/gdb/testsuite/gdb.base/foll-exec.exp
index a3d1a8781e9..c66fc787bea 100644
--- a/gdb/testsuite/gdb.base/foll-exec.exp
+++ b/gdb/testsuite/gdb.base/foll-exec.exp
@@ -18,7 +18,7 @@
 
 # Until "catch exec" is implemented on other targets...
 #
-if { ![istarget "*-linux*"] } then {
+if {![istarget "*-linux*"]} {
     return
 }
 
@@ -51,7 +51,7 @@ proc do_exec_tests {} {
 
    # Start the program running, and stop at main.
    #
-   if ![runto_main] then {
+   if {![runto_main]} {
      return
    }
 
@@ -77,7 +77,7 @@ proc do_exec_tests {} {
 
    # Start the program running, and stop at main.
    #
-   if ![runto_main] then {
+   if {![runto_main]} {
      return
    }
 
@@ -166,7 +166,7 @@ proc do_exec_tests {} {
 
    # Start the program running, and stop at main.
    #
-   if ![runto_main] then {
+   if {![runto_main]} {
      return
    }
 
@@ -234,7 +234,7 @@ proc do_exec_tests {} {
 
    # Start the program running, and stop at main.
    #
-   if ![runto_main] then {
+   if {![runto_main]} {
      return
    }
 
@@ -301,7 +301,7 @@ proc do_exec_tests {} {
 
    # Start the program running, and stop at main.
    #
-   if ![runto_main] then {
+   if {![runto_main]} {
      return
    }
 
@@ -362,7 +362,7 @@ proc do_exec_tests {} {
 
    # Start the program running, and stop at main.
    #
-   if ![runto_main] then {
+   if {![runto_main]} {
      return
    }
 
diff --git a/gdb/testsuite/gdb.base/foll-vfork.exp b/gdb/testsuite/gdb.base/foll-vfork.exp
index 9627a177896..c7711a17e56 100644
--- a/gdb/testsuite/gdb.base/foll-vfork.exp
+++ b/gdb/testsuite/gdb.base/foll-vfork.exp
@@ -21,7 +21,7 @@
 # Until "set follow-fork-mode" and "catch vfork" are implemented on
 # other targets...
 #
-if {![istarget "*-linux*"]} then {
+if {![istarget "*-linux*"]} {
     continue
 }
 
diff --git a/gdb/testsuite/gdb.base/fork-running-state.exp b/gdb/testsuite/gdb.base/fork-running-state.exp
index 961852ebab1..4dab3532009 100644
--- a/gdb/testsuite/gdb.base/fork-running-state.exp
+++ b/gdb/testsuite/gdb.base/fork-running-state.exp
@@ -35,7 +35,7 @@ proc do_test { detach_on_fork follow_fork non_stop schedule_multiple } {
 	}
     }
 
-    if ![runto_main] then {
+    if {![runto_main]} {
 	return 0
     }
 
diff --git a/gdb/testsuite/gdb.base/frame-args.exp b/gdb/testsuite/gdb.base/frame-args.exp
index a0674068573..adc2a9e8bb8 100644
--- a/gdb/testsuite/gdb.base/frame-args.exp
+++ b/gdb/testsuite/gdb.base/frame-args.exp
@@ -21,7 +21,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debu
 
 clean_restart ${binfile}
 
-if ![runto break_me] then {
+if {![runto break_me]} {
   perror "Couldn't run ${testfile}"
   return
 }
diff --git a/gdb/testsuite/gdb.base/frame-info-consistent.exp b/gdb/testsuite/gdb.base/frame-info-consistent.exp
index 1a8c567a75e..966c350bcb3 100644
--- a/gdb/testsuite/gdb.base/frame-info-consistent.exp
+++ b/gdb/testsuite/gdb.base/frame-info-consistent.exp
@@ -97,7 +97,7 @@ proc test {dwarf_unwinder} {
 
     gdb_test_no_output "maint set dwarf unwinder $dwarf_unwinder"
 
-    if ![runto_main] then {
+    if {![runto_main]} {
 	return 0
     }
 
diff --git a/gdb/testsuite/gdb.base/frameapply.exp b/gdb/testsuite/gdb.base/frameapply.exp
index 7ea1cb92598..ed48e5cd651 100644
--- a/gdb/testsuite/gdb.base/frameapply.exp
+++ b/gdb/testsuite/gdb.base/frameapply.exp
@@ -24,7 +24,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile}] } {
     return -1
 }
 
-if ![runto setup_done] then {
+if {![runto setup_done]} {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/funcargs.exp b/gdb/testsuite/gdb.base/funcargs.exp
index 483fbd94263..e260001beae 100644
--- a/gdb/testsuite/gdb.base/funcargs.exp
+++ b/gdb/testsuite/gdb.base/funcargs.exp
@@ -49,7 +49,7 @@ proc_with_prefix integral_args {} {
     gdb_breakpoint call0e
 
     # Run; should stop at call0a and print actual arguments.
-    if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+    if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
     gdb_run_cmd
     gdb_test "" " call0a \\(c=97 'a', s=1, i=2, l=3\\) .*" "run to call0a"
 
@@ -91,7 +91,7 @@ proc unsigned_integral_args {} {
     gdb_breakpoint call1e
 
     # Run; should stop at call1a and print actual arguments.
-    if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+    if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
     gdb_run_cmd
     gdb_test "" " call1a \\(uc=98 'b', us=6, ui=7, ul=8\\) .*" "run to call1a"
 
@@ -137,7 +137,7 @@ proc float_and_integral_args {} {
 
     # Run; should stop at call2a and print actual arguments.
 
-    if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+    if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
     gdb_run_cmd
     set test "run to call2a"
     gdb_test_multiple "" $test {
@@ -637,7 +637,7 @@ proc_with_prefix shuffle_round_robin {} {
     gdb_run_cmd
     gdb_test "" "Breakpoint $decimal, call7a .*" "run to call7a"
 
-    if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+    if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
     gdb_test_multiple "backtrace 100" "backtrace from call7a" {
 	-re " call7a \\(c=97 'a', i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7\\) .* main \\(.*\\) .*$gdb_prompt $" {
 	    pass "backtrace from call7a"
@@ -652,7 +652,7 @@ proc_with_prefix shuffle_round_robin {} {
 
     gdb_continue call7b
 
-    if {$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+    if {$gcc_compiled} { setup_xfail "rs6000-*-*" }
 
     gdb_test_sequence "backtrace 100" "backtrace from call7b" {
 	"\[\r\n\]#0 .* call7b \\(i=2, s=1, l=3, f=4, uc=98 'b', d=5, us=6, ul=8, ui=7, c=97 'a'\\) "
@@ -853,9 +853,9 @@ proc_with_prefix localvars_after_alloca { } {
     # Print each arg as a double check to see if we can print
     # them here as well as with backtrace.
 
-    if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+    if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
     gdb_test "print c" " = 97 'a'" "print c after runto localvars_after_alloca"
-    if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+    if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
     gdb_test "print s" " = 1" "print s after runto localvars_after_alloca"
     gdb_test "print i" " = 2" "print i after runto localvars_after_alloca"
     gdb_test "print l" " = 3" "print l after runto localvars_after_alloca"
@@ -887,14 +887,14 @@ proc_with_prefix call_after_alloca { } {
     # Print each arg as a double check to see if we can print
     # them here as well as with backtrace.
 
-    if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+    if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
     gdb_test "print c" " = 97 'a'" "print c in call_after_alloca"
-    if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+    if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
     gdb_test "print s" " = 1" "print s in call_after_alloca"
     gdb_test "print i" " = 2" "print i in call_after_alloca"
     gdb_test "print l" " = 3" "print l in call_after_alloca"
 
-    if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+    if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
     gdb_test "backtrace 8" "#0.*call_after_alloca_subr \\(c=97 'a', s=1, i=2, l=3, uc=98 'b', us=11, ui=12, ul=13\\).*#1.*call_after_alloca \\(c=97 'a', s=1, i=2, l=3\\).*#2.*main.*" "backtrace from call_after_alloca_subr"
 }
 
@@ -925,14 +925,14 @@ proc_with_prefix localvars_in_indirect_call { } {
     # Print each arg as a double check to see if we can print
     # them here as well as with backtrace.
 
-    if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+    if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
     gdb_test "print c" " = 97 'a'" "print c in localvars_in_indirect_call"
-    if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+    if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
     gdb_test "print s" " = 1" "print s in localvars_in_indirect_call"
     gdb_test "print i" " = 2" "print i in localvars_in_indirect_call"
     gdb_test "print l" " = 3" "print l in localvars_in_indirect_call"
 
-    if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+    if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
     gdb_test "backtrace 8" \
 	"#0.*call0a \\(c=97 'a', s=1, i=2, l=3\\).*#1.*main.*" \
 	"backtrace in indirectly called function"
@@ -965,7 +965,7 @@ proc_with_prefix localvars_in_indirect_call { } {
 	}
     }
 
-    if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+    if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
     gdb_test "step" "call0a \\(c=97 'a', s=1, i=2, l=3\\).*" \
 	"stepping into indirectly called function"
 }
diff --git a/gdb/testsuite/gdb.base/gcore-buffer-overflow.exp b/gdb/testsuite/gdb.base/gcore-buffer-overflow.exp
index 609d61328f4..ead21e62593 100644
--- a/gdb/testsuite/gdb.base/gcore-buffer-overflow.exp
+++ b/gdb/testsuite/gdb.base/gcore-buffer-overflow.exp
@@ -34,7 +34,7 @@ clean_restart ${binfile}
 gdb_test_no_output "set args ${pattern}"	\
     "set buffer exceeding arguments"
 
-if { ! [ runto_main ] } then {
+if {![runto_main]} {
     return -1
 }
 
diff --git a/gdb/testsuite/gdb.base/gcore.exp b/gdb/testsuite/gdb.base/gcore.exp
index 93d943c32e4..1c836c29d25 100644
--- a/gdb/testsuite/gdb.base/gcore.exp
+++ b/gdb/testsuite/gdb.base/gcore.exp
@@ -23,7 +23,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
-if { ! [ runto_main ] } then {
+if {![runto_main]} {
     return -1
 }
 
@@ -81,21 +81,21 @@ gdb_test_sequence "where" "where in corefile" {
 }
 
 set post_corefile_regs [capture_command_output "info registers" ""]
-if ![string compare $pre_corefile_regs $post_corefile_regs] then {
+if {![string compare $pre_corefile_regs $post_corefile_regs]} {
     pass "corefile restored general registers"
 } else {
     fail "corefile restored general registers"
 }
 
 set post_corefile_allregs [capture_command_output "info all-reg" ""]
-if ![string compare $pre_corefile_allregs $post_corefile_allregs] then {
+if {![string compare $pre_corefile_allregs $post_corefile_allregs]} {
     pass "corefile restored all registers"
 } else {
     fail "corefile restored all registers"
 }
 
 set post_corefile_sysregs [capture_command_output "info reg system" ""]
-if ![string compare $pre_corefile_sysregs $post_corefile_sysregs] then {
+if {![string compare $pre_corefile_sysregs $post_corefile_sysregs]} {
     pass "corefile restored system registers"
 } else {
     fail "corefile restored system registers"
diff --git a/gdb/testsuite/gdb.base/gdb1090.exp b/gdb/testsuite/gdb.base/gdb1090.exp
index 16bc19b2a80..36f5fa0fb68 100644
--- a/gdb/testsuite/gdb.base/gdb1090.exp
+++ b/gdb/testsuite/gdb.base/gdb1090.exp
@@ -28,7 +28,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 1
 }
 
diff --git a/gdb/testsuite/gdb.base/gdb11530.exp b/gdb/testsuite/gdb.base/gdb11530.exp
index 7f16965d11d..77d61c7cbbd 100644
--- a/gdb/testsuite/gdb.base/gdb11530.exp
+++ b/gdb/testsuite/gdb.base/gdb11530.exp
@@ -31,7 +31,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $testfile.c {debug}] } {
 }
 
 
-if { ![runto_main] } then {
+if {![runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/gdb11531.exp b/gdb/testsuite/gdb.base/gdb11531.exp
index 4520a0dc125..d27dcfe8fc0 100644
--- a/gdb/testsuite/gdb.base/gdb11531.exp
+++ b/gdb/testsuite/gdb.base/gdb11531.exp
@@ -38,7 +38,7 @@ if {$skip_hw_watchpoint_tests_p} {
    gdb_test_no_output "set can-use-hw-watchpoints 0" ""
 }
 
-if { ![runto_main] } then {
+if {![runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/gdb1250.exp b/gdb/testsuite/gdb.base/gdb1250.exp
index 06390b1002b..70e219ce580 100644
--- a/gdb/testsuite/gdb.base/gdb1250.exp
+++ b/gdb/testsuite/gdb.base/gdb1250.exp
@@ -31,7 +31,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
 
 clean_restart ${binfile}
 
-if ![runto abort {allow-pending}] then {
+if {![runto abort {allow-pending}]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/gdb1555.exp b/gdb/testsuite/gdb.base/gdb1555.exp
index c8c86edbc23..1d603ab94c0 100644
--- a/gdb/testsuite/gdb.base/gdb1555.exp
+++ b/gdb/testsuite/gdb.base/gdb1555.exp
@@ -39,7 +39,7 @@ if { [gdb_compile_shlib $libsrc $libobj {debug}] != ""
 clean_restart ${binfile}
 gdb_load_shlib $libobj
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/gdb1821.exp b/gdb/testsuite/gdb.base/gdb1821.exp
index cfa95aa5c24..40dcb0cc75b 100644
--- a/gdb/testsuite/gdb.base/gdb1821.exp
+++ b/gdb/testsuite/gdb.base/gdb1821.exp
@@ -28,7 +28,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 } 
diff --git a/gdb/testsuite/gdb.base/gnu-ifunc.exp b/gdb/testsuite/gdb.base/gnu-ifunc.exp
index 3fbf237c71c..715f5be04cb 100644
--- a/gdb/testsuite/gdb.base/gnu-ifunc.exp
+++ b/gdb/testsuite/gdb.base/gnu-ifunc.exp
@@ -105,7 +105,7 @@ proc_with_prefix set-break {resolver_attr resolver_debug final_debug} {
     clean_restart $binfile-$suffix
     gdb_load_shlib ${lib_so}
 
-    if ![runto_main] then {
+    if {![runto_main]} {
 	return 1
     }
 
@@ -227,7 +227,7 @@ proc misc_tests {resolver_attr resolver_debug final_debug} {
     clean_restart $binfile-$suffix
     gdb_load_shlib ${lib_so}
 
-    if ![runto_main] then {
+    if {![runto_main]} {
 	return 1
     }
 
diff --git a/gdb/testsuite/gdb.base/gnu_vector.exp b/gdb/testsuite/gdb.base/gnu_vector.exp
index 796d9e947e1..5b6eb7af5a0 100644
--- a/gdb/testsuite/gdb.base/gnu_vector.exp
+++ b/gdb/testsuite/gdb.base/gnu_vector.exp
@@ -105,7 +105,7 @@ gdb_test "ptype (char4) 0x01010101" \
 gdb_test "ptype (int2) lla" \
     "type = int __attribute__ \\(\\(vector_size\\(2\\)\\)\\)"
 
-if { ![string compare $endian big] } then {
+if {![string compare $endian big]} {
     gdb_test "print (char4) ia" "\\\$$decimal = \\{0, 0, 0, 2\\}"
 } else {
     gdb_test "print (char4) ia" "\\\$$decimal = \\{2, 0, 0, 0\\}"
diff --git a/gdb/testsuite/gdb.base/gold-gdb-index.exp b/gdb/testsuite/gdb.base/gold-gdb-index.exp
index 6073a64d0a1..f9a1d07b0d0 100644
--- a/gdb/testsuite/gdb.base/gold-gdb-index.exp
+++ b/gdb/testsuite/gdb.base/gold-gdb-index.exp
@@ -34,7 +34,7 @@ if { [have_index $binfile] != "gdb_index" } {
 
 gdb_test_no_output "set auto-solib-add off"
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp b/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp
index a521637e17e..4836e133107 100644
--- a/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp
+++ b/gdb/testsuite/gdb.base/hbreak-in-shr-unsupported.exp
@@ -39,7 +39,7 @@ if { [gdb_compile_shlib ${srcdir}/${subdir}/${lib_src} ${lib_so} $lib_opts] != "
 clean_restart $binfile
 gdb_load_shlib $lib_so
 
-if ![runto_main] then {
+if {![runto_main]} {
     return -1
 }
 
diff --git a/gdb/testsuite/gdb.base/hbreak2.exp b/gdb/testsuite/gdb.base/hbreak2.exp
index aecf613643d..a5e870a5708 100644
--- a/gdb/testsuite/gdb.base/hbreak2.exp
+++ b/gdb/testsuite/gdb.base/hbreak2.exp
@@ -25,7 +25,7 @@ if { [prepare_for_testing "failed to prepare" "hbreak2" {break.c break1.c} {debu
 set srcfile break.c
 set srcfile1 break1.c
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
@@ -287,7 +287,7 @@ gdb_test "info break" \
 
 #***********
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
@@ -315,7 +315,7 @@ gdb_test "hbreak" "Hardware assisted breakpoint \[0-9\]*.*" \
 # Verify that a "silent" breakpoint can be set, and that GDB is indeed
 # "silent" about its triggering.
 #
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
@@ -520,7 +520,7 @@ if { [prepare_for_testing "failed to prepare" "hbreak2o2" {break.c break1.c} {de
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/hook-stop.exp b/gdb/testsuite/gdb.base/hook-stop.exp
index f861709e491..a4f5ec2b82a 100644
--- a/gdb/testsuite/gdb.base/hook-stop.exp
+++ b/gdb/testsuite/gdb.base/hook-stop.exp
@@ -39,7 +39,7 @@ proc setup {commands} {
 
     clean_restart $binfile
 
-    if ![runto_main] then {
+    if {![runto_main]} {
 	return -code return
     }
 
diff --git a/gdb/testsuite/gdb.base/huge.exp b/gdb/testsuite/gdb.base/huge.exp
index e8274626e8a..9be4f328f87 100644
--- a/gdb/testsuite/gdb.base/huge.exp
+++ b/gdb/testsuite/gdb.base/huge.exp
@@ -42,7 +42,7 @@ clean_restart ${binfile}
 set prev_timeout $timeout
 set timeout 30
 
-if { ! [ runto_main ] } then {
+if {![runto_main]} {
     return -1
 }
 
diff --git a/gdb/testsuite/gdb.base/infcall-input.exp b/gdb/testsuite/gdb.base/infcall-input.exp
index a09a28a6904..a1e98ee1945 100644
--- a/gdb/testsuite/gdb.base/infcall-input.exp
+++ b/gdb/testsuite/gdb.base/infcall-input.exp
@@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return -1
 }
 
diff --git a/gdb/testsuite/gdb.base/inferior-args.exp b/gdb/testsuite/gdb.base/inferior-args.exp
index 691ce0ae884..30ce0761612 100644
--- a/gdb/testsuite/gdb.base/inferior-args.exp
+++ b/gdb/testsuite/gdb.base/inferior-args.exp
@@ -16,7 +16,7 @@
 # Test running an inferior with arguments.
 
 # This does not work on boards that don't support inferior arguments.
-if [target_info exists noargs] then {
+if {[target_info exists noargs]} {
     verbose "skipping gdb.base/inferior-args.exp because of noargs"
     return
 }
diff --git a/gdb/testsuite/gdb.base/inferior-died.exp b/gdb/testsuite/gdb.base/inferior-died.exp
index 28ea8df1e74..fc0a722d4b4 100644
--- a/gdb/testsuite/gdb.base/inferior-died.exp
+++ b/gdb/testsuite/gdb.base/inferior-died.exp
@@ -16,7 +16,7 @@
 # Until "set follow-fork-mode" and "catch fork" are implemented on
 # other targets...
 #
-if { ![istarget "*-*-linux*"] } then {
+if {![istarget "*-*-linux*"]} {
     unsupported "inferior-died.exp"
     return
 }
diff --git a/gdb/testsuite/gdb.base/info-fun.exp b/gdb/testsuite/gdb.base/info-fun.exp
index e683bc3aa70..f2ebd6f19b7 100644
--- a/gdb/testsuite/gdb.base/info-fun.exp
+++ b/gdb/testsuite/gdb.base/info-fun.exp
@@ -53,7 +53,7 @@ foreach_with_prefix n_flag { 0 1 } {
 
 	clean_restart $executable
 
-	if ![runto_main] then {
+	if {![runto_main]} {
 	    return 0
 	}
 
diff --git a/gdb/testsuite/gdb.base/info-locals-unused-static-var.exp b/gdb/testsuite/gdb.base/info-locals-unused-static-var.exp
index 8c4027bcc8a..221e416e2af 100644
--- a/gdb/testsuite/gdb.base/info-locals-unused-static-var.exp
+++ b/gdb/testsuite/gdb.base/info-locals-unused-static-var.exp
@@ -32,7 +32,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/info-os.exp b/gdb/testsuite/gdb.base/info-os.exp
index d12f8750a9c..f4eb42fcb8b 100644
--- a/gdb/testsuite/gdb.base/info-os.exp
+++ b/gdb/testsuite/gdb.base/info-os.exp
@@ -16,13 +16,13 @@
 standard_testfile .c
 
 # This test is Linux-only.
-if ![istarget *-*-linux*] then {
+if {![istarget *-*-linux*]} {
     unsupported "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 "info-os.exp"
     return -1
 }
@@ -32,7 +32,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return -1
 }
 
diff --git a/gdb/testsuite/gdb.base/info-proc.exp b/gdb/testsuite/gdb.base/info-proc.exp
index f90c9c45c71..179efb40855 100644
--- a/gdb/testsuite/gdb.base/info-proc.exp
+++ b/gdb/testsuite/gdb.base/info-proc.exp
@@ -48,7 +48,7 @@ if { ! [use_gdb_stub] } {
     gdb_test_no_output "set args $cmdline" "set args"
 }
 
-if { ! [ runto_main ] } then {
+if {![runto_main]} {
     return -1
 }
 
diff --git a/gdb/testsuite/gdb.base/info-program.exp b/gdb/testsuite/gdb.base/info-program.exp
index 1dc470b6e79..1496ea518dd 100644
--- a/gdb/testsuite/gdb.base/info-program.exp
+++ b/gdb/testsuite/gdb.base/info-program.exp
@@ -33,7 +33,7 @@ gdb_test "next" ".*" "step before info program"
 gdb_test "info program" "Program stopped at $hex\.\r\nIt stopped after being stepped\.\r\nType \"info stack\" or \"info registers\" for more information\." \
     "info program after next"
 
-if { ![runto_main] } then {
+if {![runto_main]} {
     return -1
 }
 
diff --git a/gdb/testsuite/gdb.base/info_qt.exp b/gdb/testsuite/gdb.base/info_qt.exp
index e51d0279d70..ee61c277be0 100644
--- a/gdb/testsuite/gdb.base/info_qt.exp
+++ b/gdb/testsuite/gdb.base/info_qt.exp
@@ -27,7 +27,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile}] } {
     return -1
 }
 
-if ![runto setup_done] then {
+if {![runto setup_done]} {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp b/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp
index c1273f148b1..4001bc9b7ca 100644
--- a/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp
+++ b/gdb/testsuite/gdb.base/inline-frame-cycle-unwind.exp
@@ -58,7 +58,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} {
 # Skip this test if Python scripting is not enabled.
 if { [skip_python_tests] } { continue }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/interp.exp b/gdb/testsuite/gdb.base/interp.exp
index 3db90f64103..a42d4ae60ae 100644
--- a/gdb/testsuite/gdb.base/interp.exp
+++ b/gdb/testsuite/gdb.base/interp.exp
@@ -90,7 +90,7 @@ gdb_test "$commands\nend" "" "finish defining hello command"
 
 gdb_test "hello" [string_to_regexp "^done,value=\"23\""]
 
-if ![runto_main] then {
+if {![runto_main]} {
   return -1
 }
 
diff --git a/gdb/testsuite/gdb.base/interrupt.exp b/gdb/testsuite/gdb.base/interrupt.exp
index 26741d59112..143116c4124 100644
--- a/gdb/testsuite/gdb.base/interrupt.exp
+++ b/gdb/testsuite/gdb.base/interrupt.exp
@@ -38,7 +38,7 @@ if {[build_executable $testfile.exp $testfile $srcfile $options] == -1} {
 gdb_start
 
 
-if ![file exists $binfile] then {
+if {![file exists $binfile]} {
     perror "$binfile does not exist."
     return 0
 } else {
@@ -47,7 +47,7 @@ if ![file exists $binfile] then {
     # Hope this is unix :-)
     gdb_test "shell stty intr '^C'" ".*" \
 	"set interrupt character"
-    if [runto_main] then {
+    if {[runto_main]} {
 	global inferior_spawn_id gdb_spawn_id
 
 	set msg "process is alive"
diff --git a/gdb/testsuite/gdb.base/jit-reader-exec.exp b/gdb/testsuite/gdb.base/jit-reader-exec.exp
index ad47c5a9610..61139728b6e 100644
--- a/gdb/testsuite/gdb.base/jit-reader-exec.exp
+++ b/gdb/testsuite/gdb.base/jit-reader-exec.exp
@@ -17,7 +17,7 @@
 # inferior that used the JIT API then exec'd a program that did not
 # use it.
 
-if { ![istarget "*-linux*"] } then {
+if {![istarget "*-linux*"]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/jump.exp b/gdb/testsuite/gdb.base/jump.exp
index 91fde018b4d..527a1ae22d5 100644
--- a/gdb/testsuite/gdb.base/jump.exp
+++ b/gdb/testsuite/gdb.base/jump.exp
@@ -29,7 +29,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
   perror "Couldn't run to main"
   return -1
 }
diff --git a/gdb/testsuite/gdb.base/label-without-address.exp b/gdb/testsuite/gdb.base/label-without-address.exp
index 9c4a9491115..e55cf7ffdac 100644
--- a/gdb/testsuite/gdb.base/label-without-address.exp
+++ b/gdb/testsuite/gdb.base/label-without-address.exp
@@ -19,7 +19,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/langs.exp b/gdb/testsuite/gdb.base/langs.exp
index fdc81333647..1957927dbfe 100644
--- a/gdb/testsuite/gdb.base/langs.exp
+++ b/gdb/testsuite/gdb.base/langs.exp
@@ -49,7 +49,7 @@ set isfixed 0
 set foo_func foo__Fi
 set do_func langs0__2do
 
-if [runto csub] then {
+if {[runto csub]} {
 
     if { !$isfixed } { set lang c }
     gdb_test "show language" "currently $lang\".*" \
@@ -58,20 +58,20 @@ if [runto csub] then {
     gdb_test "bt" "#0.*csub.*#1.*(foo|$foo_func) \\(.*#2.*cppsub_ .*#3.*fsub.*#4.*$do_func \\(.*#5  \[0-9a-fx\]* in main.*" "backtrace"
 
     if { !$isfixed } { set lang c\\+\\+; set ext cxx }
-    if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+    if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
     gdb_test "up" ".* in (foo|$foo_func).* at .*langs2\\.$ext.*return csub \\(.*" \
 	"up to foo"
     gdb_test "show language" "currently $lang.*" \
 	"show language at foo"
 
-    if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+    if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
     gdb_test "up" ".* in cppsub_ .* at .*langs2\\.$ext.*return foo \\(.*" \
 	"up to cppsub_"
     gdb_test "show language" "currently $lang.*" \
 	"show language at cppsub_"
 
     if { !$isfixed } { set lang fortran }
-    if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+    if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
     gdb_test "up" ".* in fsub.* at .*langs1\\.f.*" \
 	"up to fsub"
     gdb_test "show language" "currently $lang.*" \
@@ -100,7 +100,7 @@ gdb_load $binfile
 
 # Try exercising the "minimal" language a bit...
 
-if [runto csub] then {
+if {[runto csub]} {
     gdb_test "set lang minimal" \
              "Warning: the current language does not match this frame." \
              "set lang to minimal"
@@ -117,7 +117,7 @@ if [runto csub] then {
 	"set lang back to auto for verbose test"
     gdb_test_no_output "set verbose on"
     if { !$isfixed } { set lang c\\+\\+; set ext cxx }
-    if {!$gcc_compiled} then { setup_xfail "rs6000-*-*" }
+    if {!$gcc_compiled} { setup_xfail "rs6000-*-*" }
     gdb_test "up" \
 	".* in (foo|$foo_func).* at .*langs2\\.$ext.*return csub \\(.*Current language:  auto.*" \
 	"up to foo when verbose"
diff --git a/gdb/testsuite/gdb.base/large-frame.exp b/gdb/testsuite/gdb.base/large-frame.exp
index b58a43f81a3..94bfd5527f1 100644
--- a/gdb/testsuite/gdb.base/large-frame.exp
+++ b/gdb/testsuite/gdb.base/large-frame.exp
@@ -39,7 +39,7 @@ proc run_test { opt_level } {
 	return
     }
 
-    if { ![runto_main] } then {
+    if {![runto_main]} {
 	return
     }
 
diff --git a/gdb/testsuite/gdb.base/list-missing-source.exp b/gdb/testsuite/gdb.base/list-missing-source.exp
index 6801ab4289c..e3b8d142f10 100644
--- a/gdb/testsuite/gdb.base/list-missing-source.exp
+++ b/gdb/testsuite/gdb.base/list-missing-source.exp
@@ -45,7 +45,7 @@ remote_file host delete $srcfile
 # Now start GDB, run to main and try to list the source.
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
     return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp
index fe894a0098e..9cd1daacc33 100644
--- a/gdb/testsuite/gdb.base/list.exp
+++ b/gdb/testsuite/gdb.base/list.exp
@@ -98,7 +98,7 @@ proc test_listsize {} {
 
     # Try small listsize > 2 that is an even number.
 
-    if [ set_listsize 4 ] then {
+    if {[set_listsize 4]} {
 	gdb_test "list 1" "1\[ \t\]+#include \"list0.h\".*4\[ \t\]+\{" "list line 1 with listsize 4"
 	gdb_test "list 2" "1\[ \t\]+#include \"list0.h\".*4\[ \t\]+\{" "list line 2 with listsize 4"
 	
@@ -108,7 +108,7 @@ proc test_listsize {} {
 
     # Try a size larger than the entire file.
 
-    if [ set_listsize 100 ] then {
+    if {[set_listsize 100]} {
 	gdb_test "list 1" "1\[ \t\]+#include \"list0.h\".*\r\n${last_line_re}" "list line 1 with listsize 100"
 	
 	gdb_test "list 10" "1\[ \t\]+#include \"list0.h\".*\r\n${last_line_re}" "list line 10 with listsize 100"
@@ -411,7 +411,7 @@ gdb_test_no_output "set width 0"
 
 test_listsize
 get_debug_format
-if [ set_listsize 10 ] then {
+if {[set_listsize 10]} {
     test_list_include_file
     test_list_filename_and_number
     test_list_function
@@ -466,7 +466,7 @@ proc test_list {command listsize1 listsize2 linerange1 linerange2} {
 	global binfile
 
 	clean_restart $binfile
-	if ![runto_main] then {
+	if {![runto_main]} {
 	    return
 	}
 
diff --git a/gdb/testsuite/gdb.base/logical.exp b/gdb/testsuite/gdb.base/logical.exp
index b1d3c757768..25eb0711b82 100644
--- a/gdb/testsuite/gdb.base/logical.exp
+++ b/gdb/testsuite/gdb.base/logical.exp
@@ -39,7 +39,7 @@ clean_restart ${binfile}
 # set it up at a breakpoint so we can play with the variable values
 #
 
-if ![runto_main] then {
+if {![runto_main]} {
     perror "couldn't run to breakpoint"
     return
 }
diff --git a/gdb/testsuite/gdb.base/long-inferior-output.exp b/gdb/testsuite/gdb.base/long-inferior-output.exp
index 784eaf9b5a0..e3d1f991f7d 100644
--- a/gdb/testsuite/gdb.base/long-inferior-output.exp
+++ b/gdb/testsuite/gdb.base/long-inferior-output.exp
@@ -39,7 +39,7 @@ if [prepare_for_testing "failed to prepare" $testfile {} {debug}] {
     return -1
 }
 
-if { ![runto_main] } then {
+if {![runto_main]} {
     return
 }
 
diff --git a/gdb/testsuite/gdb.base/long_long.exp b/gdb/testsuite/gdb.base/long_long.exp
index 9c8dd16b7eb..81d006f7379 100644
--- a/gdb/testsuite/gdb.base/long_long.exp
+++ b/gdb/testsuite/gdb.base/long_long.exp
@@ -34,7 +34,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [con
 
 clean_restart ${binfile}
 
-if { ![runto known_types] } then { 
+if {![runto known_types]} {
    return 
 }
 
diff --git a/gdb/testsuite/gdb.base/longjmp.exp b/gdb/testsuite/gdb.base/longjmp.exp
index f301cac2897..bd2fc21a442 100644
--- a/gdb/testsuite/gdb.base/longjmp.exp
+++ b/gdb/testsuite/gdb.base/longjmp.exp
@@ -27,7 +27,7 @@ if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb
 
 clean_restart ${binfile}
 
-if ![runto_main] then {
+if {![runto_main]} {
    return 0
 }
 
diff --git a/gdb/testsuite/gdb.base/maint-info-sections.exp b/gdb/testsuite/gdb.base/maint-info-sections.exp
index 4c7987e84c7..766a3af8f2b 100644
--- a/gdb/testsuite/gdb.base/maint-info-sections.exp
+++ b/gdb/testsuite/gdb.base/maint-info-sections.exp
@@ -25,7 +25,7 @@ if {[prepare_for_testing "failed to prepare" $testfile \
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return -1
 }
 
diff --git a/gdb/testsuite/gdb.base/maint-print-frame-id.exp b/gdb/testsuite/gdb.base/maint-print-frame-id.exp
index 395927a22c4..17190ccea5a 100644
--- a/gdb/testsuite/gdb.base/maint-print-frame-id.exp
+++ b/gdb/testsuite/gdb.base/maint-print-frame-id.exp
@@ -22,7 +22,7 @@ if {[prepare_for_testing "failed to prepare" $testfile \
     return -1
 }
 
-if ![runto_main] then {
+if {![runto_main]} {
     return -1
 }
 
diff --git a/gdb/testsuite/gdb.base/maint.exp b/gdb/testsuite/gdb.base/maint.exp
index 16628b4a8b6..981c2f626ac 100644
--- a/gdb/testsuite/gdb.base/[...]

[diff truncated at 100000 bytes]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-11-28 21:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28 21:04 [binutils-gdb] gdb/testsuite: remove use of then keyword from gdb.base/*.exp Andrew Burgess

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).