From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed] [gdb/testsuite] Fix FAIL in gdb.replay/missing-thread.exp
Date: Sun, 1 Nov 2026 09:25:14 +0100 [thread overview]
Message-ID: <20261101082514.327850-1-tdevries@suse.de> (raw)
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
reply other threads:[~2026-11-01 8:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261101082514.327850-1-tdevries@suse.de \
--to=tdevries@suse.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