public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Carl Love <cel@us.ibm.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Cc: Ulrich Weigand <Ulrich.Weigand@de.ibm.com>,
	Will Schmidt <will_schmidt@vnet.ibm.com>,
	cel@us.ibm.com
Subject: [PATCH] PowerPC, fix test gdb.base/watchpoint-stops-at-right-insn.exp
Date: Mon, 10 Oct 2022 12:41:33 -0700	[thread overview]
Message-ID: <5c8dbf7b7a99d71ddac4b64a0553db2f250ed1ed.camel@us.ibm.com> (raw)

GDB maintainers:

The following patch disables the gdb.base/watchpoint-stops-at-right-
insn.exp test on Power 9.  The Power 9 processor does not support
hardware breakpoints due to a HW bug.  The test should be skipped on
Power 9.

The following patch updates the test for hardware watchpoint support to
use the correct test skip_hw_watchpoint_tests on PowerPC to determine
if the PowerPC processor supports hardware watchpoints.

The patch has been tested on X86-64, Power 9 and Power 10 with no
regressions.

Please let me know if the patch is acceptable.  Thanks.

                    Carl Love


----------------------------------------
PowerPC, fix test gdb.base/watchpoint-stops-at-right-insn.exp

Test gdb.base/watchpoint-stops-at-right-insn.exp generates 4 test errors
on Power 9.  The test uses the test [target_info exists gdb,
no_hardware_watchpoints] to determine if the processor supports hardware
watchpoints.  The check only examines the processor type to determine if
it supports hardware watchpoints.  Note, the test works fine on Power 10.

The PowerPC processors support hardware watchpoints with the
exception of Power 9. The hardware watchpoint support was disabled on
Power 9 due to a hardware bug.  The test skip_hw_watchpoint_tests must
be used to correctly determine if the PowerPC processor supports
hardware watchpoints.

This patch replaces the [target_info exists gdb,no_hardware_watchpoints]
with the skip_hw_watchpoint_tests_p check.  With the patch, the test is
disabled on Power 9 but runs on all other PowerPC processors.

The patch has been tested on Power 9, Power 10 and X86-64 with no
regression failures.
---
 gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 f9adb1f4f91..6c445d4cbd8 100644
--- a/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-stops-at-right-insn.exp
@@ -71,7 +71,7 @@
 standard_testfile
 
 # No use testing this if we can't use hardware watchpoints.
-if {[target_info exists gdb,no_hardware_watchpoints]} {
+if {[skip_hw_watchpoint_tests]} {
     return -1
 }
 
-- 
2.37.2



             reply	other threads:[~2022-10-10 19:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-10 19:41 Carl Love [this message]
2022-10-12 13:51 ` Ulrich Weigand

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=5c8dbf7b7a99d71ddac4b64a0553db2f250ed1ed.camel@us.ibm.com \
    --to=cel@us.ibm.com \
    --cc=Ulrich.Weigand@de.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=will_schmidt@vnet.ibm.com \
    /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).