public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [pushed] [gdb/testsuite] Handle output after prompt in gdb.threads/step-N-all-progress.exp
@ 2023-06-07  9:37 Tom de Vries
  0 siblings, 0 replies; only message in thread
From: Tom de Vries @ 2023-06-07  9:37 UTC (permalink / raw)
  To: gdb-patches

Using "taskset -c 0" I run into this timeout:
...
(gdb) PASS: gdb.threads/step-N-all-progress.exp: non-stop=on: \
  target-non-stop=on: continue to breakpoint: break here
next 3^M
[New Thread 0x7ffff7dbd6c0 (LWP 10202)]^M
50        return 0;^M
(gdb) [Thread 0x7ffff7dbd6c0 (LWP 10202) exited]^M
FAIL: gdb.threads/step-N-all-progress.exp: non-stop=on: target-non-stop=on: \
  next 3 (timeout)
...

The problem is that this test:
...
    gdb_test "next 3" "return 0;"
...
expects no output after the prompt.

Fix this by using -no-prompt-anchor.

Tested on x86_64-linux.
---
 gdb/testsuite/gdb.threads/step-N-all-progress.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.threads/step-N-all-progress.exp b/gdb/testsuite/gdb.threads/step-N-all-progress.exp
index 98cc8423f34..485028d34e7 100644
--- a/gdb/testsuite/gdb.threads/step-N-all-progress.exp
+++ b/gdb/testsuite/gdb.threads/step-N-all-progress.exp
@@ -44,7 +44,7 @@ proc test {non-stop target-non-stop} {
 
     gdb_continue_to_breakpoint "break here"
 
-    gdb_test "next 3" "return 0;"
+    gdb_test -no-prompt-anchor "next 3" "return 0;"
 }
 
 foreach_with_prefix non-stop {off on} {

base-commit: c6cad198b15e90df947921b58a0f052635050b4d
-- 
2.35.3


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

only message in thread, other threads:[~2023-06-07  9:37 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-07  9:37 [pushed] [gdb/testsuite] Handle output after prompt in gdb.threads/step-N-all-progress.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).