From patchwork Tue Nov 15 10:42:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Burgess X-Patchwork-Id: 60644 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 63E9D393BA67 for ; Tue, 15 Nov 2022 10:46:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 63E9D393BA67 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1668509219; bh=kx1chylUDXIyZw9iVj2wQUl8PwNwNvx4uPEE7H2dB10=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=nP/dAluQgDtA33V/PlanjI9BRbimKyMB3YQWzUJay4jh565ovcWkSp8fZ2cyUiCXT Ndvzx4DUXXpnewQzFfuuznC6dOM+++sDEqs4pZfzbf8UiWlkEGw23+Vrgr/h/ubA7V 5qIUgQGIw3zMpmcy3jSaASrnP2hjyLPeIIuOV1bs= X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 043273895FD6 for ; Tue, 15 Nov 2022 10:42:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 043273895FD6 Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-526-cBNtajrMPgaEuK6NnlWs0Q-1; Tue, 15 Nov 2022 05:42:53 -0500 X-MC-Unique: cBNtajrMPgaEuK6NnlWs0Q-1 Received: by mail-qk1-f198.google.com with SMTP id h8-20020a05620a284800b006b5c98f09fbso13408455qkp.21 for ; Tue, 15 Nov 2022 02:42:53 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kx1chylUDXIyZw9iVj2wQUl8PwNwNvx4uPEE7H2dB10=; b=R6/RvjCeTY7BwPCaQLa2REDUYLrhWyFWyrinXaB5f2sq9CvzaqsKgpSPUtO296QioZ z18J2g5f4VJxoyngyk4T6yE61Ps59fwChL4OKM5zAelGUea4ZKML/BIqlYzWG8MezQwU T/sfPtMV2l91eM1jCM9xmUkmDj6Fv0qFSD5AAzEncOpFg3qgb0STJmEmZLD7r4oHDE6m /dEsi5YTh06ooPM/K7kCXt9SMJixYmkWF60bEbaqedl7/J+DJ2XOtJyYwt/y0PRwXENT mRRpnp1mCVRKCnItcnYWSz0/ojHqFOscYFfhalDKfTZTjCdDDVSHtgbXoh7qkDeNEfwp et/g== X-Gm-Message-State: ANoB5pnyMOh69/iBgiVxArY8DZ3JngPJnweLQu1kFhSPxJBSAAk1b5p+ BqtXIIxdhC0WLxxEFzsIgx2ICc5D81wSlOaPYI5TMYeF/CwpJGlpstmydM+JHoMVbNPCSARO3LS DjXGiDXwJJ84vnwdRH7hoYblU/J+0VNBlARQXOiN9Be/QWPucvz45r80DrXaOGBUdX1vl2IQiAg == X-Received: by 2002:ac8:53cb:0:b0:3a5:6047:c75b with SMTP id c11-20020ac853cb000000b003a56047c75bmr16039356qtq.60.1668508972224; Tue, 15 Nov 2022 02:42:52 -0800 (PST) X-Google-Smtp-Source: AA0mqf5s0seoOEZBDoiZYT5B/dv5oVQHeayA2srJDIrddZFe4a84TmBNfIl+q4lzOtOP2A0xatgGCg== X-Received: by 2002:ac8:53cb:0:b0:3a5:6047:c75b with SMTP id c11-20020ac853cb000000b003a56047c75bmr16039334qtq.60.1668508971626; Tue, 15 Nov 2022 02:42:51 -0800 (PST) Received: from localhost ([31.111.84.238]) by smtp.gmail.com with ESMTPSA id d11-20020a05620a240b00b006e2d087fd63sm8231037qkn.63.2022.11.15.02.42.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 02:42:51 -0800 (PST) To: gdb-patches@sourceware.org Cc: Andrew Burgess Subject: [PATCH 07/14] gdb/testsuite: remove use of then keyword from gdb.threads/*.exp Date: Tue, 15 Nov 2022 10:42:24 +0000 Message-Id: <310eeb28b8fa5e1437a84308bfb40a6c9dc220e2.1668508386.git.aburgess@redhat.com> X-Mailer: git-send-email 2.25.4 In-Reply-To: References: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.6 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Andrew Burgess via Gdb-patches From: Andrew Burgess Reply-To: Andrew Burgess Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" 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. This commit removes all use of the 'then' keyword from the gdb.threads/ test script directory. There should be no changes in what is tested after this commit. --- .../gdb.threads/clone-new-thread-event.exp | 2 +- .../gdb.threads/current-lwp-dead.exp | 2 +- .../gdb.threads/detach-step-over.exp | 2 +- .../gdb.threads/fork-child-threads.exp | 2 +- .../gdb.threads/fork-plus-threads.exp | 2 +- .../gdb.threads/fork-thread-pending.exp | 4 ++-- .../forking-threads-plus-breakpoint.exp | 4 ++-- .../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 +- .../multiple-successive-infcall.exp | 2 +- .../next-while-other-thread-longjmps.exp | 2 +- gdb/testsuite/gdb.threads/pending-step.exp | 2 +- .../process-dies-while-handling-bp.exp | 2 +- gdb/testsuite/gdb.threads/pthreads.exp | 16 +++++++-------- .../gdb.threads/reconnect-signal.exp | 2 +- .../signal-command-handle-nopass.exp | 2 +- ...ignal-command-multiple-signals-pending.exp | 2 +- .../signal-delivered-right-thread.exp | 2 +- gdb/testsuite/gdb.threads/signal-sigtrap.exp | 2 +- gdb/testsuite/gdb.threads/sigthread.exp | 2 +- .../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/testsuite/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 . # This only works on targets with the Linux kernel. -if ![istarget *-*-linux*] then { +if {![istarget *-*-linux*]} { return } 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 # This only works with on Linux targets. -if ![istarget *-*-linux*] then { +if {![istarget *-*-linux*]} { return } diff --git a/gdb/testsuite/gdb.threads/detach-step-over.exp b/gdb/testsuite/gdb.threads/detach-step-over.exp index 15af7e0e723..88b22e224ae 100644 --- a/gdb/testsuite/gdb.threads/detach-step-over.exp +++ b/gdb/testsuite/gdb.threads/detach-step-over.exp @@ -84,7 +84,7 @@ proc test {condition_eval target_non_stop non_stop displaced} { gdb_test "inferior 2" "Switching to .*" 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/testsuite/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 clean_restart ${binfile} -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.threads/fork-plus-threads.exp b/gdb/testsuite/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 } { set GDBFLAGS $saved_gdbflags - if ![runto_main] then { + if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.threads/fork-thread-pending.exp b/gdb/testsuite/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 clean_restart ${binfile} -if ![runto_main] then { +if {![runto_main]} { return 0 } @@ -84,7 +84,7 @@ gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} -if ![runto_main] then { +if {![runto_main]} { return 0 } 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 gdb_test_no_output "set displaced on" - if ![runto_main] then { + if {![runto_main]} { return 0 } @@ -77,7 +77,7 @@ proc do_test { cond_bp_target detach_on_fork displaced } { clean_restart $binfile set GDBFLAGS $saved_gdbflags - if ![runto_main] then { + if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.threads/gcore-stale-thread.exp b/gdb/testsuite/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} gdb_test_no_output "set non-stop on" -if { ! [ runto_main ] } then { +if {![runto_main]} { return -1 } diff --git a/gdb/testsuite/gdb.threads/gcore-thread.exp b/gdb/testsuite/gdb.threads/gcore-thread.exp index 748831ed28e..212920a8fbf 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 -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\]+" set timeout 30 -if { ! [ runto_main ] } then { +if {![runto_main]} { return -1 } 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 } - if { ![runto_main] } then { + if {![runto_main]} { return } diff --git a/gdb/testsuite/gdb.threads/linux-dp.exp b/gdb/testsuite/gdb.threads/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 @@ # This only works with Linux configurations. -if ![istarget *-*-linux-gnu*] then { +if {![istarget *-*-linux-gnu*]} { return } diff --git a/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp b/gdb/testsuite/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} gdb_test_no_output "set can-use-hw-watchpoints 1" "" -if ![runto_main] then { +if {![runto_main]} { return } diff --git a/gdb/testsuite/gdb.threads/multiple-successive-infcall.exp b/gdb/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}" \ clean_restart "${binfile}" -if ![runto_main] then { +if {![runto_main]} { return 0 } 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 } -if ![runto_main] then { +if {![runto_main]} { return 0 } 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 clean_restart ${binfile} -if ![runto_main] then { +if {![runto_main]} { return 0 } 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 - if ![runto_main] then { + if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.threads/pthreads.exp b/gdb/testsuite/gdb.threads/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\]*" -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 {} { } } - if { $return_me == 1 } then { + if {$return_me == 1} { return 0 } @@ -139,7 +139,7 @@ proc test_startup {} { } } - if { $return_me == 1 } then { + if {$return_me == 1} { return 0 } @@ -189,7 +189,7 @@ proc check_control_c {} { # 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 {} { # 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 {} { } -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 \ clean_restart $executable -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp b/gdb/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} - if ![runto_main] then { + if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.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} - if ![runto_main] then { + if {![runto_main]} { return 0 } 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} - if ![runto_main] then { + if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.threads/signal-sigtrap.exp b/gdb/testsuite/gdb.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} - if ![runto "thread_function"] then { + if {![runto "thread_function"]} { return 0 } diff --git a/gdb/testsuite/gdb.threads/sigthread.exp b/gdb/testsuite/gdb.threads/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}" \ clean_restart ${binfile} -if ![runto_main] then { +if {![runto_main]} { return 0 } 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 } -if ![runto_main] then { +if {![runto_main]} { return 0 } 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" { } } -if { [info exists thread6] } then { +if {[info exists thread6]} { gdb_test "echo $thread6\\n" "$thread6" "got thread ids" } @@ -84,7 +84,7 @@ gdb_test_multiple "info threads" "collect thread id" { } } -if { [info exists process6] } then { +if {[info exists process6]} { gdb_test "echo $process6\\n" "$process6" "got process ids" } @@ -101,7 +101,7 @@ gdb_test_multiple "info threads" "collect thread id" { } } -if { [info exists lwp6] } then { +if {[info exists lwp6]} { gdb_test "echo $lwp6\\n" "$lwp6" "got lwp ids" } @@ -126,7 +126,7 @@ gdb_test "thread find threadname_1" \ # Test 'thread find' with thread ids, if any. # -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. # -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. # -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\]" "test 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 clean_restart ${binfile} -if ![runto_main] then { +if {![runto_main]} { return 1 } diff --git a/gdb/testsuite/gdb.threads/thread_events.exp b/gdb/testsuite/gdb.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 @@ # 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 } @@ -112,7 +112,7 @@ proc test_thread_messages {enabled} { # 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 } 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. # -if ![runto_main] then { +if {![runto_main]} { return 0 } 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 } clean_restart ${binfile} -if ![runto_main] then { +if {![runto_main]} { return 0 } 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 @@ standard_testfile -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 } clean_restart ${binfile} -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.threads/tls-shared.exp b/gdb/testsuite/gdb.threads/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}/${srcfile_lib} ${binfile_li clean_restart ${binfile} gdb_load_shlib ${binfile_lib} -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.threads/tls-so_extern.exp b/gdb/testsuite/gdb.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}/${srcfile_lib} ${binfile_li clean_restart ${binfile} gdb_load_shlib ${binfile_lib} -if ![runto_main] then { +if {![runto_main]} { return 0 } 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 standard_testfile tls.c tls2.c -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" "" { } } -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.threads/vfork-follow-child-exec.exp b/gdb/testsuite/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} { clean_restart $binfile - if ![runto_main] then { + if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.threads/vfork-follow-child-exit.exp b/gdb/testsuite/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} { clean_restart $binfile - if ![runto_main] then { + if {![runto_main]} { return 0 } 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. # -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.threads/watchthreads2.exp b/gdb/testsuite/gdb.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. # -if ![runto_main] then { +if {![runto_main]} { return 0 } diff --git a/gdb/testsuite/gdb.threads/wp-replication.exp b/gdb/testsuite/gdb.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" "" # Run to `main' where we begin our tests. -if ![runto_main] then { +if {![runto_main]} { return 0 }