From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1726) id 4E614385B514; Mon, 28 Nov 2022 21:05:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 4E614385B514 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1669669505; bh=CTrbJE1Ilist/5qaQYD+l7zY0btH0n7Xvxfs35ZbwV4=; h=From:To:Subject:Date:From; b=SRqk6/HmrFNqI1VwLMcSrfYVlRv+NzcpBMq7MAmb8hU1MOEmAj//fKeJEV5cWGIqh FVNu+UdNblLAc0VnSAT7OlHj4uLoLhEannrU8X99H/2TIBIjku3OduRZ3ym733gwcf 54WnUnNCJh6VV/YVnTNvLfLza9B5nrc65TJum3so= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Andrew Burgess To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: remove use of then keyword from gdb.threads/*.exp X-Act-Checkin: binutils-gdb X-Git-Author: Andrew Burgess X-Git-Refname: refs/heads/master X-Git-Oldrev: b0e16ca58d444a2b6dc2b4f71081d6c761d9712e X-Git-Newrev: b8ffa8b32737636f1579fc164c625fe41abd61d8 Message-Id: <20221128210505.4E614385B514@sourceware.org> Date: Mon, 28 Nov 2022 21:05:05 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Db8ffa8b32737= 636f1579fc164c625fe41abd61d8 commit b8ffa8b32737636f1579fc164c625fe41abd61d8 Author: Andrew Burgess Date: Mon Nov 14 14:15:49 2022 +0000 gdb/testsuite: remove use of then keyword from gdb.threads/*.exp =20 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. =20 This commit removes all use of the 'then' keyword from the gdb.threads/ test script directory. =20 There should be no changes in what is tested after this commit. Diff: --- gdb/testsuite/gdb.threads/clone-new-thread-event.exp | 2 +- gdb/testsuite/gdb.threads/current-lwp-dead.exp | 2 +- gdb/testsuite/gdb.threads/detach-step-over.exp | 2 +- gdb/testsuite/gdb.threads/fork-child-threads.exp | 2 +- gdb/testsuite/gdb.threads/fork-plus-threads.exp | 2 +- gdb/testsuite/gdb.threads/fork-thread-pending.exp | 4 ++-- .../gdb.threads/forking-threads-plus-breakpoint.exp | 4 ++-- gdb/testsuite/gdb.threads/gcore-stale-thread.exp | 2 +- gdb/testsuite/gdb.threads/gcore-thread.exp | 4 ++-- gdb/testsuite/gdb.threads/kill.exp | 2 +- gdb/testsuite/gdb.threads/linux-dp.exp | 2 +- .../gdb.threads/local-watch-wrong-thread.exp | 2 +- .../gdb.threads/multiple-successive-infcall.exp | 2 +- .../gdb.threads/next-while-other-thread-longjmps.exp | 2 +- gdb/testsuite/gdb.threads/pending-step.exp | 2 +- .../gdb.threads/process-dies-while-handling-bp.exp | 2 +- gdb/testsuite/gdb.threads/pthreads.exp | 16 ++++++++-------- gdb/testsuite/gdb.threads/reconnect-signal.exp | 2 +- .../gdb.threads/signal-command-handle-nopass.exp | 2 +- .../signal-command-multiple-signals-pending.exp | 2 +- .../gdb.threads/signal-delivered-right-thread.exp | 2 +- gdb/testsuite/gdb.threads/signal-sigtrap.exp | 2 +- gdb/testsuite/gdb.threads/sigthread.exp | 2 +- gdb/testsuite/gdb.threads/stop-with-handle.exp | 2 +- gdb/testsuite/gdb.threads/thread-find.exp | 20 ++++++++++------= ---- gdb/testsuite/gdb.threads/thread_check.exp | 2 +- gdb/testsuite/gdb.threads/thread_events.exp | 4 ++-- gdb/testsuite/gdb.threads/threadapply.exp | 2 +- gdb/testsuite/gdb.threads/tls-nodebug-pie.exp | 2 +- gdb/testsuite/gdb.threads/tls-nodebug.exp | 4 ++-- gdb/testsuite/gdb.threads/tls-shared.exp | 2 +- gdb/testsuite/gdb.threads/tls-so_extern.exp | 2 +- gdb/testsuite/gdb.threads/tls.exp | 4 ++-- .../gdb.threads/vfork-follow-child-exec.exp | 2 +- .../gdb.threads/vfork-follow-child-exit.exp | 2 +- gdb/testsuite/gdb.threads/watchthreads.exp | 2 +- gdb/testsuite/gdb.threads/watchthreads2.exp | 2 +- gdb/testsuite/gdb.threads/wp-replication.exp | 2 +- 38 files changed, 60 insertions(+), 60 deletions(-) diff --git a/gdb/testsuite/gdb.threads/clone-new-thread-event.exp b/gdb/tes= tsuite/gdb.threads/clone-new-thread-event.exp index db5ae39aded..abaad97ebcc 100644 --- a/gdb/testsuite/gdb.threads/clone-new-thread-event.exp +++ b/gdb/testsuite/gdb.threads/clone-new-thread-event.exp @@ -16,7 +16,7 @@ # along with this program. If not, see . =20 # This only works on targets with the Linux kernel. -if ![istarget *-*-linux*] then { +if {![istarget *-*-linux*]} { return } =20 diff --git a/gdb/testsuite/gdb.threads/current-lwp-dead.exp b/gdb/testsuite= /gdb.threads/current-lwp-dead.exp index 6728dbe87ab..51866b45b0b 100644 --- a/gdb/testsuite/gdb.threads/current-lwp-dead.exp +++ b/gdb/testsuite/gdb.threads/current-lwp-dead.exp @@ -25,7 +25,7 @@ standard_testfile =20 # This only works with on Linux targets. -if ![istarget *-*-linux*] then { +if {![istarget *-*-linux*]} { return } =20 diff --git a/gdb/testsuite/gdb.threads/detach-step-over.exp b/gdb/testsuite= /gdb.threads/detach-step-over.exp index d2cb52423d9..38d796620cb 100644 --- a/gdb/testsuite/gdb.threads/detach-step-over.exp +++ b/gdb/testsuite/gdb.threads/detach-step-over.exp @@ -205,7 +205,7 @@ proc_with_prefix test_detach_command {condition_eval ta= rget_non_stop non_stop di gdb_test "inferior 2" "Switching to .*" =20 gdb_load $::binfile - if ![runto setup_done] then { + if {![runto setup_done]} { fail "can't run to setup_done" kill_wait_spawned_process $test_spawn_id return diff --git a/gdb/testsuite/gdb.threads/fork-child-threads.exp b/gdb/testsui= te/gdb.threads/fork-child-threads.exp index f2718738cbf..4671c56e50e 100644 --- a/gdb/testsuite/gdb.threads/fork-child-threads.exp +++ b/gdb/testsuite/gdb.threads/fork-child-threads.exp @@ -26,7 +26,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}= " "${binfile}" executab =20 clean_restart ${binfile} =20 -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/fork-plus-threads.exp b/gdb/testsuit= e/gdb.threads/fork-plus-threads.exp index 845d859f95a..55ba77c608f 100644 --- a/gdb/testsuite/gdb.threads/fork-plus-threads.exp +++ b/gdb/testsuite/gdb.threads/fork-plus-threads.exp @@ -45,7 +45,7 @@ proc do_test { detach-on-fork } { =20 set GDBFLAGS $saved_gdbflags =20 - if ![runto_main] then { + if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/fork-thread-pending.exp b/gdb/testsu= ite/gdb.threads/fork-thread-pending.exp index f83df4e8bc4..4ca2284d6e8 100644 --- a/gdb/testsuite/gdb.threads/fork-thread-pending.exp +++ b/gdb/testsuite/gdb.threads/fork-thread-pending.exp @@ -27,7 +27,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}= " "${binfile}" executab =20 clean_restart ${binfile} =20 -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 @@ -84,7 +84,7 @@ gdb_start gdb_reinitialize_dir $srcdir/$subdir =20 gdb_load ${binfile} -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp = b/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp index a8b3b62f3b5..575761e69a1 100644 --- a/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp +++ b/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp @@ -38,7 +38,7 @@ proc probe_displaced_stepping_support {} { clean_restart $binfile =20 gdb_test_no_output "set displaced on" - if ![runto_main] then { + if {![runto_main]} { return 0 } =20 @@ -77,7 +77,7 @@ proc do_test { cond_bp_target detach_on_fork displaced } { clean_restart $binfile set GDBFLAGS $saved_gdbflags =20 - if ![runto_main] then { + if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/gcore-stale-thread.exp b/gdb/testsui= te/gdb.threads/gcore-stale-thread.exp index 01a4dc2a753..0811ce8f06b 100644 --- a/gdb/testsuite/gdb.threads/gcore-stale-thread.exp +++ b/gdb/testsuite/gdb.threads/gcore-stale-thread.exp @@ -24,7 +24,7 @@ clean_restart ${testfile} =20 gdb_test_no_output "set non-stop on" =20 -if { ! [ runto_main ] } then { +if {![runto_main]} { return -1 } =20 diff --git a/gdb/testsuite/gdb.threads/gcore-thread.exp b/gdb/testsuite/gdb= .threads/gcore-thread.exp index 4a77fd69509..b6108b629a4 100644 --- a/gdb/testsuite/gdb.threads/gcore-thread.exp +++ b/gdb/testsuite/gdb.threads/gcore-thread.exp @@ -22,7 +22,7 @@ set objfile $binfile.o set corefile $binfile.test set core0file ${binfile}0.test =20 -if [istarget "*-*-linux"] then { +if {[istarget "*-*-linux"]} { set target_cflags "-D_MIT_POSIX_THREADS" } else { set target_cflags "" @@ -55,7 +55,7 @@ set nl "\[\r\n\]+" =20 set timeout 30 =20 -if { ! [ runto_main ] } then { +if {![runto_main]} { return -1 } =20 diff --git a/gdb/testsuite/gdb.threads/kill.exp b/gdb/testsuite/gdb.threads= /kill.exp index a80c1239eff..992d18236ac 100644 --- a/gdb/testsuite/gdb.threads/kill.exp +++ b/gdb/testsuite/gdb.threads/kill.exp @@ -38,7 +38,7 @@ proc test {threaded} { return -1 } =20 - if { ![runto_main] } then { + if {![runto_main]} { return } =20 diff --git a/gdb/testsuite/gdb.threads/linux-dp.exp b/gdb/testsuite/gdb.thr= eads/linux-dp.exp index 953e6a9756b..84c68e7cace 100644 --- a/gdb/testsuite/gdb.threads/linux-dp.exp +++ b/gdb/testsuite/gdb.threads/linux-dp.exp @@ -35,7 +35,7 @@ =20 =20 # This only works with Linux configurations. -if ![istarget *-*-linux-gnu*] then { +if {![istarget *-*-linux-gnu*]} { return } =20 diff --git a/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp b/gdb/t= estsuite/gdb.threads/local-watch-wrong-thread.exp index e94c875f276..9ddcd589226 100644 --- a/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp +++ b/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp @@ -34,7 +34,7 @@ clean_restart ${binfile} =20 gdb_test_no_output "set can-use-hw-watchpoints 1" "" =20 -if ![runto_main] then { +if {![runto_main]} { return } =20 diff --git a/gdb/testsuite/gdb.threads/multiple-successive-infcall.exp b/gd= b/testsuite/gdb.threads/multiple-successive-infcall.exp index b950107f3d0..4e954129578 100644 --- a/gdb/testsuite/gdb.threads/multiple-successive-infcall.exp +++ b/gdb/testsuite/gdb.threads/multiple-successive-infcall.exp @@ -25,7 +25,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}= " "${binfile}" \ =20 clean_restart "${binfile}" =20 -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.exp= b/gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.exp index a703e841769..e78ccced941 100644 --- a/gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.exp +++ b/gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.exp @@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" \ return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/pending-step.exp b/gdb/testsuite/gdb= .threads/pending-step.exp index 89d1ecd853d..158cfed4057 100644 --- a/gdb/testsuite/gdb.threads/pending-step.exp +++ b/gdb/testsuite/gdb.threads/pending-step.exp @@ -56,7 +56,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}= " "${binfile}" executab =20 clean_restart ${binfile} =20 -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp b= /gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp index d6308059415..626143493c0 100644 --- a/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp +++ b/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp @@ -45,7 +45,7 @@ proc do_test { non_stop cond_bp_target } { clean_restart $binfile set GDBFLAGS $saved_gdbflags =20 - if ![runto_main] then { + if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/pthreads.exp b/gdb/testsuite/gdb.thr= eads/pthreads.exp index d2df4e07159..4cd104fb7b9 100644 --- a/gdb/testsuite/gdb.threads/pthreads.exp +++ b/gdb/testsuite/gdb.threads/pthreads.exp @@ -27,7 +27,7 @@ standard_testfile # carriage return) set horiz "\[^\n\r\]*" =20 -if [istarget "*-*-linux"] then { +if {[istarget "*-*-linux"]} { set target_cflags "-D_MIT_POSIX_THREADS" } else { set target_cflags "" @@ -79,7 +79,7 @@ proc all_threads_running {} { } } =20 - if { $return_me =3D=3D 1 } then { + if {$return_me =3D=3D 1} { return 0 } =20 @@ -139,7 +139,7 @@ proc test_startup {} { } } =20 - if { $return_me =3D=3D 1 } then { + if {$return_me =3D=3D 1} { return 0 } =20 @@ -189,7 +189,7 @@ proc check_control_c {} { =20 # Verify that all threads are running. with_test_prefix "after startup" { - if [all_threads_running] then { + if {[all_threads_running]} { pass "all threads running after startup" } } @@ -219,7 +219,7 @@ proc check_control_c {} { =20 # Verify that all threads can be run again after a ^C stop. with_test_prefix "after continue" { - if [all_threads_running] then { + if {[all_threads_running]} { pass "all threads running after continuing from ^C stop" } } @@ -345,9 +345,9 @@ proc check_qcs {} { =20 } =20 -if [runto_main] then { - if [test_startup] then { - if [check_control_c] then { +if {[runto_main]} { + if {[test_startup]} { + if {[check_control_c]} { warning "Could not stop child with ^C; skipping rest of tests.\n" return } diff --git a/gdb/testsuite/gdb.threads/reconnect-signal.exp b/gdb/testsuite= /gdb.threads/reconnect-signal.exp index 4b90c92ecbf..3edaa31b7d3 100644 --- a/gdb/testsuite/gdb.threads/reconnect-signal.exp +++ b/gdb/testsuite/gdb.threads/reconnect-signal.exp @@ -33,7 +33,7 @@ if { [gdb_compile_pthreads \ =20 clean_restart $executable =20 -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp b/g= db/testsuite/gdb.threads/signal-command-handle-nopass.exp index e18d12d7394..47a6fc3d2c4 100644 --- a/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp +++ b/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp @@ -40,7 +40,7 @@ proc test { step_over } { with_test_prefix "step-over $step_over" { clean_restart ${binfile} =20 - if ![runto_main] then { + if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pend= ing.exp b/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending= .exp index ba7bb26178c..6c56377c461 100644 --- a/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp +++ b/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp @@ -37,7 +37,7 @@ proc test { schedlock } { with_test_prefix "schedlock $schedlock" { clean_restart ${binfile} =20 - if ![runto_main] then { + if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp b/= gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp index 4e9d9ee6017..e041ffafa4c 100644 --- a/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp +++ b/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp @@ -34,7 +34,7 @@ proc test { command } { with_test_prefix "$command" { clean_restart ${binfile} =20 - if ![runto_main] then { + if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/signal-sigtrap.exp b/gdb/testsuite/g= db.threads/signal-sigtrap.exp index 1866ab9dd07..7aba001d4f6 100644 --- a/gdb/testsuite/gdb.threads/signal-sigtrap.exp +++ b/gdb/testsuite/gdb.threads/signal-sigtrap.exp @@ -37,7 +37,7 @@ proc test { sigtrap_thread } { with_test_prefix "sigtrap thread $sigtrap_thread" { clean_restart ${binfile} =20 - if ![runto "thread_function"] then { + if {![runto "thread_function"]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/sigthread.exp b/gdb/testsuite/gdb.th= reads/sigthread.exp index 8e068cd9516..d650b872f2d 100644 --- a/gdb/testsuite/gdb.threads/sigthread.exp +++ b/gdb/testsuite/gdb.threads/sigthread.exp @@ -23,7 +23,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}= " "${binfile}" \ =20 clean_restart ${binfile} =20 -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/stop-with-handle.exp b/gdb/testsuite= /gdb.threads/stop-with-handle.exp index fccafd8acbf..b3336c2c609 100644 --- a/gdb/testsuite/gdb.threads/stop-with-handle.exp +++ b/gdb/testsuite/gdb.threads/stop-with-handle.exp @@ -28,7 +28,7 @@ if {[prepare_for_testing "failed to prepare" \ return -1 } =20 -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/thread-find.exp b/gdb/testsuite/gdb.= threads/thread-find.exp index fb23df10b88..f60caff74dd 100644 --- a/gdb/testsuite/gdb.threads/thread-find.exp +++ b/gdb/testsuite/gdb.threads/thread-find.exp @@ -67,7 +67,7 @@ gdb_test_multiple "info threads" "collect thread id" { } } =20 -if { [info exists thread6] } then { +if {[info exists thread6]} { gdb_test "echo $thread6\\n" "$thread6" "got thread ids" } =20 @@ -84,7 +84,7 @@ gdb_test_multiple "info threads" "collect thread id" { } } =20 -if { [info exists process6] } then { +if {[info exists process6]} { gdb_test "echo $process6\\n" "$process6" "got process ids" } =20 @@ -101,7 +101,7 @@ gdb_test_multiple "info threads" "collect thread id" { } } =20 -if { [info exists lwp6] } then { +if {[info exists lwp6]} { gdb_test "echo $lwp6\\n" "$lwp6" "got lwp ids" } =20 @@ -126,7 +126,7 @@ gdb_test "thread find threadname_1" \ # Test 'thread find' with thread ids, if any. # =20 -if { [info exists thread6] } then { +if {[info exists thread6]} { gdb_test "thread find $thread6" \ "Thread 6 has .*$thread6.*" "find thread id 6" gdb_test "thread find $thread5" \ @@ -145,7 +145,7 @@ if { [info exists thread6] } then { # Test 'thread find' with process ids, if any. # =20 -if { [info exists process6] } then { +if {[info exists process6]} { gdb_test "thread find $process6" \ "Thread 6 has .*$process6.*" "find process id 6" gdb_test "thread find $process5" \ @@ -164,7 +164,7 @@ if { [info exists process6] } then { # Test 'thread find' with lwp ids, if any. # =20 -if { [info exists lwp6] } then { +if {[info exists lwp6]} { gdb_test "thread find $lwp6" \ "Thread 6 has .*$lwp6.*" "find lwp id 6" gdb_test "thread find $lwp5" \ @@ -197,7 +197,7 @@ gdb_test_multiple "thread find threadname_\[345\]" "tes= t regular exp" { exp_continue } -re ".*$gdb_prompt $" { - if { $see3 && $see4 && $see5 && !$see1 && !$see2 && !$see6 } then { + if {$see3 && $see4 && $see5 && !$see1 && !$see2 && !$see6} { pass "test regular exp" } else { fail "test regular exp" @@ -219,7 +219,7 @@ gdb_test_multiple "info threads 2 4 6" "info threads 2 = 4 6" { exp_continue } -re "$gdb_prompt $" { - if { $see2 && $see4 && $see6 && !$see1 && !$see3 && !$see5 } then { + if {$see2 && $see4 && $see6 && !$see1 && !$see3 && !$see5} { pass "info threads 2 4 6" } else { fail "info threads 2 4 6" @@ -241,7 +241,7 @@ gdb_test_multiple "info threads 3-5" "info threads 3-5"= { exp_continue } -re "$gdb_prompt $" { - if { $see3 && $see4 && $see5 && !$see1 && !$see2 && !$see6 } then { + if {$see3 && $see4 && $see5 && !$see1 && !$see2 && !$see6} { pass "info threads 3-5" } else { fail "info threads 3-5" @@ -265,7 +265,7 @@ gdb_test_multiple "info threads 3-3" "info threads 3-3"= { exp_continue } -re ".*$gdb_prompt $" { - if { $see3 && !$see1 && !$see2 && !$see4 && !$see5 && !$see6 } then { + if {$see3 && !$see1 && !$see2 && !$see4 && !$see5 && !$see6} { pass "info threads 3-3" } else { fail "info threads 3-3" diff --git a/gdb/testsuite/gdb.threads/thread_check.exp b/gdb/testsuite/gdb= .threads/thread_check.exp index 61ec078a85a..03431fd56a4 100644 --- a/gdb/testsuite/gdb.threads/thread_check.exp +++ b/gdb/testsuite/gdb.threads/thread_check.exp @@ -41,7 +41,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}= " "${binfile}" executab =20 clean_restart ${binfile} =20 -if ![runto_main] then { +if {![runto_main]} { return 1 } =20 diff --git a/gdb/testsuite/gdb.threads/thread_events.exp b/gdb/testsuite/gd= b.threads/thread_events.exp index a612d223396..6cd935a39a1 100644 --- a/gdb/testsuite/gdb.threads/thread_events.exp +++ b/gdb/testsuite/gdb.threads/thread_events.exp @@ -23,7 +23,7 @@ =20 # This test has only been verified with Linux targets, and would need # to be generalized to support other targets -if ![istarget *-*-linux*] then { +if {![istarget *-*-linux*]} { return } =20 @@ -112,7 +112,7 @@ proc test_thread_messages {enabled} { =20 # The initial thread may log a 'New Thread' message, but we don't # check for it. - if ![runto_main] then { + if {![runto_main]} { return 1 } =20 diff --git a/gdb/testsuite/gdb.threads/threadapply.exp b/gdb/testsuite/gdb.= threads/threadapply.exp index c8b73d13400..8302773ec13 100644 --- a/gdb/testsuite/gdb.threads/threadapply.exp +++ b/gdb/testsuite/gdb.threads/threadapply.exp @@ -31,7 +31,7 @@ clean_restart ${binfile} # Run to `main' where we begin our tests. # =20 -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/tls-nodebug-pie.exp b/gdb/testsuite/= gdb.threads/tls-nodebug-pie.exp index 88cabac71c8..5873796ad32 100644 --- a/gdb/testsuite/gdb.threads/tls-nodebug-pie.exp +++ b/gdb/testsuite/gdb.threads/tls-nodebug-pie.exp @@ -21,7 +21,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}= " "${binfile}" executab } =20 clean_restart ${binfile} -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/tls-nodebug.exp b/gdb/testsuite/gdb.= threads/tls-nodebug.exp index 6b8023a91b9..00e539b7d14 100644 --- a/gdb/testsuite/gdb.threads/tls-nodebug.exp +++ b/gdb/testsuite/gdb.threads/tls-nodebug.exp @@ -16,7 +16,7 @@ =20 standard_testfile =20 -if [istarget "*-*-linux"] then { +if {[istarget "*-*-linux"]} { set target_cflags "-D_MIT_POSIX_THREADS" } else { set target_cflags "" @@ -27,7 +27,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}= " "${binfile}" executab } =20 clean_restart ${binfile} -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/tls-shared.exp b/gdb/testsuite/gdb.t= hreads/tls-shared.exp index cff80f86049..8f0f9ec62fd 100644 --- a/gdb/testsuite/gdb.threads/tls-shared.exp +++ b/gdb/testsuite/gdb.threads/tls-shared.exp @@ -32,7 +32,7 @@ if { [gdb_compile_shlib_pthreads ${srcdir}/${subdir}/${sr= cfile_lib} ${binfile_li clean_restart ${binfile} gdb_load_shlib ${binfile_lib} =20 -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/tls-so_extern.exp b/gdb/testsuite/gd= b.threads/tls-so_extern.exp index e6783175904..b885c0beaca 100644 --- a/gdb/testsuite/gdb.threads/tls-so_extern.exp +++ b/gdb/testsuite/gdb.threads/tls-so_extern.exp @@ -31,7 +31,7 @@ if { [gdb_compile_shlib_pthreads ${srcdir}/${subdir}/${sr= cfile_lib} ${binfile_li clean_restart ${binfile} gdb_load_shlib ${binfile_lib} =20 -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/tls.exp b/gdb/testsuite/gdb.threads/= tls.exp index 4f88c0ec987..f041571926d 100644 --- a/gdb/testsuite/gdb.threads/tls.exp +++ b/gdb/testsuite/gdb.threads/tls.exp @@ -18,7 +18,7 @@ load_lib gdb-python.exp =20 standard_testfile tls.c tls2.c =20 -if [istarget "*-*-linux"] then { +if {[istarget "*-*-linux"]} { set target_cflags "-D_MIT_POSIX_THREADS" } else { set target_cflags "" @@ -167,7 +167,7 @@ gdb_test_multiple "print a_thread_local" "" { } } =20 -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/vfork-follow-child-exec.exp b/gdb/te= stsuite/gdb.threads/vfork-follow-child-exec.exp index c679857cb6b..0398e226641 100644 --- a/gdb/testsuite/gdb.threads/vfork-follow-child-exec.exp +++ b/gdb/testsuite/gdb.threads/vfork-follow-child-exec.exp @@ -30,7 +30,7 @@ proc test_vfork {detach} { =20 clean_restart $binfile =20 - if ![runto_main] then { + if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/vfork-follow-child-exit.exp b/gdb/te= stsuite/gdb.threads/vfork-follow-child-exit.exp index aff4ad241fa..0bff3aff697 100644 --- a/gdb/testsuite/gdb.threads/vfork-follow-child-exit.exp +++ b/gdb/testsuite/gdb.threads/vfork-follow-child-exit.exp @@ -30,7 +30,7 @@ proc test_vfork {detach} { =20 clean_restart $binfile =20 - if ![runto_main] then { + if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/watchthreads.exp b/gdb/testsuite/gdb= .threads/watchthreads.exp index 7003044a177..7fac8a3df80 100644 --- a/gdb/testsuite/gdb.threads/watchthreads.exp +++ b/gdb/testsuite/gdb.threads/watchthreads.exp @@ -44,7 +44,7 @@ gdb_test_no_output "set can-use-hw-watchpoints 1" "" # Run to `main' where we begin our tests. # =20 -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/watchthreads2.exp b/gdb/testsuite/gd= b.threads/watchthreads2.exp index 2c18b20257c..8b887f2a944 100644 --- a/gdb/testsuite/gdb.threads/watchthreads2.exp +++ b/gdb/testsuite/gdb.threads/watchthreads2.exp @@ -41,7 +41,7 @@ gdb_test_no_output "set can-use-hw-watchpoints 1" "" # Run to `main' where we begin our tests. # =20 -if ![runto_main] then { +if {![runto_main]} { return 0 } =20 diff --git a/gdb/testsuite/gdb.threads/wp-replication.exp b/gdb/testsuite/g= db.threads/wp-replication.exp index d1c5b9df2d5..bec3d10fd67 100644 --- a/gdb/testsuite/gdb.threads/wp-replication.exp +++ b/gdb/testsuite/gdb.threads/wp-replication.exp @@ -42,7 +42,7 @@ clean_restart ${binfile} gdb_test_no_output "set can-use-hw-watchpoints 1" "" =20 # Run to `main' where we begin our tests. -if ![runto_main] then { +if {![runto_main]} { return 0 }