Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [pushed] [gdb/testsuite] Fix FAIL in gdb.replay/missing-thread.exp
@ 2026-11-01  8:25 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2026-11-01  8:25 UTC (permalink / raw)
  To: gdb-patches

With test-case gdb.replay/missing-thread.exp, normally I get:
...
(gdb) continue
Continuing.
[New Thread 296712.296713 (id 2)]
[Thread 296712.296713 (id 2) exited]
warning: command aborted, Thread 296712.296713 unexpectedly exited after \
  signal stop event
(gdb) PASS: $exp: non_stop=on: missing 1 thread log: replay_with_log: continue
Remote communication error.  Target disconnected: error while reading: \
  Connection reset by peer.
(gdb) disconnect
You can't do that when your target is `exec'
(gdb) PASS: $exp: non_stop=on: missing 1 thread log: replay_with_log: \
  disconnect after seeing signal
...

But with target board readmore, instead I get:
...
(gdb) continue
Continuing.
[New Thread 298264.298265 (id 2)]
[Thread 298264.298265 (id 2) exited]
warning: command aborted, Thread 298264.298265 unexpectedly exited after \
  signal stop event
(gdb) Remote communication error.  Target disconnected: error while reading: \
  Connection reset by peer.
(gdb) FAIL: $exp: non_stop=on: missing 1 thread log: replay_with_log: continue
disconnect
You can't do that when your target is `exec'
(gdb) PASS: $exp: non_stop=on: missing 1 thread log: replay_with_log: \
  disconnect after seeing signal
...

Fix this using -no-prompt-anchor.

A pre-existing particularity here is that this:
...
    gdb_test "disconnect" ".*" \
	"disconnect after seeing signal"
...
is consuming two prompts in this scenario, but I'm considering this an
orthogonal issue.

Tested on x86_64-linux with make-check-all.sh.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33866
---
 gdb/testsuite/gdb.replay/missing-thread.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.replay/missing-thread.exp b/gdb/testsuite/gdb.replay/missing-thread.exp
index 23bbddac556..5c124a49b8e 100644
--- a/gdb/testsuite/gdb.replay/missing-thread.exp
+++ b/gdb/testsuite/gdb.replay/missing-thread.exp
@@ -165,7 +165,7 @@ proc_with_prefix replay_with_log { remote_log expect_error non_stop } {
 	    lappend expected_output "\\\[Switching to thread \[^\r\n\]+\\\]"
 	}
 
-	gdb_test "continue" [multi_line {*}$expected_output]
+	gdb_test -no-prompt-anchor "continue" [multi_line {*}$expected_output]
     } else {
 	# This is the original behaviour, we see this when running
 	# with the unmodified log.

base-commit: 73c65d24f376c5cf2b5418dede6836aaf9d5ebfb
-- 
2.51.0


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

only message in thread, other threads:[~2026-11-01  8:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-01  8:25 [pushed] [gdb/testsuite] Fix FAIL in gdb.replay/missing-thread.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