Rename to allow_hw_watchpoint_access_tests
authorTom Tromey <tom@tromey.com>
Sun, 8 Jan 2023 17:55:43 +0000 (10:55 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 13 Jan 2023 20:18:57 +0000 (13:18 -0700)
This changes skip_hw_watchpoint_access_tests to invert the sense, and
renames it to allow_hw_watchpoint_access_tests.

gdb/testsuite/gdb.base/break-idempotent.exp
gdb/testsuite/gdb.base/watch-before-fork.exp
gdb/testsuite/gdb.base/watch-read.exp
gdb/testsuite/gdb.base/watch_thread_num.exp
gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp
gdb/testsuite/gdb.multi/watchpoint-multi.exp
gdb/testsuite/gdb.threads/watchthreads-reorder.exp
gdb/testsuite/lib/gdb.exp

index 058c9327dcd3aeec5d88c0fc3531168292fc5a1f..e967b563ddaa6bd99bda6e14a75cfe4947312413 100644 (file)
@@ -184,7 +184,7 @@ foreach_with_prefix pie { "nopie" "pie" } {
            test_break $always_inserted "watch"
        }
 
-       if {![skip_hw_watchpoint_access_tests]
+       if {[allow_hw_watchpoint_access_tests]
            && ![skip_hw_watchpoint_multi_tests]} {
            test_break $always_inserted "rwatch"
            test_break $always_inserted "awatch"
index 41574169e8f40bc144f2e5406305da231195efd6..a9e212026bfb7acb2e9f63261bfeeda27fc51180 100644 (file)
@@ -18,7 +18,7 @@
 # followed by a catchpoint hit.
 
 # This test uses "awatch".
-require !skip_hw_watchpoint_access_tests
+require allow_hw_watchpoint_access_tests
 
 standard_testfile
 
index 6533ee2f14cc5fc83708782520f3f3b6a0977e88..2c2e165394ec00c1eeb42a6dfad8ab8f59d83ca2 100644 (file)
@@ -24,7 +24,7 @@
 
 standard_testfile .c
 
-require !skip_hw_watchpoint_access_tests
+require allow_hw_watchpoint_access_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
index 799b386a39002c67c630b7fa846a0a0160609a7f..28b8581ba5a8d130f516c19aea2ab4ab01168e6b 100644 (file)
@@ -23,7 +23,7 @@
 # so the test is only meaningful on a system with hardware watchpoints.
 # More specifically, the implementation of this test uses access
 # watchpoints, so skip it when those are not available.
-require !skip_hw_watchpoint_access_tests
+require allow_hw_watchpoint_access_tests
 
 standard_testfile .c
 
index e93391a6512576ec3126cd47999961cd34e6ebcc..fa16b3c456c40a35e76862385f112ba91da0940d 100644 (file)
@@ -13,7 +13,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-require !skip_hw_watchpoint_access_tests
+require allow_hw_watchpoint_access_tests
 
 set test watchpoint-hw-hit-once
 set srcfile ${test}.c
index e29e0675d8e0680fd8adefb326042a4c7a6c1ce2..69996ba88d25ae68587c357c304e630584b6de6d 100644 (file)
@@ -22,7 +22,7 @@ require !use_gdb_stub
 
 # Do not use simple hardware watchpoints ("watch") as its false hit may be
 # unnoticed by GDB if it reads it still has the same value.
-require !skip_hw_watchpoint_access_tests
+require allow_hw_watchpoint_access_tests
 
 if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
     untested "failed to compile"
index 2469b3ada0c76d8a786dcdb267e6f4617649426a..d5de2c68684b99cb57436efe6647f94a894e67c3 100644 (file)
@@ -25,7 +25,7 @@
 # could be assigned during continuation of a thread with pending SIGTRAP to the
 # different/new watchpoint, just based on the watchpoint/debug register number.
 
-require !skip_hw_watchpoint_access_tests !skip_hw_watchpoint_multi_tests
+require allow_hw_watchpoint_access_tests !skip_hw_watchpoint_multi_tests
 if {![istarget *-*-linux*]} {
     return 0
 }
index f3f0bfac76283efadfb8a498f438a1f51664349a..13d1ae881b57c0f583d7b085a5362a37dcd8a682 100644 (file)
@@ -4081,19 +4081,19 @@ proc skip_hw_watchpoint_multi_tests {} {
     return 0
 }
 
-# Return a 1 if we should skip tests that require read/access watchpoints
+# Return a 1 if we should run tests that require read/access watchpoints
 
-proc skip_hw_watchpoint_access_tests {} {
+proc allow_hw_watchpoint_access_tests {} {
     if { [skip_hw_watchpoint_tests] } {
-       return 1
+       return 0
     }
 
     # These targets support just write watchpoints
     if { [istarget "s390*-*-*"] } {
-       return 1
+       return 0
     }
 
-    return 0
+    return 1
 }
 
 # Return 1 if we should skip tests that require the runtime unwinder