]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/testsuite, tclint] Fix gdb.server
authorTom de Vries <tdevries@suse.de>
Fri, 12 Sep 2025 13:04:50 +0000 (15:04 +0200)
committerTom de Vries <tdevries@suse.de>
Fri, 12 Sep 2025 13:04:50 +0000 (15:04 +0200)
Running tclint on the test-cases in gdb.server shows a few problems:
...
connect-with-no-symbol-file.exp:72:1: line has trailing whitespace \
  [trailing-whitespace]
exit-multiple-threads.exp:73:5: expected braced word or word without \
substitutions in argument interpreted as expr [command-args]
extended-remote-restart.exp:73:5: expected braced word or word without \
  substitutions in argument interpreted as expr [command-args]
monitor-exit-quit.exp:73:5: expected braced word or word without \
  substitutions in argument interpreted as expr [command-args]
reconnect-ctrl-c.exp:54:5: expected braced word or word without \
  substitutions in argument interpreted as expr [command-args]
server-exec-info.exp:24:1: expected braced word or word without \
  substitutions in argument interpreted as expr [command-args]
stop-reply-no-thread.exp:73:5: expected braced word or word without \
  substitutions in argument interpreted as expr [command-args]
/stop-reply-no-thread-multi.exp:81:5: expected braced word or word without \
  substitutions in argument interpreted as expr [command-args]
...

Fix these.

Tested on aarch64-linux.

gdb/testsuite/gdb.server/connect-with-no-symbol-file.exp
gdb/testsuite/gdb.server/exit-multiple-threads.exp
gdb/testsuite/gdb.server/extended-remote-restart.exp
gdb/testsuite/gdb.server/monitor-exit-quit.exp
gdb/testsuite/gdb.server/reconnect-ctrl-c.exp
gdb/testsuite/gdb.server/server-exec-info.exp
gdb/testsuite/gdb.server/stop-reply-no-thread-multi.exp
gdb/testsuite/gdb.server/stop-reply-no-thread.exp

index 4e5ee98acf04f162aa302ab414e4dbad1638c58e..01d7e46996195bb69d6389a74e048222a0f88a20 100644 (file)
@@ -69,7 +69,7 @@ proc connect_no_symbol_file { sysroot action } {
        } elseif { $action == "permission" } {
          remote_exec target "chmod 000 $target_exec"
        }
-       
+
        # Connect to GDBserver.
        gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport
     }
index aae7842bb616c5e4f0f0051d15a0421e9060ed43..be29f9eeba06d17cab63e2c174c121f484a15383 100644 (file)
@@ -70,7 +70,7 @@ proc prepare_for_test { executable target_executable disable_multi_process } {
     set gdbserver_protocol [lindex $res 0]
     set gdbserver_gdbport [lindex $res 1]
     set res [gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport]
-    if ![gdb_assert {$res == 0} "connect"] {
+    if { ![gdb_assert {$res == 0} "connect"] } {
        return
     }
 
index b3c8c72f02fb40f5dec26a5a476d40011d58f8ad..a5ba53c1d2b0bbe81f8571ef05f2727f5dce2284 100644 (file)
@@ -70,7 +70,7 @@ proc test_reload { do_kill_p follow_child_p } {
     set live_inf_ptn "process $decimal"
     set dead_inf_ptn "<null>"
 
-    if ${follow_child_p} {
+    if { $follow_child_p } {
        gdb_test_no_output "set follow-fork child"
        set parent_prefix " "
        set child_prefix "\\*"
index f308c0fedda3126c9a1322df5214df73175894fb..74842a07cef3b8c332d8d5bedc6b88637746e637 100644 (file)
@@ -70,7 +70,7 @@ gdb_test_multiple "quit" "" {
 
 # Cleanup, as in default_gdb_exit.
 if { $do_cleanup } {
-    if ![is_remote host] {
+    if { ![is_remote host] } {
            remote_close host
     }
     unset gdb_spawn_id
index 83869a383451640d94884a4da25351a027ed6aac..bcab2de93cd6787ee73419567b245e9eb7d4f43f 100644 (file)
@@ -51,7 +51,7 @@ proc connect_continue_ctrl_c {} {
     global gdbserver_protocol gdbserver_gdbport
 
     set res [gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport]
-    if ![gdb_assert {$res == 0} "connect"] {
+    if { ![gdb_assert {$res == 0} "connect"] } {
        return
     }
 
index fccf07554a03285b7fc595ca69745aa44802fe1e..007290aeeccc301c6ad5fee609d2a16164799a7e 100644 (file)
@@ -21,7 +21,7 @@ load_lib gdbserver-support.exp
 require allow_gdbserver_tests allow_shlib_tests
 
 standard_testfile server.c
-if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] {
+if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
 }
 
index 9ae00922d670b497d48a1329907e95d79c898df7..f1c68a53550c2f1f3a6153522e030074013f11e8 100644 (file)
@@ -78,7 +78,7 @@ proc run_test { target_non_stop disable_feature } {
        "Support for the 'multiprocess-feature' packet on future remote targets is set to \"off\"."
 
     set res [gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport]
-    if ![gdb_assert {$res == 0} "connect"] {
+    if { ![gdb_assert {$res == 0} "connect"] } {
        return
     }
 
index b111dd942a745007f55176d3a25972d99643d8c3..aa77095b9e7b157606ef05b98abd690a547b916b 100644 (file)
@@ -70,7 +70,7 @@ proc run_test { disable_feature target_nonstop } {
     gdb_test_no_output "maint set target-non-stop ${target_nonstop}"
 
     set res [gdb_target_cmd $gdbserver_protocol $gdbserver_gdbport]
-    if ![gdb_assert {$res == 0} "connect"] {
+    if { ![gdb_assert {$res == 0} "connect"] } {
        return
     }