* [PATCH] gdb/testsuite: Skip gdb.base/watchpoint-unaligned.exp on s390x
@ 2026-03-03 22:17 Kevin Buettner
2026-03-04 6:40 ` Tom de Vries
0 siblings, 1 reply; 3+ messages in thread
From: Kevin Buettner @ 2026-03-03 22:17 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom de Vries, Kevin Buettner
The watchpoint-unaligned.exp test requires both read and write
hardware watchpoints. s390x only supports write watchpoints, causing
one test failure when the rwatch command fails with "Target does not
support this type of hardware watchpoint."
Add a require for allow_hw_watchpoint_access_tests to skip this test on
architectures without read watchpoint support.
---
gdb/testsuite/gdb.base/watchpoint-unaligned.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.base/watchpoint-unaligned.exp b/gdb/testsuite/gdb.base/watchpoint-unaligned.exp
index d3bba6ae010..4b93dbf8234 100644
--- a/gdb/testsuite/gdb.base/watchpoint-unaligned.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-unaligned.exp
@@ -17,7 +17,7 @@
# Test inserting read watchpoints on unaligned addresses.
-require allow_hw_watchpoint_tests
+require allow_hw_watchpoint_tests allow_hw_watchpoint_access_tests
standard_testfile
if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
--
2.53.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gdb/testsuite: Skip gdb.base/watchpoint-unaligned.exp on s390x
2026-03-03 22:17 [PATCH] gdb/testsuite: Skip gdb.base/watchpoint-unaligned.exp on s390x Kevin Buettner
@ 2026-03-04 6:40 ` Tom de Vries
2026-03-11 0:36 ` Kevin Buettner
0 siblings, 1 reply; 3+ messages in thread
From: Tom de Vries @ 2026-03-04 6:40 UTC (permalink / raw)
To: Kevin Buettner, gdb-patches
On 3/3/26 11:17 PM, Kevin Buettner wrote:
> The watchpoint-unaligned.exp test requires both read and write
> hardware watchpoints. s390x only supports write watchpoints, causing
> one test failure when the rwatch command fails with "Target does not
> support this type of hardware watchpoint."
>
> Add a require for allow_hw_watchpoint_access_tests to skip this test on
> architectures without read watchpoint support.
Hi Kevin,
thanks for fixing this.
LGTM, with one nit.
While indeed the comment at the top mentions read watchpoints, the
test-case contains some hardcoded downgrading to regular watchpoints for
[istarget "s390*-*-*"], and consequently most of the test-case passes on
s390x.
It's only the last bit (which runs size8twice) that fails, so moving the
check here:
...
+ if {![allow_hw_watchpoint_access_tests]} {
+ continue
+ }
set cmd "rwatch"
...
is a more minimal fix, in the sense that it only skips the failing test.
Approved-By: Tom de Vries <tdevries@suse.de>
Thanks,
- Tom
> ---
> gdb/testsuite/gdb.base/watchpoint-unaligned.exp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gdb/testsuite/gdb.base/watchpoint-unaligned.exp b/gdb/testsuite/gdb.base/watchpoint-unaligned.exp
> index d3bba6ae010..4b93dbf8234 100644
> --- a/gdb/testsuite/gdb.base/watchpoint-unaligned.exp
> +++ b/gdb/testsuite/gdb.base/watchpoint-unaligned.exp
> @@ -17,7 +17,7 @@
>
> # Test inserting read watchpoints on unaligned addresses.
>
> -require allow_hw_watchpoint_tests
> +require allow_hw_watchpoint_tests allow_hw_watchpoint_access_tests
>
> standard_testfile
> if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] gdb/testsuite: Skip gdb.base/watchpoint-unaligned.exp on s390x
2026-03-04 6:40 ` Tom de Vries
@ 2026-03-11 0:36 ` Kevin Buettner
0 siblings, 0 replies; 3+ messages in thread
From: Kevin Buettner @ 2026-03-11 0:36 UTC (permalink / raw)
To: gdb-patches; +Cc: Tom de Vries
On Wed, 4 Mar 2026 07:40:18 +0100
Tom de Vries <tdevries@suse.de> wrote:
> While indeed the comment at the top mentions read watchpoints, the
> test-case contains some hardcoded downgrading to regular watchpoints for
> [istarget "s390*-*-*"], and consequently most of the test-case passes on
> s390x.
>
> It's only the last bit (which runs size8twice) that fails, so moving the
> check here:
> ...
> + if {![allow_hw_watchpoint_access_tests]} {
> + continue
> + }
> set cmd "rwatch"
> ...
> is a more minimal fix, in the sense that it only skips the failing test.
>
> Approved-By: Tom de Vries <tdevries@suse.de>
Agreed; that is a better way to do it. After testing, this is what I pushed:
gdb/testsuite: Skip rwatch in watchpoint-unaligned.exp on s390x
The watchpoint-unaligned.exp test requires both read and write
hardware watchpoints. s390x only supports write watchpoints, causing
one test failure when the rwatch command fails with "Target does not
support this type of hardware watchpoint."
This commit causes the test using the rwatch command in this file to
be skipped when allow_hw_watchpoint_access_tests is false.
Co-Authored-By: Tom de Vries <tdevries@suse.de>
Approved-By: Tom de Vries <tdevries@suse.de>
diff --git a/gdb/testsuite/gdb.base/watchpoint-unaligned.exp b/gdb/testsuite/gdb.base/watchpoint-unaligned.exp
index d3bba6ae010..8b929e5de4e 100644
--- a/gdb/testsuite/gdb.base/watchpoint-unaligned.exp
+++ b/gdb/testsuite/gdb.base/watchpoint-unaligned.exp
@@ -219,6 +219,9 @@ foreach_with_prefix fun { write_size8twice read_size8twice } {
if { $fun == "write_size8twice" } {
set cmd "watch"
} else {
+ if {![allow_hw_watchpoint_access_tests]} {
+ continue
+ }
set cmd "rwatch"
}
foreach_with_prefix offset { 0 1 } {
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-03-11 0:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-03-03 22:17 [PATCH] gdb/testsuite: Skip gdb.base/watchpoint-unaligned.exp on s390x Kevin Buettner
2026-03-04 6:40 ` Tom de Vries
2026-03-11 0:36 ` Kevin Buettner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox