From patchwork Fri Feb 24 20:28:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 65624 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 6A4C5385043F for ; Fri, 24 Feb 2023 20:29:27 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from gproxy1-pub.mail.unifiedlayer.com (gproxy1-pub.mail.unifiedlayer.com [69.89.25.95]) by sourceware.org (Postfix) with ESMTPS id DBA68385B507 for ; Fri, 24 Feb 2023 20:28:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DBA68385B507 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com Received: from cmgw11.mail.unifiedlayer.com (unknown [10.0.90.126]) by progateway3.mail.pro1.eigbox.com (Postfix) with ESMTP id 5BBFD1003EF9A for ; Fri, 24 Feb 2023 20:28:35 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id VegFphwx43nuFVegFpHHCa; Fri, 24 Feb 2023 20:28:35 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=LYn5VhTi c=1 sm=1 tr=0 ts=63f91df3 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10:nop_charset_1 a=m04uMKEZRckA:10:nop_rcvd_month_year a=Qbun_eYptAEA:10:endurance_base64_authed_username_1 a=mDV3o1hIAAAA:8 a=20KFwNOVAAAA:8 a=TkTTPzHaAAAA:8 a=A4BTWt3QmwmJXjrUT-gA:9 a=QEXdDO2ut3YA:10:nop_charset_2 a=_FVE-zBwftR9WsbkzFJk:22 a=Qz3p68GZ3z-NqTySStDO:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=To:In-Reply-To:References:Message-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:Date:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=M+wo4E9KXSWJU5n6Xcgi6JB5/ncDggTSKV9vNQSqA6s=; b=NwfFjSArwRggzeOqt37elrwieq zhBkyVvwGLlyu/mvlcY72gH9yyS5aoDJBxYlxGmHt+CLOyzOG5mgBgVAm2pR/5XJ1T/X0Td5QJ9CR +GkTKeKWRaSHldXDdJRm95L1x; Received: from 75-166-130-93.hlrn.qwest.net ([75.166.130.93]:37332 helo=[192.168.0.21]) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pVegF-002w7s-4Z for gdb-patches@sourceware.org; Fri, 24 Feb 2023 13:28:35 -0700 From: Tom Tromey Date: Fri, 24 Feb 2023 13:28:28 -0700 Subject: [PATCH 1/4] Use require with target_info MIME-Version: 1.0 Message-Id: <20230224-submit-require-fixes-v1-1-7cbcbbf613c9@tromey.com> References: <20230224-submit-require-fixes-v1-0-7cbcbbf613c9@tromey.com> In-Reply-To: <20230224-submit-require-fixes-v1-0-7cbcbbf613c9@tromey.com> To: gdb-patches@sourceware.org X-Mailer: b4 0.12.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.130.93 X-Source-L: No X-Exim-ID: 1pVegF-002w7s-4Z X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-130-93.hlrn.qwest.net ([192.168.0.21]) [75.166.130.93]:37332 X-Source-Auth: tom+tromey.com X-Email-Count: 4 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3026.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, 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: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" This changes many tests to use 'require' when checking target_info. In a few spots, the require is hoisted to the top of the file, to avoid doing any extra work when the test is going to be skipped anyway. --- gdb/testsuite/gdb.base/args.exp | 4 +--- gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp | 10 ++-------- gdb/testsuite/gdb.base/branch-to-self.exp | 5 +---- gdb/testsuite/gdb.base/call-ar-st.exp | 5 +---- gdb/testsuite/gdb.base/call-rt-st.exp | 11 +++-------- gdb/testsuite/gdb.base/call-sc.exp | 5 +---- gdb/testsuite/gdb.base/call-signal-resume.exp | 16 +++++----------- gdb/testsuite/gdb.base/call-strs.exp | 5 +---- gdb/testsuite/gdb.base/callexit.exp | 5 +---- gdb/testsuite/gdb.base/callfuncs.exp | 5 +---- gdb/testsuite/gdb.base/cast-call.exp | 5 +---- gdb/testsuite/gdb.base/catch-gdb-caused-signals.exp | 5 +---- gdb/testsuite/gdb.base/catch-signal-fork.exp | 5 +---- gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp | 5 +---- gdb/testsuite/gdb.base/catch-signal.exp | 5 +---- gdb/testsuite/gdb.base/exitsignal.exp | 5 +---- gdb/testsuite/gdb.base/fileio.exp | 5 +---- gdb/testsuite/gdb.base/huge.exp | 4 +--- gdb/testsuite/gdb.base/infcall-input.exp | 5 +---- gdb/testsuite/gdb.base/inferior-args.exp | 5 +---- gdb/testsuite/gdb.base/interrupt-daemon-attach.exp | 10 ++-------- gdb/testsuite/gdb.base/interrupt.exp | 10 ++-------- gdb/testsuite/gdb.base/kill-after-signal.exp | 5 +---- gdb/testsuite/gdb.base/long-inferior-output.exp | 5 +---- gdb/testsuite/gdb.base/long_long.exp | 4 +--- gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp | 5 +---- gdb/testsuite/gdb.base/random-signal.exp | 10 ++-------- gdb/testsuite/gdb.base/relativedebug.exp | 5 +---- gdb/testsuite/gdb.base/savedregs.exp | 5 +---- gdb/testsuite/gdb.base/sigall.exp | 5 +---- gdb/testsuite/gdb.base/sigaltstack.exp | 5 +---- gdb/testsuite/gdb.base/sigbpt.exp | 5 +---- gdb/testsuite/gdb.base/sigchld.exp | 5 +---- gdb/testsuite/gdb.base/siginfo-addr.exp | 5 +---- gdb/testsuite/gdb.base/siginfo-infcall.exp | 5 +---- gdb/testsuite/gdb.base/siginfo-obj.exp | 5 +---- gdb/testsuite/gdb.base/siginfo-thread.exp | 5 +---- gdb/testsuite/gdb.base/siginfo.exp | 5 +---- gdb/testsuite/gdb.base/signals.exp | 5 +---- gdb/testsuite/gdb.base/signest.exp | 5 +---- gdb/testsuite/gdb.base/signull.exp | 5 +---- gdb/testsuite/gdb.base/sigrepeat.exp | 5 +---- gdb/testsuite/gdb.base/sigstep.exp | 5 +---- gdb/testsuite/gdb.base/sigwinch-notty.exp | 5 +---- gdb/testsuite/gdb.base/structs.exp | 5 +---- gdb/testsuite/gdb.base/unwindonsignal.exp | 10 ++-------- gdb/testsuite/gdb.base/watch-cond-infcall.exp | 5 +---- gdb/testsuite/gdb.cp/gdb2495.exp | 10 ++-------- gdb/testsuite/gdb.fortran/array-slices.exp | 4 +--- gdb/testsuite/gdb.fortran/lbound-ubound.exp | 8 +++----- gdb/testsuite/gdb.gdb/python-helper.exp | 5 +---- gdb/testsuite/gdb.mi/mi-syn-frame.exp | 5 +---- gdb/testsuite/gdb.mi/mi-threads-interrupt.exp | 5 +---- gdb/testsuite/gdb.reverse/sigall-precsave.exp | 5 +---- gdb/testsuite/gdb.reverse/sigall-reverse.exp | 5 +---- gdb/testsuite/gdb.server/reconnect-ctrl-c.exp | 5 +---- gdb/testsuite/gdb.threads/continue-pending-status.exp | 5 +---- gdb/testsuite/gdb.threads/hand-call-in-threads.exp | 11 ++++------- gdb/testsuite/gdb.threads/interrupted-hand-call.exp | 11 ++++------- gdb/testsuite/gdb.threads/leader-exit.exp | 5 +---- gdb/testsuite/gdb.threads/manythreads.exp | 5 +---- gdb/testsuite/gdb.threads/multiple-step-overs.exp | 5 +---- gdb/testsuite/gdb.threads/names.exp | 4 +--- gdb/testsuite/gdb.threads/non-stop-fair-events.exp | 5 +---- gdb/testsuite/gdb.threads/pthreads.exp | 5 +---- gdb/testsuite/gdb.threads/schedlock.exp | 5 +---- .../gdb.threads/signal-command-handle-nopass.exp | 5 +---- .../signal-command-multiple-signals-pending.exp | 5 +---- .../gdb.threads/signal-delivered-right-thread.exp | 5 +---- gdb/testsuite/gdb.threads/signal-sigtrap.exp | 5 +---- .../signal-while-stepping-over-bp-other-thread.exp | 5 +---- gdb/testsuite/gdb.threads/sigthread.exp | 9 +++------ gdb/testsuite/gdb.threads/thread-unwindonsignal.exp | 11 ++++------- gdb/testsuite/gdb.trace/signal.exp | 5 +---- gdb/testsuite/gdb.tui/completion.exp | 4 +--- 75 files changed, 100 insertions(+), 341 deletions(-) diff --git a/gdb/testsuite/gdb.base/args.exp b/gdb/testsuite/gdb.base/args.exp index 17890745208..0b55c4444aa 100644 --- a/gdb/testsuite/gdb.base/args.exp +++ b/gdb/testsuite/gdb.base/args.exp @@ -16,9 +16,7 @@ # This is a test for the gdb invocation option --args. # Skip test if target does not support argument passing. -if [target_info exists noargs] { - return -} +require {!target_info exists noargs} # This test requires starting new inferior processes, skip it if the target # board is a stub. diff --git a/gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp b/gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp index d8eb353bd5b..f773fdbe3b8 100644 --- a/gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp +++ b/gdb/testsuite/gdb.base/bp-cmds-continue-ctrl-c.exp @@ -19,16 +19,10 @@ # the terminal (between the stop and the re-resume), the resulting # "Quit" doesn't mess up the debug session. -if [target_info exists gdb,nosignals] { - verbose "Skipping because of nosignals." - return -} +require {!target_info exists gdb,nosignals} # This test requires sending ^C to interrupt the running target. -if [target_info exists gdb,nointerrupts] { - verbose "Skipping because of nointerrupts." - return -} +require {!target_info exists gdb,nointerrupts} standard_testfile diff --git a/gdb/testsuite/gdb.base/branch-to-self.exp b/gdb/testsuite/gdb.base/branch-to-self.exp index 0327955d7a0..abb12c0084e 100644 --- a/gdb/testsuite/gdb.base/branch-to-self.exp +++ b/gdb/testsuite/gdb.base/branch-to-self.exp @@ -15,10 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if [target_info exists gdb,nosignals] { - verbose "Skipping branch-to-self.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} standard_testfile diff --git a/gdb/testsuite/gdb.base/call-ar-st.exp b/gdb/testsuite/gdb.base/call-ar-st.exp index 7e2aee6a4aa..8abd3b40d91 100644 --- a/gdb/testsuite/gdb.base/call-ar-st.exp +++ b/gdb/testsuite/gdb.base/call-ar-st.exp @@ -21,10 +21,7 @@ standard_testfile # Some targets can't call functions, so don't even bother with this # test. -if [target_info exists gdb,cannot_call_functions] { - unsupported "this target can not call functions" - return -} +require {!target_info exists gdb,cannot_call_functions} # Create and source the file that provides information about the compiler # used to compile the test case. diff --git a/gdb/testsuite/gdb.base/call-rt-st.exp b/gdb/testsuite/gdb.base/call-rt-st.exp index a84c1671e3a..9840e3cd8ed 100644 --- a/gdb/testsuite/gdb.base/call-rt-st.exp +++ b/gdb/testsuite/gdb.base/call-rt-st.exp @@ -19,7 +19,9 @@ # corresponding source file: call_return_struct.c - +# Some targets can't do function calls, so don't even bother with this +# test. +require {!target_info exists gdb,cannot_call_functions} standard_testfile .c @@ -28,13 +30,6 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb return -1 } -# Some targets can't do function calls, so don't even bother with this -# test. -if [target_info exists gdb,cannot_call_functions] { - unsupported "this target can not call functions" - return -} - set allow_float_test [allow_float_test] # Start with a fresh gdb. diff --git a/gdb/testsuite/gdb.base/call-sc.exp b/gdb/testsuite/gdb.base/call-sc.exp index cda6f618472..45728de53d3 100644 --- a/gdb/testsuite/gdb.base/call-sc.exp +++ b/gdb/testsuite/gdb.base/call-sc.exp @@ -22,10 +22,7 @@ # Some targets can't call functions, so don't even bother with this # test. -if [target_info exists gdb,cannot_call_functions] { - unsupported "this target can not call functions" - return -} +require {!target_info exists gdb,cannot_call_functions} standard_testfile .c diff --git a/gdb/testsuite/gdb.base/call-signal-resume.exp b/gdb/testsuite/gdb.base/call-signal-resume.exp index 2388b9459d4..a08ca7e1cc3 100644 --- a/gdb/testsuite/gdb.base/call-signal-resume.exp +++ b/gdb/testsuite/gdb.base/call-signal-resume.exp @@ -20,10 +20,11 @@ # 2) Inferior is stopped at a signal. Upon resumption it should continue # with that signal, regardless of whatever the hand-called function did. -if [target_info exists gdb,nosignals] { - verbose "Skipping call-signal-resume.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} + +# Some targets can't do function calls, so don't even bother with this +# test. +require {!target_info exists gdb,cannot_call_functions} standard_testfile call-signals.c @@ -33,13 +34,6 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb return -1 } -# Some targets can't do function calls, so don't even bother with this -# test. -if [target_info exists gdb,cannot_call_functions] { - unsupported "this target can not call functions" - return -} - proc get_dummy_frame_number { } { global gdb_prompt diff --git a/gdb/testsuite/gdb.base/call-strs.exp b/gdb/testsuite/gdb.base/call-strs.exp index 90fe1763db8..f1577cb44df 100644 --- a/gdb/testsuite/gdb.base/call-strs.exp +++ b/gdb/testsuite/gdb.base/call-strs.exp @@ -27,10 +27,7 @@ standard_testfile # Some targets can't call functions, so don't even bother with this # test. -if [target_info exists gdb,cannot_call_functions] { - unsupported "this target can not call functions" - return -} +require {!target_info exists gdb,cannot_call_functions} if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { diff --git a/gdb/testsuite/gdb.base/callexit.exp b/gdb/testsuite/gdb.base/callexit.exp index 4ed68936ae4..a6849796686 100644 --- a/gdb/testsuite/gdb.base/callexit.exp +++ b/gdb/testsuite/gdb.base/callexit.exp @@ -23,10 +23,7 @@ if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {deb # Some targets can't do function calls, so don't even bother with this # test. -if [target_info exists gdb,cannot_call_functions] { - unsupported "this target can not call functions" - return -} +require {!target_info exists gdb,cannot_call_functions} # Start with a fresh gdb. diff --git a/gdb/testsuite/gdb.base/callfuncs.exp b/gdb/testsuite/gdb.base/callfuncs.exp index 9bbf108ac0e..2c797a224a7 100644 --- a/gdb/testsuite/gdb.base/callfuncs.exp +++ b/gdb/testsuite/gdb.base/callfuncs.exp @@ -27,10 +27,7 @@ if [support_complex_tests] { # Some targets can't do function calls, so don't even bother with this # test. -if [target_info exists gdb,cannot_call_functions] { - unsupported "this target can not call functions" - return -} +require {!target_info exists gdb,cannot_call_functions} set allow_float_test [allow_float_test] diff --git a/gdb/testsuite/gdb.base/cast-call.exp b/gdb/testsuite/gdb.base/cast-call.exp index d80524f35a7..7e55cd33c45 100644 --- a/gdb/testsuite/gdb.base/cast-call.exp +++ b/gdb/testsuite/gdb.base/cast-call.exp @@ -16,10 +16,7 @@ # along with this program. If not, see . -if {[target_info exists gdb,cannot_call_functions]} { - unsupported "this target can not call functions" - return -} +require {!target_info exists gdb,cannot_call_functions} standard_testfile .c diff --git a/gdb/testsuite/gdb.base/catch-gdb-caused-signals.exp b/gdb/testsuite/gdb.base/catch-gdb-caused-signals.exp index 580221c8551..9908c1af539 100644 --- a/gdb/testsuite/gdb.base/catch-gdb-caused-signals.exp +++ b/gdb/testsuite/gdb.base/catch-gdb-caused-signals.exp @@ -23,10 +23,7 @@ standard_testfile # Some targets can't call functions, so don't even bother with this # test. -if [target_info exists gdb,cannot_call_functions] { - unsupported "cannot call functions" - return -} +require {!target_info exists gdb,cannot_call_functions} set dp_location [gdb_get_line_number "set dprintf here"] set bp_location [gdb_get_line_number "set breakpoint here"] diff --git a/gdb/testsuite/gdb.base/catch-signal-fork.exp b/gdb/testsuite/gdb.base/catch-signal-fork.exp index 3dac304a407..fce5b65c701 100644 --- a/gdb/testsuite/gdb.base/catch-signal-fork.exp +++ b/gdb/testsuite/gdb.base/catch-signal-fork.exp @@ -13,10 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if [target_info exists gdb,nosignals] { - verbose "Skipping catch-signal-fork.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} standard_testfile diff --git a/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp b/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp index 182b2f25faa..7a9452f2d55 100644 --- a/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp +++ b/gdb/testsuite/gdb.base/catch-signal-siginfo-cond.exp @@ -25,10 +25,7 @@ # 56 return INLINE_SYSCALL (tgkill, 3, pid, selftid, sig); # (gdb) FAIL: gdb.base/catch-signal-siginfo-cond.exp: continue -if [target_info exists gdb,nosignals] { - verbose "Skipping catch-signal-siginfo-cond.exp because of nosignals." - return -1 -} +require {!target_info exists gdb,nosignals} require supports_get_siginfo_type diff --git a/gdb/testsuite/gdb.base/catch-signal.exp b/gdb/testsuite/gdb.base/catch-signal.exp index 774eb8ee856..b3f202f951d 100644 --- a/gdb/testsuite/gdb.base/catch-signal.exp +++ b/gdb/testsuite/gdb.base/catch-signal.exp @@ -13,10 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if [target_info exists gdb,nosignals] { - verbose "Skipping catch-signal.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} standard_testfile diff --git a/gdb/testsuite/gdb.base/exitsignal.exp b/gdb/testsuite/gdb.base/exitsignal.exp index d38e9ff7a05..24e4aa1f3ae 100644 --- a/gdb/testsuite/gdb.base/exitsignal.exp +++ b/gdb/testsuite/gdb.base/exitsignal.exp @@ -21,10 +21,7 @@ # killed by a signal. However, if it was killed by an uncaught # signal, then there is no way for it to have exited. -if { [target_info exists gdb,nosignals] } { - verbose "Skipping exitsignal.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} standard_testfile segv.c diff --git a/gdb/testsuite/gdb.base/fileio.exp b/gdb/testsuite/gdb.base/fileio.exp index 09ca29eebee..33c88d064c4 100644 --- a/gdb/testsuite/gdb.base/fileio.exp +++ b/gdb/testsuite/gdb.base/fileio.exp @@ -15,10 +15,7 @@ # This file was written by Corinna Vinschen -if [target_info exists gdb,nofileio] { - verbose "Skipping fileio.exp because of no fileio capabilities." - return -} +require {!target_info exists gdb,nofileio} standard_testfile diff --git a/gdb/testsuite/gdb.base/huge.exp b/gdb/testsuite/gdb.base/huge.exp index d1dac02770b..e28310c6eef 100644 --- a/gdb/testsuite/gdb.base/huge.exp +++ b/gdb/testsuite/gdb.base/huge.exp @@ -19,9 +19,7 @@ # Define if you want to skip this test # (could be very time-consuming on remote targets with slow connection). # -if [target_info exists gdb,skip_huge_test] { - return -} +require {!target_info exists gdb,skip_huge_test} standard_testfile .c diff --git a/gdb/testsuite/gdb.base/infcall-input.exp b/gdb/testsuite/gdb.base/infcall-input.exp index 1de3bc9f07d..2e276b65e97 100644 --- a/gdb/testsuite/gdb.base/infcall-input.exp +++ b/gdb/testsuite/gdb.base/infcall-input.exp @@ -18,10 +18,7 @@ standard_testfile -if [target_info exists gdb,cannot_call_functions] { - unsupported "can not call functions" - return -} +require {!target_info exists gdb,cannot_call_functions} if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { return -1 diff --git a/gdb/testsuite/gdb.base/inferior-args.exp b/gdb/testsuite/gdb.base/inferior-args.exp index 3d381739338..19bada6d2c7 100644 --- a/gdb/testsuite/gdb.base/inferior-args.exp +++ b/gdb/testsuite/gdb.base/inferior-args.exp @@ -16,10 +16,7 @@ # Test running an inferior with arguments. # This does not work on boards that don't support inferior arguments. -if {[target_info exists noargs]} { - verbose "skipping gdb.base/inferior-args.exp because of noargs" - return -} +require {!target_info exists noargs} standard_testfile .c diff --git a/gdb/testsuite/gdb.base/interrupt-daemon-attach.exp b/gdb/testsuite/gdb.base/interrupt-daemon-attach.exp index 0448de1de77..ba3383f3acf 100644 --- a/gdb/testsuite/gdb.base/interrupt-daemon-attach.exp +++ b/gdb/testsuite/gdb.base/interrupt-daemon-attach.exp @@ -13,16 +13,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . */ -if [target_info exists gdb,nosignals] { - verbose "Skipping interrupt-daemon-attach.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} # This test requires sending ^C to interrupt the running target. -if [target_info exists gdb,nointerrupts] { - verbose "Skipping interrupt-daemon-attach.exp because of nointerrupts." - return -} +require {!target_info exists gdb,nointerrupts} require can_spawn_for_attach diff --git a/gdb/testsuite/gdb.base/interrupt.exp b/gdb/testsuite/gdb.base/interrupt.exp index 815994287d4..19628e2f419 100644 --- a/gdb/testsuite/gdb.base/interrupt.exp +++ b/gdb/testsuite/gdb.base/interrupt.exp @@ -13,15 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if [target_info exists gdb,nointerrupts] { - verbose "Skipping interrupt.exp because of nointerrupts." - return -} +require {!target_info exists gdb,nointerrupts} -if [target_info exists gdb,noinferiorio] { - verbose "Skipping interrupt.exp because of noinferiorio." - return -} +require {!target_info exists gdb,noinferiorio} standard_testfile diff --git a/gdb/testsuite/gdb.base/kill-after-signal.exp b/gdb/testsuite/gdb.base/kill-after-signal.exp index 1372c9670ee..5ca84a9e436 100644 --- a/gdb/testsuite/gdb.base/kill-after-signal.exp +++ b/gdb/testsuite/gdb.base/kill-after-signal.exp @@ -17,10 +17,7 @@ standard_testfile .c require can_single_step_to_signal_handler -if [target_info exists gdb,nosignals] { - verbose "Skipping kill-after-signal.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} if [prepare_for_testing "failed to prepare" ${testfile}] { return -1 diff --git a/gdb/testsuite/gdb.base/long-inferior-output.exp b/gdb/testsuite/gdb.base/long-inferior-output.exp index 58fd715a5c5..a287fdcdb47 100644 --- a/gdb/testsuite/gdb.base/long-inferior-output.exp +++ b/gdb/testsuite/gdb.base/long-inferior-output.exp @@ -28,10 +28,7 @@ # # 4. The breakpoint is never reached. -if [target_info exists gdb,noinferiorio] { - verbose "Skipping because of noinferiorio." - return -} +require {!target_info exists gdb,noinferiorio} standard_testfile diff --git a/gdb/testsuite/gdb.base/long_long.exp b/gdb/testsuite/gdb.base/long_long.exp index 357f7cc8063..359148320aa 100644 --- a/gdb/testsuite/gdb.base/long_long.exp +++ b/gdb/testsuite/gdb.base/long_long.exp @@ -18,9 +18,7 @@ # long_long.exp Test printing of 64-bit things in 32-bit gdb. # Also test differnet kinds of formats. # -if [target_info exists no_long_long] { - return 0 -} +require {!target_info exists no_long_long} standard_testfile .c diff --git a/gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp b/gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp index 05f89e43298..f1296080b73 100644 --- a/gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp +++ b/gdb/testsuite/gdb.base/paginate-after-ctrl-c-running.exp @@ -13,10 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if [target_info exists gdb,nointerrupts] { - verbose "Skipping paginate-after-ctrl-c-running.exp because of nointerrupts." - return -} +require {!target_info exists gdb,nointerrupts} standard_testfile diff --git a/gdb/testsuite/gdb.base/random-signal.exp b/gdb/testsuite/gdb.base/random-signal.exp index b08a1c5feb9..7e53c91eca3 100644 --- a/gdb/testsuite/gdb.base/random-signal.exp +++ b/gdb/testsuite/gdb.base/random-signal.exp @@ -13,16 +13,10 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if [target_info exists gdb,nosignals] { - verbose "Skipping catch-signal.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} # This test requires sending ^C to interrupt the running target. -if [target_info exists gdb,nointerrupts] { - verbose "Skipping random-signal.exp because of nointerrupts." - return -} +require {!target_info exists gdb,nointerrupts} standard_testfile diff --git a/gdb/testsuite/gdb.base/relativedebug.exp b/gdb/testsuite/gdb.base/relativedebug.exp index 004d3d98911..41eb0ccc111 100644 --- a/gdb/testsuite/gdb.base/relativedebug.exp +++ b/gdb/testsuite/gdb.base/relativedebug.exp @@ -13,10 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if [target_info exists gdb,nosignals] { - verbose "Skipping relativedebug.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} standard_testfile .c diff --git a/gdb/testsuite/gdb.base/savedregs.exp b/gdb/testsuite/gdb.base/savedregs.exp index 598d51b2c47..212fa61d0c2 100644 --- a/gdb/testsuite/gdb.base/savedregs.exp +++ b/gdb/testsuite/gdb.base/savedregs.exp @@ -24,10 +24,7 @@ # instructions executed to perform the call may affect "info frame" # output. -if [target_info exists gdb,nosignals] { - verbose "Skipping savedregs.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} standard_testfile .c diff --git a/gdb/testsuite/gdb.base/sigall.exp b/gdb/testsuite/gdb.base/sigall.exp index 7f78d24e1ec..5b623210d62 100644 --- a/gdb/testsuite/gdb.base/sigall.exp +++ b/gdb/testsuite/gdb.base/sigall.exp @@ -13,10 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if [target_info exists gdb,nosignals] { - verbose "Skipping sigall.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} standard_testfile diff --git a/gdb/testsuite/gdb.base/sigaltstack.exp b/gdb/testsuite/gdb.base/sigaltstack.exp index 6acc4dad70d..3f1348a9bf7 100644 --- a/gdb/testsuite/gdb.base/sigaltstack.exp +++ b/gdb/testsuite/gdb.base/sigaltstack.exp @@ -22,10 +22,7 @@ # This test confirms that GDB can both backtrace through and finish # such a stack. -if [target_info exists gdb,nosignals] { - verbose "Skipping sigaltstack.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} standard_testfile .c diff --git a/gdb/testsuite/gdb.base/sigbpt.exp b/gdb/testsuite/gdb.base/sigbpt.exp index e5dace1b0fd..892d756e467 100644 --- a/gdb/testsuite/gdb.base/sigbpt.exp +++ b/gdb/testsuite/gdb.base/sigbpt.exp @@ -28,10 +28,7 @@ # instruction. Since the kernel problems can be "fixed" using # software single-step this is KFAILed rather than XFAILed. -if [target_info exists gdb,nosignals] { - verbose "Skipping sigbpt.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} standard_testfile diff --git a/gdb/testsuite/gdb.base/sigchld.exp b/gdb/testsuite/gdb.base/sigchld.exp index 2374e1e59bf..532e22e0c1c 100644 --- a/gdb/testsuite/gdb.base/sigchld.exp +++ b/gdb/testsuite/gdb.base/sigchld.exp @@ -16,10 +16,7 @@ # Check that GDB isn't messing the SIGCHLD mask while creating an # inferior. -if [target_info exists gdb,nosignals] { - verbose "Skipping sigchld.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} standard_testfile .c diff --git a/gdb/testsuite/gdb.base/siginfo-addr.exp b/gdb/testsuite/gdb.base/siginfo-addr.exp index b11b4611d87..a2359fd1572 100644 --- a/gdb/testsuite/gdb.base/siginfo-addr.exp +++ b/gdb/testsuite/gdb.base/siginfo-addr.exp @@ -21,10 +21,7 @@ # This test confirms that the si_addr value is correct rather than # having been corrupted when GDB passed the signal on to the handler. -if [target_info exists gdb,nosignals] { - verbose "Skipping siginfo-addr.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} standard_testfile if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { diff --git a/gdb/testsuite/gdb.base/siginfo-infcall.exp b/gdb/testsuite/gdb.base/siginfo-infcall.exp index fdc7e01dc3e..efc83b01984 100644 --- a/gdb/testsuite/gdb.base/siginfo-infcall.exp +++ b/gdb/testsuite/gdb.base/siginfo-infcall.exp @@ -13,10 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if [target_info exists gdb,nosignals] { - verbose "Skipping siginfo-infcall.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} standard_testfile .c diff --git a/gdb/testsuite/gdb.base/siginfo-obj.exp b/gdb/testsuite/gdb.base/siginfo-obj.exp index 9d8bfe75731..634d9263320 100644 --- a/gdb/testsuite/gdb.base/siginfo-obj.exp +++ b/gdb/testsuite/gdb.base/siginfo-obj.exp @@ -21,10 +21,7 @@ # This test confirms that we can inspect signal info using the # $_siginfo convenience variable. -if [target_info exists gdb,nosignals] { - verbose "Skipping siginfo-obj.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} require supports_get_siginfo_type diff --git a/gdb/testsuite/gdb.base/siginfo-thread.exp b/gdb/testsuite/gdb.base/siginfo-thread.exp index 718889fcc47..122be719c4b 100644 --- a/gdb/testsuite/gdb.base/siginfo-thread.exp +++ b/gdb/testsuite/gdb.base/siginfo-thread.exp @@ -16,10 +16,7 @@ # Multi-threaded siginfo test. -if [target_info exists gdb,nosignals] { - verbose "Skipping siginfo-thread.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} require supports_get_siginfo_type diff --git a/gdb/testsuite/gdb.base/siginfo.exp b/gdb/testsuite/gdb.base/siginfo.exp index 1a6ad9b9ae3..4083120990c 100644 --- a/gdb/testsuite/gdb.base/siginfo.exp +++ b/gdb/testsuite/gdb.base/siginfo.exp @@ -23,10 +23,7 @@ # alternative sa_sigaction signal handler, and second that GDB can # nexti/stepi out of such a handler. -if [target_info exists gdb,nosignals] { - verbose "Skipping siginfo.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} standard_testfile diff --git a/gdb/testsuite/gdb.base/signals.exp b/gdb/testsuite/gdb.base/signals.exp index 6c41739348f..338cf4b298c 100644 --- a/gdb/testsuite/gdb.base/signals.exp +++ b/gdb/testsuite/gdb.base/signals.exp @@ -13,10 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if [target_info exists gdb,nosignals] { - verbose "Skipping signals.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} standard_testfile .c diff --git a/gdb/testsuite/gdb.base/signest.exp b/gdb/testsuite/gdb.base/signest.exp index 1785f89a70c..65c87c3fbb1 100644 --- a/gdb/testsuite/gdb.base/signest.exp +++ b/gdb/testsuite/gdb.base/signest.exp @@ -17,10 +17,7 @@ standard_testfile -if [target_info exists gdb,nosignals] { - verbose "Skipping ${testfile}.exp because of nosignals." - return -1 -} +require {!target_info exists gdb,nosignals} if [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {debug}] { return -1 diff --git a/gdb/testsuite/gdb.base/signull.exp b/gdb/testsuite/gdb.base/signull.exp index a7cda03c315..9facc6d8a66 100644 --- a/gdb/testsuite/gdb.base/signull.exp +++ b/gdb/testsuite/gdb.base/signull.exp @@ -27,10 +27,7 @@ # This also tests backtrace/gdb1476. -if [target_info exists gdb,nosignals] { - verbose "Skipping signull.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} standard_testfile .c diff --git a/gdb/testsuite/gdb.base/sigrepeat.exp b/gdb/testsuite/gdb.base/sigrepeat.exp index 26d2dee6c4f..8726f85deb8 100644 --- a/gdb/testsuite/gdb.base/sigrepeat.exp +++ b/gdb/testsuite/gdb.base/sigrepeat.exp @@ -19,10 +19,7 @@ # sigalrm signals and hence cause repeated signal delivery without any # cpu advancment. -if [target_info exists gdb,nosignals] { - verbose "Skipping sigrepeat.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} standard_testfile .c diff --git a/gdb/testsuite/gdb.base/sigstep.exp b/gdb/testsuite/gdb.base/sigstep.exp index 54cdfda5f29..51737f58760 100644 --- a/gdb/testsuite/gdb.base/sigstep.exp +++ b/gdb/testsuite/gdb.base/sigstep.exp @@ -21,10 +21,7 @@ # This test runs the program up to the signal handler, and then # attempts to step/next out of the handler and back into main. -if [target_info exists gdb,nosignals] { - verbose "Skipping sigstep.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} standard_testfile diff --git a/gdb/testsuite/gdb.base/sigwinch-notty.exp b/gdb/testsuite/gdb.base/sigwinch-notty.exp index 99fb1c9a99e..a5a633fd35e 100644 --- a/gdb/testsuite/gdb.base/sigwinch-notty.exp +++ b/gdb/testsuite/gdb.base/sigwinch-notty.exp @@ -17,10 +17,7 @@ # without readline, and, it receives a SIGWINCH. Regression test for # PR gdb/26056. -if [target_info exists gdb,nosignals] { - verbose "Skipping $subdir/$gdb_test_file_name.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} # The testfile relies on "run" from the command line, so only works # with "target native". diff --git a/gdb/testsuite/gdb.base/structs.exp b/gdb/testsuite/gdb.base/structs.exp index 0a1920501c4..abfaabc3ed5 100644 --- a/gdb/testsuite/gdb.base/structs.exp +++ b/gdb/testsuite/gdb.base/structs.exp @@ -19,10 +19,7 @@ # Some targets can't call functions, so don't even bother with this # test. -if [target_info exists gdb,cannot_call_functions] { - unsupported "this target can not call functions" - return -} +require {!target_info exists gdb,cannot_call_functions} standard_testfile .c diff --git a/gdb/testsuite/gdb.base/unwindonsignal.exp b/gdb/testsuite/gdb.base/unwindonsignal.exp index d10d1fe244d..625b0c4db12 100644 --- a/gdb/testsuite/gdb.base/unwindonsignal.exp +++ b/gdb/testsuite/gdb.base/unwindonsignal.exp @@ -13,18 +13,12 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if [target_info exists gdb,nosignals] { - verbose "Skipping unwindonsignal.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} # Some targets can't do function calls, so don't even bother with this # test. -if [target_info exists gdb,cannot_call_functions] { - unsupported "this target can not call functions" - return -} +require {!target_info exists gdb,cannot_call_functions} standard_testfile diff --git a/gdb/testsuite/gdb.base/watch-cond-infcall.exp b/gdb/testsuite/gdb.base/watch-cond-infcall.exp index c8f5d584fc7..7daa2b76164 100644 --- a/gdb/testsuite/gdb.base/watch-cond-infcall.exp +++ b/gdb/testsuite/gdb.base/watch-cond-infcall.exp @@ -26,10 +26,7 @@ set allow_hw_watchpoint_tests_p [allow_hw_watchpoint_tests] standard_testfile -if [target_info exists gdb,cannot_call_functions] { - unsupported "can not call functions" - return -} +require {!target_info exists gdb,cannot_call_functions} if { [build_executable ${testfile}.exp ${testfile} ${testfile}.c {debug}] } { untested "failed to compile" diff --git a/gdb/testsuite/gdb.cp/gdb2495.exp b/gdb/testsuite/gdb.cp/gdb2495.exp index 0cb8bdd0ada..e3c0cca3175 100644 --- a/gdb/testsuite/gdb.cp/gdb2495.exp +++ b/gdb/testsuite/gdb.cp/gdb2495.exp @@ -33,19 +33,13 @@ require allow_cplus_tests -if [target_info exists gdb,nosignals] { - verbose "Skipping gdb2495.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} standard_testfile .cc # Some targets can't do function calls, so don't even bother with this # test. -if [target_info exists gdb,cannot_call_functions] { - unsupported "this target can not call functions" - return -} +require {!target_info exists gdb,cannot_call_functions} if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} { return -1 diff --git a/gdb/testsuite/gdb.fortran/array-slices.exp b/gdb/testsuite/gdb.fortran/array-slices.exp index 56bed15e965..ce17b8dc268 100644 --- a/gdb/testsuite/gdb.fortran/array-slices.exp +++ b/gdb/testsuite/gdb.fortran/array-slices.exp @@ -36,9 +36,7 @@ require allow_fortran_tests # This test relies on output from the inferior. -if [target_info exists gdb,noinferiorio] { - return -1 -} +require {!target_info exists gdb,noinferiorio} standard_testfile ".f90" load_lib fortran.exp diff --git a/gdb/testsuite/gdb.fortran/lbound-ubound.exp b/gdb/testsuite/gdb.fortran/lbound-ubound.exp index bb652a9223c..fced41f9fe3 100644 --- a/gdb/testsuite/gdb.fortran/lbound-ubound.exp +++ b/gdb/testsuite/gdb.fortran/lbound-ubound.exp @@ -17,6 +17,9 @@ require allow_fortran_tests +# This test relies on output from the inferior. +require {!target_info exists gdb,noinferiorio} + standard_testfile ".F90" load_lib fortran.exp @@ -32,11 +35,6 @@ if ![fortran_runto_main] { return -1 } -# This test relies on output from the inferior. -if [target_info exists gdb,noinferiorio] { - return 0 -} - # Avoid libc symbols, in particular the 'array' type. gdb_test_no_output "nosharedlibrary" diff --git a/gdb/testsuite/gdb.gdb/python-helper.exp b/gdb/testsuite/gdb.gdb/python-helper.exp index f1e95fbe5ee..7d75430fce5 100644 --- a/gdb/testsuite/gdb.gdb/python-helper.exp +++ b/gdb/testsuite/gdb.gdb/python-helper.exp @@ -19,10 +19,7 @@ load_lib selftest-support.exp -if [target_info exists gdb,noinferiorio] { - verbose "Skipping because of no inferiorio capabilities." - return -} +require {!target_info exists gdb,noinferiorio} require allow_python_tests diff --git a/gdb/testsuite/gdb.mi/mi-syn-frame.exp b/gdb/testsuite/gdb.mi/mi-syn-frame.exp index 5b3e60f4f34..40df312a1cc 100644 --- a/gdb/testsuite/gdb.mi/mi-syn-frame.exp +++ b/gdb/testsuite/gdb.mi/mi-syn-frame.exp @@ -16,10 +16,7 @@ # Test MI output with synthetic frames on the stack (call dummies, # signal handlers). -if [target_info exists gdb,nosignals] { - verbose "Skipping mi-syn-frame.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} load_lib mi-support.exp set MIFLAGS "-i=mi" diff --git a/gdb/testsuite/gdb.mi/mi-threads-interrupt.exp b/gdb/testsuite/gdb.mi/mi-threads-interrupt.exp index 149940d6743..bbb82195fb7 100644 --- a/gdb/testsuite/gdb.mi/mi-threads-interrupt.exp +++ b/gdb/testsuite/gdb.mi/mi-threads-interrupt.exp @@ -13,10 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if [target_info exists gdb,nointerrupts] { - verbose "Skipping mi-threads-interrupt.exp because of nointerrupts." - return -} +require {!target_info exists gdb,nointerrupts} load_lib mi-support.exp set MIFLAGS "-i=mi" diff --git a/gdb/testsuite/gdb.reverse/sigall-precsave.exp b/gdb/testsuite/gdb.reverse/sigall-precsave.exp index e2a786a7b9b..7bbffa18219 100644 --- a/gdb/testsuite/gdb.reverse/sigall-precsave.exp +++ b/gdb/testsuite/gdb.reverse/sigall-precsave.exp @@ -13,10 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if [target_info exists gdb,nosignals] { - verbose "Skipping sigall-precsave.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} require supports_reverse diff --git a/gdb/testsuite/gdb.reverse/sigall-reverse.exp b/gdb/testsuite/gdb.reverse/sigall-reverse.exp index 7891dca92a9..ffbcac7bb5f 100644 --- a/gdb/testsuite/gdb.reverse/sigall-reverse.exp +++ b/gdb/testsuite/gdb.reverse/sigall-reverse.exp @@ -13,10 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if [target_info exists gdb,nosignals] { - verbose "Skipping sigall-reverse.exp because of nosignals." - return -} +require {!target_info exists gdb,nosignals} require supports_reverse diff --git a/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp b/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp index c8ef81443e5..5dada8348d7 100644 --- a/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp +++ b/gdb/testsuite/gdb.server/reconnect-ctrl-c.exp @@ -21,10 +21,7 @@ load_lib gdbserver-support.exp require allow_gdbserver_tests -if [target_info exists gdb,nointerrupts] { - verbose "Skipping reconnect-ctrl-c.exp because of nointerrupts." - return -} +require {!target_info exists gdb,nointerrupts} standard_testfile diff --git a/gdb/testsuite/gdb.threads/continue-pending-status.exp b/gdb/testsuite/gdb.threads/continue-pending-status.exp index 6132a0f9903..8cf65e4993d 100644 --- a/gdb/testsuite/gdb.threads/continue-pending-status.exp +++ b/gdb/testsuite/gdb.threads/continue-pending-status.exp @@ -17,10 +17,7 @@ # thread, then switching to a thread that has a status pending and # continuing. -if [target_info exists gdb,nointerrupts] { - verbose "Skipping continue-pending-status.exp because of nointerrupts." - return -} +require {!target_info exists gdb,nointerrupts} standard_testfile diff --git a/gdb/testsuite/gdb.threads/hand-call-in-threads.exp b/gdb/testsuite/gdb.threads/hand-call-in-threads.exp index 336199112b0..58039ddd30e 100644 --- a/gdb/testsuite/gdb.threads/hand-call-in-threads.exp +++ b/gdb/testsuite/gdb.threads/hand-call-in-threads.exp @@ -19,15 +19,12 @@ set NR_THREADS 4 standard_testfile -if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } { - return -1 -} - # Some targets can't do function calls, so don't even bother with this # test. -if [target_info exists gdb,cannot_call_functions] { - unsupported "this target can not call functions" - return +require {!target_info exists gdb,cannot_call_functions} + +if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } { + return -1 } proc get_dummy_frame_number { } { diff --git a/gdb/testsuite/gdb.threads/interrupted-hand-call.exp b/gdb/testsuite/gdb.threads/interrupted-hand-call.exp index ed1ea9fe64d..0edc645fe66 100644 --- a/gdb/testsuite/gdb.threads/interrupted-hand-call.exp +++ b/gdb/testsuite/gdb.threads/interrupted-hand-call.exp @@ -20,15 +20,12 @@ set NR_THREADS 4 standard_testfile -if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } { - return -1 -} - # Some targets can't do function calls, so don't even bother with this # test. -if [target_info exists gdb,cannot_call_functions] { - unsupported "this target can not call functions" - return +require {!target_info exists gdb,cannot_call_functions} + +if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } { + return -1 } clean_restart ${binfile} diff --git a/gdb/testsuite/gdb.threads/leader-exit.exp b/gdb/testsuite/gdb.threads/leader-exit.exp index df392c7b635..95811e975aa 100644 --- a/gdb/testsuite/gdb.threads/leader-exit.exp +++ b/gdb/testsuite/gdb.threads/leader-exit.exp @@ -13,10 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if [target_info exists gdb,nointerrupts] { - verbose "Skipping leader-exit.exp because of nointerrupts." - return -} +require {!target_info exists gdb,nointerrupts} # Exit of the thread group leader should not break GDB. diff --git a/gdb/testsuite/gdb.threads/manythreads.exp b/gdb/testsuite/gdb.threads/manythreads.exp index da3f66a810b..5a176519051 100644 --- a/gdb/testsuite/gdb.threads/manythreads.exp +++ b/gdb/testsuite/gdb.threads/manythreads.exp @@ -17,10 +17,7 @@ # This file was written by Jeff Johnston. (jjohnstn@redhat.com) # This test requires sending ^C to interrupt the running target. -if [target_info exists gdb,nointerrupts] { - verbose "Skipping manythreads.exp because of nointerrupts." - return -} +require {!target_info exists gdb,nointerrupts} standard_testfile diff --git a/gdb/testsuite/gdb.threads/multiple-step-overs.exp b/gdb/testsuite/gdb.threads/multiple-step-overs.exp index fffdb7464d9..5e8b0251d97 100644 --- a/gdb/testsuite/gdb.threads/multiple-step-overs.exp +++ b/gdb/testsuite/gdb.threads/multiple-step-overs.exp @@ -19,10 +19,7 @@ standard_testfile set executable ${testfile} -if [target_info exists gdb,nosignals] { - verbose "Skipping ${testfile}.exp because of nosignals." - return -1 -} +require {!target_info exists gdb,nosignals} if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ executable [list debug "incdir=${objdir}"]] != "" } { diff --git a/gdb/testsuite/gdb.threads/names.exp b/gdb/testsuite/gdb.threads/names.exp index f90e4aa2f7b..5622e4e76c2 100644 --- a/gdb/testsuite/gdb.threads/names.exp +++ b/gdb/testsuite/gdb.threads/names.exp @@ -16,9 +16,7 @@ # Verify that thread name features work properly (e.g. they show up in info # threads). -if [target_info exists gdb,no_thread_names] { - return -} +require {!target_info exists gdb,no_thread_names} standard_testfile diff --git a/gdb/testsuite/gdb.threads/non-stop-fair-events.exp b/gdb/testsuite/gdb.threads/non-stop-fair-events.exp index 8ce5712f0c1..4b063f3e072 100644 --- a/gdb/testsuite/gdb.threads/non-stop-fair-events.exp +++ b/gdb/testsuite/gdb.threads/non-stop-fair-events.exp @@ -19,10 +19,7 @@ standard_testfile set executable ${testfile} -if [target_info exists gdb,nosignals] { - verbose "Skipping ${testfile}.exp because of nosignals." - return -1 -} +require {!target_info exists gdb,nosignals} set options { "additional_flags=-DTIMEOUT=$timeout" debug pthreads } if {[prepare_for_testing "failed to prepare" $testfile $srcfile $options] == -1} { diff --git a/gdb/testsuite/gdb.threads/pthreads.exp b/gdb/testsuite/gdb.threads/pthreads.exp index acd073cd5e9..41a7cb3800f 100644 --- a/gdb/testsuite/gdb.threads/pthreads.exp +++ b/gdb/testsuite/gdb.threads/pthreads.exp @@ -16,10 +16,7 @@ # This file was written by Fred Fish. (fnf@cygnus.com) # This test requires sending ^C to interrupt the running target. -if [target_info exists gdb,nointerrupts] { - verbose "Skipping pthreads.exp because of nointerrupts." - return -} +require {!target_info exists gdb,nointerrupts} standard_testfile diff --git a/gdb/testsuite/gdb.threads/schedlock.exp b/gdb/testsuite/gdb.threads/schedlock.exp index 08435015f14..3c60f6b3478 100644 --- a/gdb/testsuite/gdb.threads/schedlock.exp +++ b/gdb/testsuite/gdb.threads/schedlock.exp @@ -20,10 +20,7 @@ # This test requires sending ^C to interrupt the running target. -if [target_info exists gdb,nointerrupts] { - verbose "Skipping schedlock.exp because of nointerrupts." - return -} +require {!target_info exists gdb,nointerrupts} standard_testfile diff --git a/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp b/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp index ed03e7ae77a..a099dbbb974 100644 --- a/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp +++ b/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp @@ -20,10 +20,7 @@ standard_testfile -if [target_info exists gdb,nosignals] { - verbose "Skipping ${testfile}.exp because of nosignals." - return -1 -} +require {!target_info exists gdb,nosignals} if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ executable { debug }] != "" } { 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 ac391ea77fd..0802e403b5d 100644 --- a/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp +++ b/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp @@ -18,10 +18,7 @@ standard_testfile -if [target_info exists gdb,nosignals] { - verbose "Skipping ${testfile}.exp because of nosignals." - return -1 -} +require {!target_info exists gdb,nosignals} if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ executable { debug }] != "" } { diff --git a/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp b/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp index fb4cbb0ec57..3407cfa0645 100644 --- a/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp +++ b/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp @@ -15,10 +15,7 @@ standard_testfile -if [target_info exists gdb,nosignals] { - verbose "Skipping ${testfile}.exp because of nosignals." - return -1 -} +require {!target_info exists gdb,nosignals} if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ executable { debug }] != "" } { diff --git a/gdb/testsuite/gdb.threads/signal-sigtrap.exp b/gdb/testsuite/gdb.threads/signal-sigtrap.exp index b452731f277..1f524511ee9 100644 --- a/gdb/testsuite/gdb.threads/signal-sigtrap.exp +++ b/gdb/testsuite/gdb.threads/signal-sigtrap.exp @@ -18,10 +18,7 @@ standard_testfile -if [target_info exists gdb,nosignals] { - verbose "Skipping ${testfile}.exp because of nosignals." - return -1 -} +require {!target_info exists gdb,nosignals} if {[build_executable "failed to prepare" $testfile $srcfile \ {debug pthreads}]} { diff --git a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp index 65ecdcd5e33..7eba5bb7dca 100644 --- a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp +++ b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp @@ -25,10 +25,7 @@ require !gdb_debug_enabled standard_testfile set executable ${testfile} -if [target_info exists gdb,nosignals] { - verbose "Skipping ${testfile}.exp because of nosignals." - return -1 -} +require {!target_info exists gdb,nosignals} if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ executable [list debug "incdir=${objdir}"]] != "" } { diff --git a/gdb/testsuite/gdb.threads/sigthread.exp b/gdb/testsuite/gdb.threads/sigthread.exp index ce84357a6e5..5499c50e38f 100644 --- a/gdb/testsuite/gdb.threads/sigthread.exp +++ b/gdb/testsuite/gdb.threads/sigthread.exp @@ -16,6 +16,9 @@ standard_testfile +# This test requires sending ^C to interrupt the running target. +require {!target_info exists gdb,nointerrupts} + if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ executable { debug }] != "" } { return -1 @@ -36,12 +39,6 @@ gdb_test_multiple "continue" "continue" { } } -# This test requires sending ^C to interrupt the running target. -if [target_info exists gdb,nointerrupts] { - verbose "Skipping sigthread.exp because of nointerrupts." - return -} - # For this to work we must be sure to consume the "Continuing." # message first, or GDB's signal handler may not be in place. after 500 {send_gdb "\003"} diff --git a/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp b/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp index b3e3288ba69..68a99f66f1c 100644 --- a/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp +++ b/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp @@ -20,15 +20,12 @@ set NR_THREADS 4 standard_testfile interrupted-hand-call.c -if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } { - return -1 -} - # Some targets can't do function calls, so don't even bother with this # test. -if [target_info exists gdb,cannot_call_functions] { - unsupported "this target can not call functions" - return +require {!target_info exists gdb,cannot_call_functions} + +if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } { + return -1 } clean_restart ${binfile} diff --git a/gdb/testsuite/gdb.trace/signal.exp b/gdb/testsuite/gdb.trace/signal.exp index f64b7db2189..b02198e6247 100644 --- a/gdb/testsuite/gdb.trace/signal.exp +++ b/gdb/testsuite/gdb.trace/signal.exp @@ -28,10 +28,7 @@ load_lib "trace-support.exp" -if [target_info exists gdb,nosignals] { - verbose "Skipping signal.exp because of nosignals." - return -1 -} +require {!target_info exists gdb,nosignals} standard_testfile diff --git a/gdb/testsuite/gdb.tui/completion.exp b/gdb/testsuite/gdb.tui/completion.exp index 97d0f806a81..0a959b4ff8b 100644 --- a/gdb/testsuite/gdb.tui/completion.exp +++ b/gdb/testsuite/gdb.tui/completion.exp @@ -19,9 +19,7 @@ tuiterm_env clean_restart -if {[target_info exists gdb,nointerrupts]} { - return -} +require {!target_info exists gdb,nointerrupts} gdb_test_no_output "set max-completions unlimited" From patchwork Fri Feb 24 20:28:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 65623 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 CD13A384FB41 for ; Fri, 24 Feb 2023 20:29:10 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from gproxy2-pub.mail.unifiedlayer.com (gproxy2-pub.mail.unifiedlayer.com [69.89.18.3]) by sourceware.org (Postfix) with ESMTPS id 223B5385B50A for ; Fri, 24 Feb 2023 20:28:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 223B5385B50A Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com Received: from cmgw12.mail.unifiedlayer.com (unknown [10.0.90.127]) by progateway4.mail.pro1.eigbox.com (Postfix) with ESMTP id 730D810047E35 for ; Fri, 24 Feb 2023 20:28:35 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id VegFptIc21ikhVegFp2Ah4; Fri, 24 Feb 2023 20:28:35 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=De7SFthW c=1 sm=1 tr=0 ts=63f91df3 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10:nop_charset_1 a=m04uMKEZRckA:10:nop_rcvd_month_year a=Qbun_eYptAEA:10:endurance_base64_authed_username_1 a=TkTTPzHaAAAA:8 a=oQreJm1ZJsEwO1qtDOMA:9 a=QEXdDO2ut3YA:10:nop_charset_2 a=Qz3p68GZ3z-NqTySStDO:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=To:In-Reply-To:References:Message-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:Date:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=KF8i06kxjheQZ37UMbOM4h2lY+H6JyBh58Z65IDXN3w=; b=J3JH9ykg3I5ppwYZDgNXVnuBTz oBVQJflSyxOeX+CDFNVnimrWaBSTiM5a22zJ3agcMjP8nr4vjQWjtHNXEasP2VjrXAp229Aw0Brfd HecQCEZHAEZWCvTiNAAiBBrru; Received: from 75-166-130-93.hlrn.qwest.net ([75.166.130.93]:37332 helo=[192.168.0.21]) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pVegF-002w7s-AC for gdb-patches@sourceware.org; Fri, 24 Feb 2023 13:28:35 -0700 From: Tom Tromey Date: Fri, 24 Feb 2023 13:28:29 -0700 Subject: [PATCH 2/4] Use require with gdb_skip_stdio_test MIME-Version: 1.0 Message-Id: <20230224-submit-require-fixes-v1-2-7cbcbbf613c9@tromey.com> References: <20230224-submit-require-fixes-v1-0-7cbcbbf613c9@tromey.com> In-Reply-To: <20230224-submit-require-fixes-v1-0-7cbcbbf613c9@tromey.com> To: gdb-patches@sourceware.org X-Mailer: b4 0.12.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.130.93 X-Source-L: No X-Exim-ID: 1pVegF-002w7s-AC X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-130-93.hlrn.qwest.net ([192.168.0.21]) [75.166.130.93]:37332 X-Source-Auth: tom+tromey.com X-Email-Count: 5 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3026.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, 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: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" One use of gdb_skip_stdio_test can use 'require'. --- gdb/testsuite/gdb.base/a2-run.exp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.base/a2-run.exp b/gdb/testsuite/gdb.base/a2-run.exp index d5d4d9ef19e..08f6599c84a 100644 --- a/gdb/testsuite/gdb.base/a2-run.exp +++ b/gdb/testsuite/gdb.base/a2-run.exp @@ -16,9 +16,7 @@ # This file was written by Rob Savoye. (rob@cygnus.com) # Can't do this test without stdio support. -if [gdb_skip_stdio_test "a2run.exp"] { - return -} +require {!gdb_skip_stdio_test "a2run.exp"} # # test running programs From patchwork Fri Feb 24 20:28:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 65622 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 6D753385020B for ; Fri, 24 Feb 2023 20:28:55 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from gproxy2-pub.mail.unifiedlayer.com (gproxy2-pub.mail.unifiedlayer.com [69.89.18.3]) by sourceware.org (Postfix) with ESMTPS id 25A2C385B530 for ; Fri, 24 Feb 2023 20:28:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 25A2C385B530 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com Received: from cmgw14.mail.unifiedlayer.com (unknown [10.0.90.129]) by progateway4.mail.pro1.eigbox.com (Postfix) with ESMTP id 9822110047E3E for ; Fri, 24 Feb 2023 20:28:35 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id VegFplanBGvdIVegFppqkk; Fri, 24 Feb 2023 20:28:35 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=Sc4yytdu c=1 sm=1 tr=0 ts=63f91df3 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10:nop_charset_1 a=m04uMKEZRckA:10:nop_rcvd_month_year a=Qbun_eYptAEA:10:endurance_base64_authed_username_1 a=mDV3o1hIAAAA:8 a=Q-El3Mdcj1xe3tYHYHsA:9 a=QEXdDO2ut3YA:10:nop_charset_2 a=_FVE-zBwftR9WsbkzFJk:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=To:In-Reply-To:References:Message-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:Date:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=Nt3CtPm/fzQYjrYEWJP99qLoNS328lr9QMqGix/8ar0=; b=KcjQVKoggwjlg+Nyj4mTLqViss cBCYMGOon0MOfi4fVSCIeKEWVMN+mawf+YVqLmDs0FW71EVCi8wO6XvO/vl5PcpxBbW0sO/ACO1Cr h4LOo9UEVw3w0HvppT9TXR8XU; Received: from 75-166-130-93.hlrn.qwest.net ([75.166.130.93]:37332 helo=[192.168.0.21]) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pVegF-002w7s-EJ for gdb-patches@sourceware.org; Fri, 24 Feb 2023 13:28:35 -0700 From: Tom Tromey Date: Fri, 24 Feb 2023 13:28:30 -0700 Subject: [PATCH 3/4] More uses of require with istarget MIME-Version: 1.0 Message-Id: <20230224-submit-require-fixes-v1-3-7cbcbbf613c9@tromey.com> References: <20230224-submit-require-fixes-v1-0-7cbcbbf613c9@tromey.com> In-Reply-To: <20230224-submit-require-fixes-v1-0-7cbcbbf613c9@tromey.com> To: gdb-patches@sourceware.org X-Mailer: b4 0.12.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.130.93 X-Source-L: No X-Exim-ID: 1pVegF-002w7s-EJ X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-130-93.hlrn.qwest.net ([192.168.0.21]) [75.166.130.93]:37332 X-Source-Auth: tom+tromey.com X-Email-Count: 6 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3026.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, 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: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" I found a few more spots that check istarget that can be switched to use 'require'. --- gdb/testsuite/gdb.base/checkpoint.exp | 4 +--- gdb/testsuite/gdb.base/foll-exec-mode.exp | 4 +--- gdb/testsuite/gdb.base/foll-exec.exp | 4 +--- gdb/testsuite/gdb.base/inferior-died.exp | 5 +---- gdb/testsuite/gdb.base/jit-reader-exec.exp | 4 +--- gdb/testsuite/gdb.base/multi-forks.exp | 4 +--- gdb/testsuite/gdb.base/pie-execl.exp | 4 +--- gdb/testsuite/gdb.base/step-indirect-call-thunk.exp | 4 +--- gdb/testsuite/gdb.threads/check-libthread-db.exp | 3 ++- 9 files changed, 10 insertions(+), 26 deletions(-) diff --git a/gdb/testsuite/gdb.base/checkpoint.exp b/gdb/testsuite/gdb.base/checkpoint.exp index 189a240979f..a4ea94354b7 100644 --- a/gdb/testsuite/gdb.base/checkpoint.exp +++ b/gdb/testsuite/gdb.base/checkpoint.exp @@ -16,9 +16,7 @@ # Until "set follow-fork-mode" and "catch fork" are implemented on # other targets... # -if {![istarget "*-*-linux*"]} { - return -} +require {istarget "*-*-linux*"} # Checkpoint support is currently implemented in the Linux native # target, so only works with "target native". diff --git a/gdb/testsuite/gdb.base/foll-exec-mode.exp b/gdb/testsuite/gdb.base/foll-exec-mode.exp index 0846441eac7..cdfded5c111 100644 --- a/gdb/testsuite/gdb.base/foll-exec-mode.exp +++ b/gdb/testsuite/gdb.base/foll-exec-mode.exp @@ -35,9 +35,7 @@ if { [target_info exists gdb_protocol] # Until "catch exec" is implemented on other targets... # -if {![istarget "*-linux*"]} { - return -} +require {istarget "*-linux*"} standard_testfile foll-exec-mode.c diff --git a/gdb/testsuite/gdb.base/foll-exec.exp b/gdb/testsuite/gdb.base/foll-exec.exp index 0092fcceacc..8da3e5f6635 100644 --- a/gdb/testsuite/gdb.base/foll-exec.exp +++ b/gdb/testsuite/gdb.base/foll-exec.exp @@ -18,9 +18,7 @@ # Until "catch exec" is implemented on other targets... # -if {![istarget "*-linux*"]} { - return -} +require {istarget "*-linux*"} standard_testfile foll-exec.c diff --git a/gdb/testsuite/gdb.base/inferior-died.exp b/gdb/testsuite/gdb.base/inferior-died.exp index 4a72e8da98b..7717b2fd929 100644 --- a/gdb/testsuite/gdb.base/inferior-died.exp +++ b/gdb/testsuite/gdb.base/inferior-died.exp @@ -16,10 +16,7 @@ # Until "set follow-fork-mode" and "catch fork" are implemented on # other targets... # -if {![istarget "*-*-linux*"]} { - unsupported "inferior-died.exp" - return -} +require {istarget "*-*-linux*"} require support_displaced_stepping diff --git a/gdb/testsuite/gdb.base/jit-reader-exec.exp b/gdb/testsuite/gdb.base/jit-reader-exec.exp index d1009449fd0..ef28ba44f2d 100644 --- a/gdb/testsuite/gdb.base/jit-reader-exec.exp +++ b/gdb/testsuite/gdb.base/jit-reader-exec.exp @@ -17,9 +17,7 @@ # inferior that used the JIT API then exec'd a program that did not # use it. -if {![istarget "*-linux*"]} { - return -} +require {istarget "*-linux*"} standard_testfile jit-reader-exec.c diff --git a/gdb/testsuite/gdb.base/multi-forks.exp b/gdb/testsuite/gdb.base/multi-forks.exp index 542d36efec7..02dd327cad7 100644 --- a/gdb/testsuite/gdb.base/multi-forks.exp +++ b/gdb/testsuite/gdb.base/multi-forks.exp @@ -16,9 +16,7 @@ # Until "set follow-fork-mode" and "catch fork" are implemented on # other targets... # -if {![istarget "*-*-linux*"]} { - return -} +require {istarget "*-*-linux*"} standard_testfile .c diff --git a/gdb/testsuite/gdb.base/pie-execl.exp b/gdb/testsuite/gdb.base/pie-execl.exp index d47fd5160d0..156deefb222 100644 --- a/gdb/testsuite/gdb.base/pie-execl.exp +++ b/gdb/testsuite/gdb.base/pie-execl.exp @@ -19,9 +19,7 @@ global inferior_spawn_id global gdb_spawn_id -if ![istarget *-linux*] { - return -} +require {istarget *-linux*} # In remote mode we cannot use the 'set args' command, and this # test requires it. diff --git a/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp b/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp index 94da7e7ce97..b51257c20cc 100644 --- a/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp +++ b/gdb/testsuite/gdb.base/step-indirect-call-thunk.exp @@ -15,9 +15,7 @@ standard_testfile -if { ![istarget "x86*"] } { - return -} +require {istarget "x86*"} set cflags "-mindirect-branch=thunk -mfunction-return=thunk" diff --git a/gdb/testsuite/gdb.threads/check-libthread-db.exp b/gdb/testsuite/gdb.threads/check-libthread-db.exp index 2324b7f27e6..051c2322eca 100644 --- a/gdb/testsuite/gdb.threads/check-libthread-db.exp +++ b/gdb/testsuite/gdb.threads/check-libthread-db.exp @@ -14,9 +14,10 @@ # along with this program. If not, see . # This test only works for native processes on GNU/Linux. -if {[target_info gdb_protocol] != "" || ![istarget *-linux*]} { +if {[target_info gdb_protocol] != ""} { return } +require {istarget *-linux*} # Test relies on checking gdb debug output. Do not run if gdb debug is # enabled as any debug will be redirected to the log. From patchwork Fri Feb 24 20:28:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 65621 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 C09D83853567 for ; Fri, 24 Feb 2023 20:28:50 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from gproxy1-pub.mail.unifiedlayer.com (gproxy1-pub.mail.unifiedlayer.com [69.89.25.95]) by sourceware.org (Postfix) with ESMTPS id 4C575385B531 for ; Fri, 24 Feb 2023 20:28:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4C575385B531 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com Received: from cmgw15.mail.unifiedlayer.com (unknown [10.0.90.130]) by progateway3.mail.pro1.eigbox.com (Postfix) with ESMTP id BA01410047DC4 for ; Fri, 24 Feb 2023 20:28:35 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id VegFpN7pITQEGVegFpiN1i; Fri, 24 Feb 2023 20:28:35 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=N7Tsq0xB c=1 sm=1 tr=0 ts=63f91df3 a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=IkcTkHD0fZMA:10:nop_charset_1 a=m04uMKEZRckA:10:nop_rcvd_month_year a=Qbun_eYptAEA:10:endurance_base64_authed_username_1 a=Z4zfrFSCGaCwXDQ0yGMA:9 a=QEXdDO2ut3YA:10:nop_charset_2 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=To:In-Reply-To:References:Message-Id:Content-Transfer-Encoding: Content-Type:MIME-Version:Subject:Date:From:Sender:Reply-To:Cc:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=kYVUcTSEIq7Az+k9Q2b41ZtZwX0UN/WEZLD+/l+iU/I=; b=uoP6UIfK/J9NxdJIht8o1rl6+o gqJr5N458aVuwyxCAYifYqN85P2UbE/FJg4Z3fm95JlKLibaUxEl8+OM5sicn1WYtbBxV4AUyfSgC xBYl/a9g11kmjjvMsnBLnCVrX; Received: from 75-166-130-93.hlrn.qwest.net ([75.166.130.93]:37332 helo=[192.168.0.21]) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pVegF-002w7s-J5 for gdb-patches@sourceware.org; Fri, 24 Feb 2023 13:28:35 -0700 From: Tom Tromey Date: Fri, 24 Feb 2023 13:28:31 -0700 Subject: [PATCH 4/4] Use require with test_compiler_info MIME-Version: 1.0 Message-Id: <20230224-submit-require-fixes-v1-4-7cbcbbf613c9@tromey.com> References: <20230224-submit-require-fixes-v1-0-7cbcbbf613c9@tromey.com> In-Reply-To: <20230224-submit-require-fixes-v1-0-7cbcbbf613c9@tromey.com> To: gdb-patches@sourceware.org X-Mailer: b4 0.12.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 75.166.130.93 X-Source-L: No X-Exim-ID: 1pVegF-002w7s-J5 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 75-166-130-93.hlrn.qwest.net ([192.168.0.21]) [75.166.130.93]:37332 X-Source-Auth: tom+tromey.com X-Email-Count: 7 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3026.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, GIT_PATCH_0, JMQ_SPF_NEUTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, 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: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" One spot that checks test_compiler_info can be switched to use 'require'. --- gdb/testsuite/gdb.base/vla-struct-fields.exp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/gdb/testsuite/gdb.base/vla-struct-fields.exp b/gdb/testsuite/gdb.base/vla-struct-fields.exp index 18837303da1..62610e486ab 100644 --- a/gdb/testsuite/gdb.base/vla-struct-fields.exp +++ b/gdb/testsuite/gdb.base/vla-struct-fields.exp @@ -16,10 +16,7 @@ standard_testfile # Clang says it will never support variable length arrays in structures. -if {[test_compiler_info clang*]} { - unsupported "compiler does not support variable length arrays in structure" - return -} +require {!test_compiler_info clang*} if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { return -1