public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] [gdb/testsuite] Add PR26286 kfail in gdb.threads/attach-many-short-lived-threads.exp
@ 2024-05-24  7:35 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2024-05-24  7:35 UTC (permalink / raw)
  To: gdb-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=db7814f3e5f0df1647d62d95f70285d41ec7585f

commit db7814f3e5f0df1647d62d95f70285d41ec7585f
Author: Tom de Vries <tdevries@suse.de>
Date:   Fri May 24 09:36:52 2024 +0200

    [gdb/testsuite] Add PR26286 kfail in gdb.threads/attach-many-short-lived-threads.exp
    
    When running test-case gdb.threads/attach-many-short-lived-threads.exp, I run
    regularly into PR26286:
    ...
    (gdb) continue^M
    Continuing.^M
    [LWP ... exited]^M
      ...
    [LWP ... exited]^M
    ^M
    Program terminated with signal SIGTRAP, Trace/breakpoint trap.^M
    The program no longer exists.^M
    (gdb) FAIL: gdb.threads/attach-many-short-lived-threads.exp: iter 9: \
      break at break_fn: 1
    ...
    
    Add a kfail for this, such that we have:
    ...
    (gdb) KFAIL: gdb.threads/attach-many-short-lived-threads.exp: iter 9: \
      break at break_fn: 1 (PRMS: threads/26286)
    ...
    
    Reviewed-By: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
    
    Tested on x86_64-linux.

Diff:
---
 .../attach-many-short-lived-threads.exp            | 25 +++++++++++++++++++++-
 1 file changed, 24 insertions(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp b/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp
index 6bee0ad2e2c..88834850042 100644
--- a/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp
+++ b/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp
@@ -141,9 +141,32 @@ proc test {} {
 	    # attach.
 	    sleep 2
 
+	    set re_pr26286 \
+		[multi_line \
+		     [string_to_regexp \
+			  "Program terminated with signal SIGTRAP, Trace/breakpoint trap."] \
+		     [string_to_regexp \
+			  "The program no longer exists."]]
+
 	    set bps 3
+	    set exited 0
 	    for {set bp 1} { $bp <= $bps } { incr bp } {
-		gdb_test "continue" "Breakpoint.*" "break at break_fn: $bp"
+		gdb_test_multiple "continue" "break at break_fn: $bp" {
+		    -re -wrap "$re_pr26286" {
+			kfail threads/26286 $gdb_test_name
+			set exited 1
+		    }
+		    -re -wrap "Breakpoint.*" {
+			pass $gdb_test_name
+		    }
+		}
+		if { $exited } {
+		    break
+		}
+	    }
+
+	    if { $exited } {
+		return
 	    }
 
 	    if {$attempt < $attempts} {

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-05-24  7:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-24  7:35 [binutils-gdb] [gdb/testsuite] Add PR26286 kfail in gdb.threads/attach-many-short-lived-threads.exp Tom de Vries

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).