From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2126) id B7AFB3858004; Fri, 13 Jan 2023 20:40:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B7AFB3858004 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1673642416; bh=Jo95yAJOuVWS1qmvU1DeqjbDo5RAiI/nUNFrrbtcmv4=; h=From:To:Subject:Date:From; b=juceFHjFePpOrKKzfl8zvOIGaI5G+BN5FroEIbDGUH4Rf0BBk91yIwH+o7DhWfg1F syLl3BBBsrXHJ7yn5N/Zkcp3H12Ed4v2F0mScsQAKspJ7oH2EQ4w8ZcuAXKOLZ8DN+ x766lFlz3g5bKm2om9ll4gs22ovjk5R3aogN3Y8Q= Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom Tromey To: gdb-cvs@sourceware.org Subject: [binutils-gdb] Rename to allow_hw_breakpoint_tests X-Act-Checkin: binutils-gdb X-Git-Author: Tom Tromey X-Git-Refname: refs/heads/master X-Git-Oldrev: 1cf897dec9466eed3d63f3b0c42257f41eb55fcc X-Git-Newrev: e0c86460bcd9e19bb3f069af19ab5d1e3333e4c9 Message-Id: <20230113204016.B7AFB3858004@sourceware.org> Date: Fri, 13 Jan 2023 20:40:16 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3De0c86460bcd9= e19bb3f069af19ab5d1e3333e4c9 commit e0c86460bcd9e19bb3f069af19ab5d1e3333e4c9 Author: Tom Tromey Date: Sun Jan 8 11:54:47 2023 -0700 Rename to allow_hw_breakpoint_tests =20 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. Diff: --- 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/gd= b.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" =20 - if {![skip_hw_breakpoint_tests]} { + if {[allow_hw_breakpoint_tests]} { test_break $always_inserted "hbreak" } =20 diff --git a/gdb/testsuite/gdb.base/break-unload-file.exp b/gdb/testsuite/g= db.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 . =20 -if {[skip_hw_breakpoint_tests]} { - return 0 -} +require allow_hw_breakpoint_tests =20 standard_testfile =20 diff --git a/gdb/testsuite/gdb.base/hbreak.exp b/gdb/testsuite/gdb.base/hbr= eak.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 . =20 -if {[skip_hw_breakpoint_tests]} { - return 0 -} +require allow_hw_breakpoint_tests =20 set test hbreak set srcfile ${test}.c diff --git a/gdb/testsuite/gdb.base/hw-sw-break-same-address.exp b/gdb/test= suite/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. =20 -if {[skip_hw_breakpoint_tests]} { - return 0 -} +require allow_hw_breakpoint_tests =20 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 =20 # 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 } =20 # 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" =20 # 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 } =20 -# Return a 1 if we should skip tests that require hardware breakpoints +# Return a 1 if we should run tests that require hardware breakpoints =20 -proc skip_hw_breakpoint_tests {} { +proc allow_hw_breakpoint_tests {} { # Skip tests if requested by the board (note that no_hardware_watchpoi= nts # disables both watchpoints and breakpoints) if { [target_info exists gdb,no_hardware_watchpoints]} { - return 1 + return 0 } =20 # 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 } =20 - return 1 + return 0 } =20 # Return a 1 if we should run tests that require hardware watchpoints