From: Tom Tromey <tom@tromey.com>
To: gdb-patches@sourceware.org
Cc: Tom Tromey <tom@tromey.com>
Subject: [PATCH 18/46] Use require skip_hw_watchpoint_tests
Date: Fri, 16 Dec 2022 17:07:50 -0700 [thread overview]
Message-ID: <20221217000818.3729389-19-tom@tromey.com> (raw)
In-Reply-To: <20221217000818.3729389-1-tom@tromey.com>
This changes some tests to use "require skip_hw_watchpoint_tests".
---
gdb/testsuite/gdb.ada/task_watch.exp | 2 +-
gdb/testsuite/gdb.base/pr11022.exp | 4 +---
gdb/testsuite/gdb.base/watch-before-fork.exp | 4 +---
gdb/testsuite/gdb.base/watch-read.exp | 4 +---
gdb/testsuite/gdb.base/watch_thread_num.exp | 4 +---
gdb/testsuite/gdb.base/watchpoint-hw-attach.exp | 4 +---
gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp | 4 +---
gdb/testsuite/gdb.base/watchpoint-hw.exp | 4 +---
gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp | 4 +---
gdb/testsuite/gdb.base/watchpoint-unaligned.exp | 4 +---
gdb/testsuite/gdb.mi/mi-watch-nonstop.exp | 4 +---
gdb/testsuite/gdb.mi/pr11022.exp | 4 +---
gdb/testsuite/gdb.multi/watchpoint-multi.exp | 5 +----
gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp | 4 +---
gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp | 4 +---
gdb/testsuite/gdb.threads/watchthreads-reorder.exp | 5 ++---
gdb/testsuite/gdb.threads/watchthreads.exp | 4 +---
gdb/testsuite/gdb.threads/watchthreads2.exp | 4 +---
gdb/testsuite/gdb.threads/wp-replication.exp | 4 +---
19 files changed, 20 insertions(+), 56 deletions(-)
diff --git a/gdb/testsuite/gdb.ada/task_watch.exp b/gdb/testsuite/gdb.ada/task_watch.exp
index 295efd5b010..a01d4c7c659 100644
--- a/gdb/testsuite/gdb.ada/task_watch.exp
+++ b/gdb/testsuite/gdb.ada/task_watch.exp
@@ -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
diff --git a/gdb/testsuite/gdb.base/pr11022.exp b/gdb/testsuite/gdb.base/pr11022.exp
index 56d26ccd132..d0b9c1f1aa0 100644
--- a/gdb/testsuite/gdb.base/pr11022.exp
+++ b/gdb/testsuite/gdb.base/pr11022.exp
@@ -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
diff --git a/gdb/testsuite/gdb.base/watch-before-fork.exp b/gdb/testsuite/gdb.base/watch-before-fork.exp
index 7c2a481e454..3993778035b 100644
--- a/gdb/testsuite/gdb.base/watch-before-fork.exp
+++ b/gdb/testsuite/gdb.base/watch-before-fork.exp
@@ -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
diff --git a/gdb/testsuite/gdb.base/watch-read.exp b/gdb/testsuite/gdb.base/watch-read.exp
index d73bc5c4ab3..1b856bb109b 100644
--- a/gdb/testsuite/gdb.base/watch-read.exp
+++ b/gdb/testsuite/gdb.base/watch-read.exp
@@ -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
diff --git a/gdb/testsuite/gdb.base/watch_thread_num.exp b/gdb/testsuite/gdb.base/watch_thread_num.exp
index da921a72346..8ec4dd3fe00 100644
--- a/gdb/testsuite/gdb.base/watch_thread_num.exp
+++ b/gdb/testsuite/gdb.base/watch_thread_num.exp
@@ -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
diff --git a/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp b/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp
index 456d5570fb2..ce9263ef37a 100644
--- a/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-hw-attach.exp
@@ -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
diff --git a/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp b/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp
index ebcd2eb29c7..b84de75b734 100644
--- a/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-hw-hit-once.exp
@@ -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
diff --git a/gdb/testsuite/gdb.base/watchpoint-hw.exp b/gdb/testsuite/gdb.base/watchpoint-hw.exp
index d0fd1621efe..785f949efe9 100644
--- a/gdb/testsuite/gdb.base/watchpoint-hw.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-hw.exp
@@ -18,9 +18,7 @@ if { [use_gdb_stub] } {
return
}
-if {[skip_hw_watchpoint_tests]} {
- return 0
-}
+require !skip_hw_watchpoint_tests
standard_testfile
diff --git a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp b/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
index 0364591d745..7112a2db355 100644
--- a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
@@ -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
diff --git a/gdb/testsuite/gdb.base/watchpoint-unaligned.exp b/gdb/testsuite/gdb.base/watchpoint-unaligned.exp
index 00c6ebcf4eb..c25233e1a1b 100644
--- a/gdb/testsuite/gdb.base/watchpoint-unaligned.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-unaligned.exp
@@ -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}] } {
diff --git a/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp b/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp
index 9648d7ee41c..e3b9b23c109 100644
--- a/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp
+++ b/gdb/testsuite/gdb.mi/mi-watch-nonstop.exp
@@ -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"
diff --git a/gdb/testsuite/gdb.mi/pr11022.exp b/gdb/testsuite/gdb.mi/pr11022.exp
index cdb39e7b65f..9fc47ce7215 100644
--- a/gdb/testsuite/gdb.mi/pr11022.exp
+++ b/gdb/testsuite/gdb.mi/pr11022.exp
@@ -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"
diff --git a/gdb/testsuite/gdb.multi/watchpoint-multi.exp b/gdb/testsuite/gdb.multi/watchpoint-multi.exp
index 0fc1bee762f..121d1e8a660 100644
--- a/gdb/testsuite/gdb.multi/watchpoint-multi.exp
+++ b/gdb/testsuite/gdb.multi/watchpoint-multi.exp
@@ -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"
diff --git a/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp b/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp
index 9ddcd589226..18cd7e9f8ae 100644
--- a/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp
+++ b/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp
@@ -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 \
diff --git a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp
index 332ec9a03fd..b5c85c1b245 100644
--- a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp
+++ b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp
@@ -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}"]] != "" } {
diff --git a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp
index 3f9467c795e..b2be631420a 100644
--- a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp
+++ b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp
@@ -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
}
diff --git a/gdb/testsuite/gdb.threads/watchthreads.exp b/gdb/testsuite/gdb.threads/watchthreads.exp
index 7fac8a3df80..3dde5458385 100644
--- a/gdb/testsuite/gdb.threads/watchthreads.exp
+++ b/gdb/testsuite/gdb.threads/watchthreads.exp
@@ -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*-*-*]
diff --git a/gdb/testsuite/gdb.threads/watchthreads2.exp b/gdb/testsuite/gdb.threads/watchthreads2.exp
index 8b887f2a944..97f20b31619 100644
--- a/gdb/testsuite/gdb.threads/watchthreads2.exp
+++ b/gdb/testsuite/gdb.threads/watchthreads2.exp
@@ -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"]] != "" } {
diff --git a/gdb/testsuite/gdb.threads/wp-replication.exp b/gdb/testsuite/gdb.threads/wp-replication.exp
index bec3d10fd67..d057513c46d 100644
--- a/gdb/testsuite/gdb.threads/wp-replication.exp
+++ b/gdb/testsuite/gdb.threads/wp-replication.exp
@@ -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"]] != "" } {
--
2.38.1
next prev parent reply other threads:[~2022-12-17 0:08 UTC|newest]
Thread overview: 63+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-17 0:07 [PATCH 00/46] Rewrite "require" test procedure and use it more often Tom Tromey
2022-12-17 0:07 ` [PATCH 01/46] Don't use ensure_gdb_index with require Tom Tromey
2022-12-17 0:07 ` [PATCH 02/46] Change 'require' to accept a list of predicates Tom Tromey
2022-12-17 0:07 ` [PATCH 03/46] Use unsupported in 'require' Tom Tromey
2022-12-23 12:39 ` Aktemur, Tankut Baris
2023-01-06 1:14 ` Tom Tromey
2022-12-17 0:07 ` [PATCH 04/46] Use require supports_reverse Tom Tromey
2022-12-17 0:07 ` [PATCH 05/46] Use require supports_process_record Tom Tromey
2022-12-17 0:07 ` [PATCH 06/46] Use require dwarf2_support Tom Tromey
2022-12-17 0:07 ` [PATCH 07/46] Use require is_x86_like_target Tom Tromey
2022-12-17 0:07 ` [PATCH 08/46] Use require skip_cplus_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 09/46] Use require skip_shlib_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 10/46] Use require skip_dlmopen_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 11/46] Use require skip_stl_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 12/46] Use require skip_rust_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 13/46] Use require skip_fortran_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 14/46] Use require skip_ada_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 15/46] Use require skip_go_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 16/46] Use require skip_d_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 17/46] Use require skip_ctf_tests Tom Tromey
2022-12-17 0:07 ` Tom Tromey [this message]
2022-12-17 0:07 ` [PATCH 19/46] Use require skip_ifunc_tests Tom Tromey
2022-12-17 0:07 ` [PATCH 20/46] Use require skip_aarch64_sve_tests Tom Tromey
2022-12-19 10:50 ` Luis Machado
2022-12-17 0:07 ` [PATCH 21/46] Use require skip_btrace_tests Tom Tromey
2022-12-17 1:15 ` Enze Li
2022-12-18 0:48 ` Tom Tromey
2022-12-19 5:13 ` Enze Li
2022-12-19 14:44 ` Tom Tromey
2022-12-17 0:07 ` [PATCH 22/46] " Tom Tromey
2022-12-17 9:22 ` Metzger, Markus T
2022-12-18 17:46 ` Tom Tromey
2022-12-17 0:07 ` [PATCH 23/46] Use require skip_avx_* Tom Tromey
2022-12-17 0:07 ` [PATCH 24/46] Use require support_displaced_stepping Tom Tromey
2022-12-17 0:07 ` [PATCH 25/46] Use require is_aarch64_target Tom Tromey
2022-12-19 10:46 ` Luis Machado
2022-12-17 0:07 ` [PATCH 26/46] Use require is_aarch32_target Tom Tromey
2022-12-19 10:46 ` Luis Machado
2022-12-17 0:07 ` [PATCH 27/46] Use require is_amd64_regs_target Tom Tromey
2022-12-17 0:08 ` [PATCH 28/46] Use require is_elf_target Tom Tromey
2022-12-17 0:08 ` [PATCH 29/46] Use require can_single_step_to_signal_handler Tom Tromey
2022-12-17 0:08 ` [PATCH 30/46] Use require supports_get_siginfo_type Tom Tromey
2022-12-17 0:08 ` [PATCH 31/46] Use require support_go_compile Tom Tromey
2022-12-17 0:08 ` [PATCH 32/46] Use require use_gdb_stub Tom Tromey
2022-12-17 0:08 ` [PATCH 33/46] Use require can_spawn_for_attach Tom Tromey
2022-12-17 0:08 ` [PATCH 34/46] Use require isnative Tom Tromey
2022-12-17 0:08 ` [PATCH 35/46] Use require skip_gdbserver_tests Tom Tromey
2022-12-17 0:08 ` [PATCH 36/46] Use require skip_shlib_tests Tom Tromey
2022-12-17 0:08 ` [PATCH 37/46] Use require is_c_compiler_gcc Tom Tromey
2022-12-17 0:08 ` [PATCH 38/46] Use require gdb_debug_enabled Tom Tromey
2022-12-17 0:08 ` [PATCH 39/46] Use require gdb_skip_xml_test Tom Tromey
2022-12-17 0:08 ` [PATCH 40/46] Use require gdb_trace_common_supports_arch Tom Tromey
2022-12-17 0:08 ` [PATCH 41/46] Use require skip_perf_tests Tom Tromey
2022-12-17 0:08 ` [PATCH 42/46] Use require skip_opencl_tests Tom Tromey
2022-12-17 0:08 ` [PATCH 43/46] Use require target_can_use_run_cmd Tom Tromey
2022-12-17 0:08 ` [PATCH 44/46] Use require using_fission Tom Tromey
2022-12-17 0:08 ` [PATCH 45/46] Use require skip_debuginfod_tests Tom Tromey
2022-12-17 0:08 ` [PATCH 46/46] Use require gnat_runtime_has_debug_info Tom Tromey
2022-12-19 10:49 ` [PATCH 00/46] Rewrite "require" test procedure and use it more often Luis Machado
2023-01-06 2:45 ` Tom Tromey
2023-01-05 1:29 ` Kevin Buettner
2023-01-06 2:47 ` Tom Tromey
2023-01-07 0:07 ` Kevin Buettner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221217000818.3729389-19-tom@tromey.com \
--to=tom@tromey.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).