]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Use require !skip_hw_watchpoint_tests
authorTom Tromey <tom@tromey.com>
Wed, 14 Dec 2022 16:38:35 +0000 (09:38 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 13 Jan 2023 20:18:55 +0000 (13:18 -0700)
This changes some tests to use "require !skip_hw_watchpoint_tests".

19 files changed:
gdb/testsuite/gdb.ada/task_watch.exp
gdb/testsuite/gdb.base/pr11022.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-attach.exp
gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp
gdb/testsuite/gdb.base/watchpoint-hw.exp
gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
gdb/testsuite/gdb.base/watchpoint-unaligned.exp
gdb/testsuite/gdb.mi/mi-watch-nonstop.exp
gdb/testsuite/gdb.mi/pr11022.exp
gdb/testsuite/gdb.multi/watchpoint-multi.exp
gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp
gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp
gdb/testsuite/gdb.threads/watchthreads-reorder.exp
gdb/testsuite/gdb.threads/watchthreads.exp
gdb/testsuite/gdb.threads/watchthreads2.exp
gdb/testsuite/gdb.threads/wp-replication.exp

index 1e2e631c94d793b1e0fec3cd61fd7ce19292a9ab..a8f8b13a37b80fbe375c2ffa023bcb58fba3604e 100644 (file)
@@ -19,7 +19,7 @@ load_lib "ada.exp"
 
 require !skip_ada_tests
 
-if { [skip_hw_watchpoint_tests] } { return -1 }
+require !skip_hw_watchpoint_tests
 
 standard_ada_testfile foo
 
index 95a0e3665aeed4aff4053f1eb6930f16befef631..bf329bc383f5e0601f20030a61440adbf213b4d4 100644 (file)
@@ -13,9 +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/>.
 
-if {[skip_hw_watchpoint_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_tests
 
 standard_testfile .c
 
index 472f3dab7c662161f8724a43c6bec73c71bb3a22..41574169e8f40bc144f2e5406305da231195efd6 100644 (file)
@@ -18,9 +18,7 @@
 # followed by a catchpoint hit.
 
 # This test uses "awatch".
-if {[skip_hw_watchpoint_access_tests]} {
-    return
-}
+require !skip_hw_watchpoint_access_tests
 
 standard_testfile
 
index 8d7801263bd0731afd522204663b23a02a87c214..6533ee2f14cc5fc83708782520f3f3b6a0977e88 100644 (file)
@@ -24,9 +24,7 @@
 
 standard_testfile .c
 
-if {[skip_hw_watchpoint_access_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_access_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
index 465c523655c1499022bc94e42df8c220af187161..799b386a39002c67c630b7fa846a0a0160609a7f 100644 (file)
@@ -23,9 +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.
-if {[skip_hw_watchpoint_access_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_access_tests
 
 standard_testfile .c
 
index 5bff78f92426379b114603f749996d98a134250e..e1a9c94d94cc261ee64f16480dd23f2425cc9597 100644 (file)
@@ -16,9 +16,7 @@
 # watchpoint-hw-attach.exp -- Test if hardware watchpoints are used
 # when attaching to a target.
 
-if {[skip_hw_watchpoint_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_tests
 
 if {![can_spawn_for_attach]} {
     return 0
index 317a318fb9626bf6c8f20a8233824da7d00058de..e93391a6512576ec3126cd47999961cd34e6ebcc 100644 (file)
@@ -13,9 +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/>.
 
-if {[skip_hw_watchpoint_access_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_access_tests
 
 set test watchpoint-hw-hit-once
 set srcfile ${test}.c
index adc454932dfdd503733332896ef2eff3b77335d4..63ab8ffe1bb86689b8e12c23f7db2e6c4891a248 100644 (file)
@@ -18,9 +18,7 @@ if { [use_gdb_stub] } {
     return
 }
 
-if {[skip_hw_watchpoint_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_tests
 
 standard_testfile
 
index b97e5e3ab24fb9b76f1badaca39138978d44f16f..585669dd0fd0ddfd0af89aa8fc91a14527170527 100644 (file)
@@ -71,9 +71,7 @@
 standard_testfile
 
 # No use testing this if we can't use hardware watchpoints.
-if {[skip_hw_watchpoint_tests]} {
-    return -1
-}
+require !skip_hw_watchpoint_tests
 
 if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
     return -1
index 88fba010e610051098ac3ed34eff4fbaa63867d2..33fc1c1b5d0ac0ebcd478297f1dc589fd9b82ca4 100644 (file)
@@ -17,9 +17,7 @@
 
 # Test inserting read watchpoints on unaligned addresses.
 
-if {[skip_hw_watchpoint_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_tests
 
 standard_testfile
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
index 2b9b2a13f147415c8c3cdb19acd6de665a2362d9..515454456b27e19bf9bce53d318fc6cc90ce6c11 100644 (file)
@@ -13,9 +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/>.
 
-if [skip_hw_watchpoint_tests] {
-    return -1
-}
+require !skip_hw_watchpoint_tests
 
 if { ![support_displaced_stepping] } { 
     unsupported "displaced stepping"
index 66357628f164e34ac9f4e9b7cd6677e667c0e7c2..fcfad4400d3065fc72ed73e3b39bb81e1918a869 100644 (file)
@@ -13,9 +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/>.
 
-if {[skip_hw_watchpoint_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_tests
 
 load_lib mi-support.exp
 set MIFLAGS "-i=mi"
index d371ee569f112450188cfc326f14b0bf171c255f..8df68b382e1d405563d734934de93433465ced0b 100644 (file)
@@ -25,10 +25,7 @@ if [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.
-if [skip_hw_watchpoint_access_tests] {
-    untested "${testfile} (no hardware access watchpoints)"
-    return
-}
+require !skip_hw_watchpoint_access_tests
 
 if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
     untested "failed to compile"
index 3bd820516014211e62289b5c5497c4fec1578708..2f627a0598053cc42a7089fd6fc1743ce997ce10 100644 (file)
@@ -19,9 +19,7 @@
 # thread other than the thread the local watchpoint was set in stops
 # for a breakpoint.
 
-if {[skip_hw_watchpoint_multi_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_multi_tests
 
 standard_testfile
 if {[gdb_compile_pthreads \
index ae720a894a02711227ef2c6ac9b358beb6a659cd..f271c468affbfffebe8d9c25434b148d9db8d9b8 100644 (file)
@@ -22,9 +22,7 @@ set executable ${testfile}
 # This test verifies that a watchpoint is detected in a multithreaded
 # program so the test is only meaningful on a system with hardware
 # watchpoints.
-if {[skip_hw_watchpoint_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_tests
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
         executable [list debug "incdir=${objdir}"]] != "" } {
index d223c11e6a8ae1b9b22e3f1b0430cd34665f7ab5..2469b3ada0c76d8a786dcdb267e6f4617649426a 100644 (file)
@@ -25,9 +25,8 @@
 # could be assigned during continuation of a thread with pending SIGTRAP to the
 # different/new watchpoint, just based on the watchpoint/debug register number.
 
-if {[skip_hw_watchpoint_access_tests]
-    || [skip_hw_watchpoint_multi_tests]
-    || ![istarget *-*-linux*]} {
+require !skip_hw_watchpoint_access_tests !skip_hw_watchpoint_multi_tests
+if {![istarget *-*-linux*]} {
     return 0
 }
 
index 0a5369a3c3001f61b1062d843b86d8211cc3ed0e..d2a95bf7d5cb5f7a7e0a16d73ab7679f3401e466 100644 (file)
@@ -20,9 +20,7 @@
 
 # This test verifies that a watchpoint is detected in the proper thread
 # so the test is only meaningful on a system with hardware watchpoints.
-if {[skip_hw_watchpoint_multi_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_multi_tests
 
 proc target_no_stopped_data { } {
     return [istarget s390*-*-*]
index 0f641bbef3174a70bd139c79cb40df3154aed6b6..e9db6781708eff5b0b7bd8301a33f677c7788117 100644 (file)
@@ -24,9 +24,7 @@ set X_INCR_COUNT 10
 
 # This test verifies that a watchpoint is detected in the proper thread
 # so the test is only meaningful on a system with hardware watchpoints.
-if {[skip_hw_watchpoint_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_tests
 
 standard_testfile
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS -DX_INCR_COUNT=$X_INCR_COUNT"]] != "" } {
index 738cb34cfa645e9fd5051f8e899408f12eab43e6..7da66f386abbecb5862520b66819d6d5142a86c2 100644 (file)
@@ -27,9 +27,7 @@ set NR_TRIGGERS_PER_THREAD 2
 # This test verifies that a hardware watchpoint gets replicated to
 # every existing thread and is detected properly.  This test is
 # only meaningful on a target with hardware watchpoint support.
-if {[skip_hw_watchpoint_tests]} {
-    return 0
-}
+require !skip_hw_watchpoint_tests
 
 standard_testfile
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS -DNR_TRIGGERS_PER_THREAD=$NR_TRIGGERS_PER_THREAD"]] != "" } {