From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: <gdb-patches@sourceware.org>
Subject: [PATCH] Skip gdb.base/break.exp catchpoint tests without catchpoints [PR34535]
Date: Thu, 20 Aug 2026 16:12:59 +0200 [thread overview]
Message-ID: <yddse48j2xg.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)
[-- Attachment #1: Type: text/plain, Size: 910 bytes --]
As detailed in PR PR testsuite/34535, the gdb.base/break.exp test FAILs
on Solaris:
FAIL: gdb.base/break.exp: test_no_break_on_catchpoint: continue until exit (the program exited)
warning: Error inserting catchpoint 2: Your system does not support this type of catchpoint.
warning: Error inserting catchpoint 3: Your system does not support this type of catchpoint.
warning: Error inserting catchpoint 4: Your system does not support this type of catchpoint.
This patch checks for that condition and skips the test if necessary.
Tested on x86_64-pc-solaris2.11, sparcv9-sun-solaris2.11, and
x86_64-pc-linux-gnu.
Ok for trunk?
While this patch avoids the failure, I wonder if there's some document
on what it takes to actually implement catchpoints.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sol2-break-no-catchpoint.patch --]
[-- Type: text/x-patch, Size: 1249 bytes --]
# HG changeset patch
# Parent 8ed1f8219b70efa33fd9525699d984918e07bc4c
Skip gdb.base/break.exp catchpoint tests without catchpoints [PR34535]
diff --git a/gdb/testsuite/gdb.base/break.exp b/gdb/testsuite/gdb.base/break.exp
--- a/gdb/testsuite/gdb.base/break.exp
+++ b/gdb/testsuite/gdb.base/break.exp
@@ -455,6 +455,33 @@ test_tbreak
# inappropriately. (There are no calls to those system functions
# in this test program.)
+set fork_catchpoints_supported 0
+
+proc probe_fork_catchpoint {} {
+ clean_restart break
+
+ if {![runto_main]} {
+ return
+ }
+
+ gdb_test "catch fork" "Catchpoint.*fork.*"
+
+ gdb_run_cmd
+
+ set test "probe fork catchpoint"
+ gdb_test_multiple "" $test {
+ -re "Your system does not support this type.*" {
+ unsupported $test
+ }
+ -re "$::gdb_prompt $" {
+ set ::fork_catchpoints_supported 1
+ pass $test
+ }
+ }
+}
+
+probe_fork_catchpoint
+
proc_with_prefix test_no_break_on_catchpoint {} {
clean_restart break
@@ -462,6 +489,10 @@ proc_with_prefix test_no_break_on_catchp
return
}
+ if {!$::fork_catchpoints_supported} {
+ return
+ }
+
gdb_test "catch fork" "Catchpoint ${::decimal} \\(fork\\)" \
"set catch fork, never expected to trigger"
next reply other threads:[~2026-08-20 14:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-20 14:12 Rainer Orth [this message]
2026-08-21 15:16 ` Tom Tromey
2026-08-22 20:14 ` [PATCH v2] Handle missing catchpoint support in gdb.base/break.exp [PR34535] Rainer Orth
2026-08-27 15:33 ` Tom Tromey
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=yddse48j2xg.fsf@CeBiTec.Uni-Bielefeld.DE \
--to=ro@cebitec.uni-bielefeld.de \
--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