From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from outbound-ss-820.bluehost.com (outbound-ss-820.bluehost.com [69.89.24.241]) by sourceware.org (Postfix) with ESMTPS id F37B8382EF25 for ; Thu, 12 Jan 2023 03:01:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org F37B8382EF25 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 progateway2.mail.pro1.eigbox.com (Postfix) with ESMTP id 734161004BD94 for ; Thu, 12 Jan 2023 03:01:51 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id Fnqhpabn4xrINFnqhpESEZ; Thu, 12 Jan 2023 03:01:51 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=MrOXV0We c=1 sm=1 tr=0 ts=63bf781f a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=dLZJa+xiwSxG16/P+YVxDGlgEgI=:19 a=RvmDmJFTN0MA:10:nop_rcvd_month_year a=Qbun_eYptAEA:10:endurance_base64_authed_username_1 a=mDV3o1hIAAAA:8 a=l-O7yAZfnJsvwkyHz9AA:9 a=_FVE-zBwftR9WsbkzFJk:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: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=dEI1TG17HNW/dI0Rddk0EiSMVu89z86yfkTrbgUT4pA=; b=PcCvTaYhpYhVPG1hWW/OOFJROJ ln3iIPhb1v+QHDF/xtG36Jhygx+GR64y8AOwdgptmtKv4KFj8IIt16OIe356e1YY+bDmygO/tniU6 LCsweY7TjUsBl2g8kKpqY4Nuq; Received: from 97-122-76-186.hlrn.qwest.net ([97.122.76.186]:41092 helo=localhost.localdomain) by box5379.bluehost.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.95) (envelope-from ) id 1pFnqh-000mJw-77; Wed, 11 Jan 2023 20:01:51 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH v2 76/79] Rename to allow_hw_breakpoint_tests Date: Wed, 11 Jan 2023 20:00:49 -0700 Message-Id: <20230112030052.3306113-77-tom@tromey.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230112030052.3306113-1-tom@tromey.com> References: <20230112030052.3306113-1-tom@tromey.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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: 97.122.76.186 X-Source-L: No X-Exim-ID: 1pFnqh-000mJw-77 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-76-186.hlrn.qwest.net (localhost.localdomain) [97.122.76.186]:41092 X-Source-Auth: tom+tromey.com X-Email-Count: 77 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3028.0 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 List-Id: This changes skip_hw_breakpoint_tests to invert the sense, and renames it to allow_hw_breakpoint_tests. This also converts some tests to use "require" -- I missed this particular check in the first series. --- gdb/testsuite/gdb.base/break-idempotent.exp | 2 +- gdb/testsuite/gdb.base/break-unload-file.exp | 2 +- gdb/testsuite/gdb.base/hbreak-unmapped.exp | 4 +--- gdb/testsuite/gdb.base/hbreak.exp | 4 +--- gdb/testsuite/gdb.base/hw-sw-break-same-address.exp | 4 +--- gdb/testsuite/gdb.python/py-breakpoint.exp | 2 +- gdb/testsuite/gdb.threads/watchpoint-fork.exp | 2 +- gdb/testsuite/lib/gdb.exp | 10 +++++----- 8 files changed, 12 insertions(+), 18 deletions(-) diff --git a/gdb/testsuite/gdb.base/break-idempotent.exp b/gdb/testsuite/gdb.base/break-idempotent.exp index 559a3a6306b..4090cd29f66 100644 --- a/gdb/testsuite/gdb.base/break-idempotent.exp +++ b/gdb/testsuite/gdb.base/break-idempotent.exp @@ -176,7 +176,7 @@ foreach_with_prefix pie { "nopie" "pie" } { foreach_with_prefix always_inserted { "off" "on" } { test_break $always_inserted "break" - if {![skip_hw_breakpoint_tests]} { + if {[allow_hw_breakpoint_tests]} { test_break $always_inserted "hbreak" } diff --git a/gdb/testsuite/gdb.base/break-unload-file.exp b/gdb/testsuite/gdb.base/break-unload-file.exp index 3bf10d08522..82e96940252 100644 --- a/gdb/testsuite/gdb.base/break-unload-file.exp +++ b/gdb/testsuite/gdb.base/break-unload-file.exp @@ -149,7 +149,7 @@ foreach initial_load { "cmdline" "file" } { # coverage. foreach always_inserted { "off" "on" } { test_break $initial_load $always_inserted "break" - if {![skip_hw_breakpoint_tests]} { + if {[allow_hw_breakpoint_tests]} { test_break $initial_load $always_inserted "hbreak" } } diff --git a/gdb/testsuite/gdb.base/hbreak-unmapped.exp b/gdb/testsuite/gdb.base/hbreak-unmapped.exp index 3572452a7c6..18d9c092395 100644 --- a/gdb/testsuite/gdb.base/hbreak-unmapped.exp +++ b/gdb/testsuite/gdb.base/hbreak-unmapped.exp @@ -13,9 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if {[skip_hw_breakpoint_tests]} { - return 0 -} +require allow_hw_breakpoint_tests standard_testfile diff --git a/gdb/testsuite/gdb.base/hbreak.exp b/gdb/testsuite/gdb.base/hbreak.exp index f18d23de29b..7fc1bb2930e 100644 --- a/gdb/testsuite/gdb.base/hbreak.exp +++ b/gdb/testsuite/gdb.base/hbreak.exp @@ -13,9 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -if {[skip_hw_breakpoint_tests]} { - return 0 -} +require allow_hw_breakpoint_tests set test hbreak set srcfile ${test}.c diff --git a/gdb/testsuite/gdb.base/hw-sw-break-same-address.exp b/gdb/testsuite/gdb.base/hw-sw-break-same-address.exp index 1f6832688f0..9f941186454 100644 --- a/gdb/testsuite/gdb.base/hw-sw-break-same-address.exp +++ b/gdb/testsuite/gdb.base/hw-sw-break-same-address.exp @@ -18,9 +18,7 @@ # breakpoint locations as duplicate locations, which would lead to bad # behavior. See PR gdb/25741. -if {[skip_hw_breakpoint_tests]} { - return 0 -} +require allow_hw_breakpoint_tests set test hbreak set srcfile ${test}.c diff --git a/gdb/testsuite/gdb.python/py-breakpoint.exp b/gdb/testsuite/gdb.python/py-breakpoint.exp index bee2ceaf032..9535040e3a2 100644 --- a/gdb/testsuite/gdb.python/py-breakpoint.exp +++ b/gdb/testsuite/gdb.python/py-breakpoint.exp @@ -259,7 +259,7 @@ proc_with_prefix test_hardware_breakpoints { } { global srcfile testfile hex decimal # Skip these tests if the HW does not support hardware breakpoints. - if { [skip_hw_breakpoint_tests] } { return 0 } + if { ![allow_hw_breakpoint_tests] } { return 0 } # Start with a fresh gdb. clean_restart ${testfile} diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork.exp b/gdb/testsuite/gdb.threads/watchpoint-fork.exp index d3804e68f88..b484fa80406 100644 --- a/gdb/testsuite/gdb.threads/watchpoint-fork.exp +++ b/gdb/testsuite/gdb.threads/watchpoint-fork.exp @@ -74,7 +74,7 @@ proc test {type symbol} { gdb_test "watch var" "atchpoint \[0-9\]+: var" "set the watchpoint" # It is never hit but it should not be left over in the fork()ed-off child. - if [skip_hw_breakpoint_tests] { + if {![allow_hw_breakpoint_tests]} { set hbreak "break" } else { set hbreak "hbreak" diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 94dccf8a6a1..31f11b22f87 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -4017,13 +4017,13 @@ proc skip_inline_var_tests {} { return 0 } -# Return a 1 if we should skip tests that require hardware breakpoints +# Return a 1 if we should run tests that require hardware breakpoints -proc skip_hw_breakpoint_tests {} { +proc allow_hw_breakpoint_tests {} { # Skip tests if requested by the board (note that no_hardware_watchpoints # disables both watchpoints and breakpoints) if { [target_info exists gdb,no_hardware_watchpoints]} { - return 1 + return 0 } # These targets support hardware breakpoints natively @@ -4033,10 +4033,10 @@ proc skip_hw_breakpoint_tests {} { || [istarget "arm*-*-*"] || [istarget "aarch64*-*-*"] || [istarget "s390*-*-*"] } { - return 0 + return 1 } - return 1 + return 0 } # Return a 1 if we should run tests that require hardware watchpoints -- 2.39.0