Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH 2/2] [gdb/testsuite] Fix timeout in gdb.threads/vfork-multi-inferior.exp
Date: Thu, 23 Jul 2026 13:40:42 +0200	[thread overview]
Message-ID: <20260723114042.703464-3-tdevries@suse.de> (raw)
In-Reply-To: <20260723114042.703464-1-tdevries@suse.de>

With test-case gdb.threads/vfork-multi-inferior.exp I get either:
...
(gdb) run &
Starting program: vfork-multi-inferior-sleep
(gdb) PASS: $exp: method=non-stop: run inferior 2
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
inferior 1
[Switching to inferior 1 [<null>] (<noexec>)]
(gdb) PASS: $exp: method=non-stop: inferior 1
...
or:
...
(gdb) run &
Starting program: vfork-multi-inferior-sleep
(gdb) PASS: $exp: method=non-stop: run inferior 2
inferior 1^M
[Switching to inferior 1 [<null>] (<noexec>)]^M
(gdb) PASS: $exp: method=non-stop: inferior 1
[Thread debugging using libthread_db enabled]^M
Using host libthread_db library "/lib64/libthread_db.so.1".^M
...

With a 16.3-based package on aarch64-linux, I ran into:
...
(gdb) run &
Starting program: vfork-multi-inferior-sleep
(gdb) PASS: $exp: method=non-stop: run inferior 2
inferior 1
[Switching to inferior 1 [<null>] (<noexec>)]
(gdb) [Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
FAIL: $exp: method=non-stop: inferior 1
(timeout)
...

Unfortunately I have not been able to reproduce this.

Fix this using -no-prompt-anchor.

See also commit 5f69c00a6e0 ("[gdb/testsuite] Fix timeout in
gdb.base/async-shell.exp").

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=34427
---
 gdb/testsuite/gdb.threads/vfork-multi-inferior.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gdb/testsuite/gdb.threads/vfork-multi-inferior.exp b/gdb/testsuite/gdb.threads/vfork-multi-inferior.exp
index e258ec719e9..f6c90bf0655 100644
--- a/gdb/testsuite/gdb.threads/vfork-multi-inferior.exp
+++ b/gdb/testsuite/gdb.threads/vfork-multi-inferior.exp
@@ -86,7 +86,7 @@ proc do_test {method} {
     }
 
     # Start the first inferior.
-    gdb_test "inferior 1" "Switching to inferior 1 .*"
+    gdb_test -no-prompt-anchor "inferior 1" "Switching to inferior 1 .*"
     gdb_file_cmd ${::binfile}
     gdb_test "break should_break_here" "Breakpoint $::decimal at .*"
     gdb_test "start" "Thread 1.1 .* hit Temporary breakpoint.*" \
-- 
2.51.0


  parent reply	other threads:[~2026-07-23 11:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23 11:40 [PATCH 0/2] [gdb/testsuite] Two gdb.threads patches Tom de Vries
2026-07-23 11:40 ` [PATCH 1/2] [gdb/testsuite] Fix race in gdb.threads/leader-exit.exp Tom de Vries
2026-07-24 17:49   ` Keith Seitz
2026-07-25  7:03     ` Tom de Vries
2026-07-23 11:40 ` Tom de Vries [this message]
2026-07-24 17:52   ` [PATCH 2/2] [gdb/testsuite] Fix timeout in gdb.threads/vfork-multi-inferior.exp Keith Seitz

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=20260723114042.703464-3-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