]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite] Remove use of then keyword some more
authorTom de Vries <tdevries@suse.de>
Fri, 12 Sep 2025 13:19:16 +0000 (15:19 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 12 Sep 2025 13:19:16 +0000 (15:19 +0200)
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.

gdb/testsuite/gdb.base/backtrace-through-cu-nodebug.exp
gdb/testsuite/gdb.base/infcall-nested-structs.exp.tcl
gdb/testsuite/gdb.base/info-types.exp.tcl
gdb/testsuite/gdb.base/max-depth.exp.tcl
gdb/testsuite/gdb.cp/infcall-nodebug.exp.tcl
gdb/testsuite/gdb.multi/multi-target.exp.tcl

index 5f5432ca9c0d7004760c632cc1dc5768e26b3c81..652e8c11c978e1dd1297bfa8e56a2a227bfd8a56 100644 (file)
@@ -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
     }
index fae36c2fc75b16ba1489de6d727e8f854c184310..6c9593426a42a0d40adbd6c5f26cfe1888f357b9 100644 (file)
@@ -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
     }
 
index f75bb36bd9ddd7d5e7d28eab0f9135df7c1ad244..c05837b246e2e6b6be6178b0d86e4af772f5343b 100644 (file)
@@ -33,7 +33,7 @@ proc run_test { lang } {
        return -1
     }
 
-    if ![runto_main] then {
+    if { ![runto_main] } {
        return 0
     }
 
index a57e3ccd206b970ca0e6858e9777ce32b8ac007e..22bf180ba452273d77e698b5a9821ef0d3b892cb 100644 (file)
@@ -35,7 +35,7 @@ proc compile_and_run_tests { lang } {
     }
 
     # Advance to main.
-    if { ![runto_main] } then {
+    if { ![runto_main] } {
        return 0
     }
 
index 46e48d0983ef534ce90262b8467ffbda99a6b319..764d31ddb56014e46a21e516de091e3c05d95912 100644 (file)
@@ -73,7 +73,7 @@ proc build_and_run_test { lang symbols } {
 
     clean_restart $::testfile
 
-    if ![runto_main] then {
+    if { ![runto_main] } {
        return
     }
 
index d90dc7edaa0d8daa870705960cf691320c7ea7ab..1963db52d0158e2af8da4b889b84bcf253d4ec59 100644 (file)
@@ -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
     }