From: Tom de Vries Date: Fri, 12 Sep 2025 13:19:16 +0000 (+0200) Subject: [gdb/testsuite] Remove use of then keyword some more X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=99d4f8d6aff1d2cd67a11ba5b6fe03c96e5b38bd;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite] Remove use of then keyword some more Find uses of the then keyword: ... $ find gdb/testsuite/ -type f -name *.exp* | xargs grep "if.*then {" ... and remove them. See also commit d4c4542312c ("gdb/testsuite: remove use of then keyword from library files") and related commits. Tested on aarch64-linux. --- diff --git a/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp b/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp index 5f5432ca9c0..652e8c11c97 100644 --- a/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp +++ b/gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp @@ -55,7 +55,7 @@ proc prepare_test {has_cfi} { clean_restart gdb_load $binfile-$extension - if ![runto callback] then { + if { ![runto callback] } { fail "has_cfi=$has_cfi: Can't run to callback" return false } diff --git a/gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl b/gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl index fae36c2fc75..6c9593426a4 100644 --- a/gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl +++ b/gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl @@ -92,7 +92,7 @@ proc start_nested_structs_test { lang types } { gdb_test_no_output "set print elements 300" # Advance to main - if { ![runto_main] } then { + if { ![runto_main] } { return 0 } diff --git a/gdb/testsuite/gdb.base/info-types.exp.tcl b/gdb/testsuite/gdb.base/info-types.exp.tcl index f75bb36bd9d..c05837b246e 100644 --- a/gdb/testsuite/gdb.base/info-types.exp.tcl +++ b/gdb/testsuite/gdb.base/info-types.exp.tcl @@ -33,7 +33,7 @@ proc run_test { lang } { return -1 } - if ![runto_main] then { + if { ![runto_main] } { return 0 } diff --git a/gdb/testsuite/gdb.base/max-depth.exp.tcl b/gdb/testsuite/gdb.base/max-depth.exp.tcl index a57e3ccd206..22bf180ba45 100644 --- a/gdb/testsuite/gdb.base/max-depth.exp.tcl +++ b/gdb/testsuite/gdb.base/max-depth.exp.tcl @@ -35,7 +35,7 @@ proc compile_and_run_tests { lang } { } # Advance to main. - if { ![runto_main] } then { + if { ![runto_main] } { return 0 } diff --git a/gdb/testsuite/gdb.cp/infcall-nodebug.exp.tcl b/gdb/testsuite/gdb.cp/infcall-nodebug.exp.tcl index 46e48d0983e..764d31ddb56 100644 --- a/gdb/testsuite/gdb.cp/infcall-nodebug.exp.tcl +++ b/gdb/testsuite/gdb.cp/infcall-nodebug.exp.tcl @@ -73,7 +73,7 @@ proc build_and_run_test { lang symbols } { clean_restart $::testfile - if ![runto_main] then { + if { ![runto_main] } { return } diff --git a/gdb/testsuite/gdb.multi/multi-target.exp.tcl b/gdb/testsuite/gdb.multi/multi-target.exp.tcl index d90dc7edaa0..1963db52d01 100644 --- a/gdb/testsuite/gdb.multi/multi-target.exp.tcl +++ b/gdb/testsuite/gdb.multi/multi-target.exp.tcl @@ -53,7 +53,7 @@ proc add_inferior {num target binfile {gcorefile ""}} { return 0 } } - if ![runto "all_started"] then { + if { ![runto "all_started"] } { return 0 } delete_breakpoints @@ -67,7 +67,7 @@ proc prepare_core {} { clean_restart ${::testfile} - if ![runto all_started] then { + if { ![runto all_started] } { return -1 } @@ -123,13 +123,13 @@ proc setup {non-stop {multi_process ""}} { gdb_test_no_output "set non-stop ${non-stop}" - if {${multi_process} ne ""} then { + if {${multi_process} ne ""} { gdb_test \ "set remote multiprocess-feature-packet $multi_process" \ "Support for the 'multiprocess-feature' packet on future remote targets is set to \"${multi_process}\"." } - if ![runto all_started] then { + if { ![runto all_started] } { return 0 }