From patchwork Thu Jan 12 02:59:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 63023 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id B458A389367B for ; Thu, 12 Jan 2023 03:04:21 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from progateway7-pub.mail.pro1.eigbox.com (gproxy5-pub.mail.unifiedlayer.com [67.222.38.55]) by sourceware.org (Postfix) with ESMTPS id 9C66C385B515 for ; Thu, 12 Jan 2023 03:01:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 9C66C385B515 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 progateway7.mail.pro1.eigbox.com (Postfix) with ESMTP id 1D7EB10048EA2 for ; Thu, 12 Jan 2023 03:01:15 +0000 (UTC) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTP id Fnq7pabHdxrINFnq7pERjN; Thu, 12 Jan 2023 03:01:15 +0000 X-Authority-Reason: nr=8 X-Authority-Analysis: v=2.4 cv=MrOXV0We c=1 sm=1 tr=0 ts=63bf77fb 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=vvWY1OzmxowyN2FbmmEA: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=ML26TKc+tN9bhYsKX2FhCDSvvT24HODt2AqQqxZkSrc=; b=rGgIwC/IoTjIevzpTVqK056AYZ MKI6OxXnGRsf8LjL69OIgLE4Jp4ufhDMDdTfXAuJJkliLvg2RbfMeLbSyR+mCXnNQYyVpXBM7+Yvd c0rzHXfw1Q5lHcj9KLJH49j0z; Received: from 97-122-76-186.hlrn.qwest.net ([97.122.76.186]:54890 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 1pFnq6-000lPe-R2; Wed, 11 Jan 2023 20:01:14 -0700 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH v2 18/79] Use require skip_hw_watchpoint_tests Date: Wed, 11 Jan 2023 19:59:51 -0700 Message-Id: <20230112030052.3306113-19-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 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: 1pFnq6-000lPe-R2 X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-76-186.hlrn.qwest.net (localhost.localdomain) [97.122.76.186]:54890 X-Source-Auth: tom+tromey.com X-Email-Count: 19 X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-Spam-Status: No, score=-3028.1 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" 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 1e2e631c94d..a8f8b13a37b 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 95a0e3665ae..bf329bc383f 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 . -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 472f3dab7c6..41574169e8f 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 8d7801263bd..6533ee2f14c 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 465c523655c..799b386a390 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 5bff78f9242..e1a9c94d94c 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 317a318fb96..e93391a6512 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 . -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 adc454932df..63ab8ffe1bb 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 b97e5e3ab24..585669dd0fd 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 88fba010e61..33fc1c1b5d0 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 2b9b2a13f14..515454456b2 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 . -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 66357628f16..fcfad4400d3 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 . -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 d371ee569f1..8df68b382e1 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 3bd82051601..2f627a05980 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 ae720a894a0..f271c468aff 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 d223c11e6a8..2469b3ada0c 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 0a5369a3c30..d2a95bf7d5c 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 0f641bbef31..e9db6781708 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 738cb34cfa6..7da66f386ab 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"]] != "" } {