Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] Skip gdb.base/break.exp catchpoint tests without catchpoints [PR34535]
@ 2026-08-20 14:12 Rainer Orth
  2026-08-21 15:16 ` Tom Tromey
  0 siblings, 1 reply; 4+ messages in thread
From: Rainer Orth @ 2026-08-20 14:12 UTC (permalink / raw)
  To: gdb-patches

[-- 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"
 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-08-27 15:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-20 14:12 [PATCH] Skip gdb.base/break.exp catchpoint tests without catchpoints [PR34535] Rainer Orth
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox