From: Tom de Vries Date: Wed, 17 Sep 2025 04:53:14 +0000 (+0200) Subject: [gdb/testsuite, tclint] Fix gdb.multi X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d0be1077d00a08ea79e3334c59960614e3a529fc;p=thirdparty%2Fbinutils-gdb.git [gdb/testsuite, tclint] Fix gdb.multi Running tclint on the test-cases in gdb.multi shows a few problems. Fix these. Tested on x86_64-linux. --- diff --git a/gdb/testsuite/gdb.multi/multi-arch-exec.exp b/gdb/testsuite/gdb.multi/multi-arch-exec.exp index 69c6b138ce0..435efc59e5d 100644 --- a/gdb/testsuite/gdb.multi/multi-arch-exec.exp +++ b/gdb/testsuite/gdb.multi/multi-arch-exec.exp @@ -23,7 +23,7 @@ require !use_gdb_stub # The 64-bit compile may succeed for i386-linux, but gdb won't be able # to load the file. -if [istarget "i?86-*linux*"] { +if {[istarget "i?86-*linux*"]} { return } @@ -69,9 +69,9 @@ proc append_arch2_options {options_var} { } } - if [istarget "powerpc64*-*-*"] { + if {[istarget "powerpc64*-*-*"]} { set march "-m64" - } elseif [istarget "s390*-*-*"] { + } elseif {[istarget "s390*-*-*"]} { set march "-m31" } else { set march "-m32" diff --git a/gdb/testsuite/gdb.multi/multi-arch.exp b/gdb/testsuite/gdb.multi/multi-arch.exp index 1d41ba5c0ae..b75009d2478 100644 --- a/gdb/testsuite/gdb.multi/multi-arch.exp +++ b/gdb/testsuite/gdb.multi/multi-arch.exp @@ -25,7 +25,7 @@ require !use_gdb_stub # The 64-bit compile may succeed for i386-linux, but gdb won't be able # to load the file. -if [istarget "i?86-*linux*"] { +if {[istarget "i?86-*linux*"]} { return } @@ -41,7 +41,7 @@ set binfile2 [standard_output_file ${exec2}] # Build two executables, one for each arch. -if [istarget "s390*-*-*"] { +if {[istarget "s390*-*-*"]} { set march1 "-m64" set march2 "-m31" } elseif { [istarget "aarch64*-*-*"] } { @@ -67,7 +67,7 @@ if { [build_executable "failed to prepare" ${exec1} "${srcfile1}" \ set options [list debug] -if [istarget "aarch64*-*-*"] { +if {[istarget "aarch64*-*-*"]} { if {[arm_cc_for_target] != ""} { lappend options "compiler=[arm_cc_for_target]" } else { diff --git a/gdb/testsuite/gdb.multi/multi-term-settings.exp b/gdb/testsuite/gdb.multi/multi-term-settings.exp index 8618f1a279a..2893d364159 100644 --- a/gdb/testsuite/gdb.multi/multi-term-settings.exp +++ b/gdb/testsuite/gdb.multi/multi-term-settings.exp @@ -29,7 +29,7 @@ require allow_multi_inferior_tests require can_spawn_for_attach -if [build_executable "failed to prepare" $testfile $srcfile {debug}] { +if {[build_executable "failed to prepare" $testfile $srcfile {debug}]} { return -1 } @@ -56,7 +56,7 @@ proc create_inferior {which_inf inf_how} { # Run to main and delete breakpoints. proc my_runto_main {} { - if ![runto_main] { + if {![runto_main]} { return 0 } else { # Delete breakpoints otherwise GDB would try to step over @@ -69,7 +69,7 @@ proc create_inferior {which_inf inf_how} { } if {$inf_how == "run"} { - if [my_runto_main] { + if {[my_runto_main]} { global inferior_spawn_id return $inferior_spawn_id } @@ -80,7 +80,7 @@ proc create_inferior {which_inf inf_how} { set inf_tty_name $spawn_out(slave,name) gdb_test_no_output "tty $inf_tty_name" "tty TTY" - if [my_runto_main] { + if {[my_runto_main]} { return $inf_spawn_id } } elseif {$inf_how == "attach"} { diff --git a/gdb/testsuite/gdb.multi/watchpoint-multi-exit.exp b/gdb/testsuite/gdb.multi/watchpoint-multi-exit.exp index 431132e8ae9..a149407e43a 100644 --- a/gdb/testsuite/gdb.multi/watchpoint-multi-exit.exp +++ b/gdb/testsuite/gdb.multi/watchpoint-multi-exit.exp @@ -36,7 +36,7 @@ proc do_test {dispose} { gdb_test_no_output "set follow-fork child" gdb_test_no_output "set detach-on-fork off" - if ![runto "child_function"] { + if {![runto "child_function"]} { return } diff --git a/gdb/testsuite/gdb.multi/watchpoint-multi.exp b/gdb/testsuite/gdb.multi/watchpoint-multi.exp index b0c873112c8..501f0a65f22 100644 --- a/gdb/testsuite/gdb.multi/watchpoint-multi.exp +++ b/gdb/testsuite/gdb.multi/watchpoint-multi.exp @@ -38,7 +38,7 @@ gdb_test_no_output "set breakpoint always-inserted on" # displaced-stepping is also needed as other GDB sometimes still removes the # breakpoints, even with always-inserted on. # Without the support this test just is not as thorough as it could be. -if [support_displaced_stepping] { +if {[support_displaced_stepping]} { gdb_test_no_output "set displaced-stepping on" }