From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [PATCH 1/2] [gdb/testsuite] Fix timeout in gdb.threads/inf-thr-count.exp
Date: Fri, 18 Apr 2025 11:23:55 +0200 [thread overview]
Message-ID: <20250418092356.4579-2-tdevries@suse.de> (raw)
In-Reply-To: <20250418092356.4579-1-tdevries@suse.de>
With test-case gdb.threads/inf-thr-count.exp, check-readmore and
READMORE_SLEEP=1000 I run into:
...
(gdb) set variable spin = 0^M
(gdb) ^M
Thread 1 "inf-thr-count" hit Breakpoint 2, breakpt () at /data/vries/gdb/src/gdb/testsuite/gdb.threads/inf-thr-count.c:49^M
49 }^M
FAIL: gdb.threads/inf-thr-count.exp: set 'spin' flag to allow main thread to exit (timeout)
PASS: gdb.threads/inf-thr-count.exp: wait for main thread to stop
...
Fix this by using -no-prompt-anchor.
Tested on x86_64-linux.
---
gdb/testsuite/gdb.threads/inf-thr-count.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.threads/inf-thr-count.exp b/gdb/testsuite/gdb.threads/inf-thr-count.exp
index d7a76874082..9f52655364a 100644
--- a/gdb/testsuite/gdb.threads/inf-thr-count.exp
+++ b/gdb/testsuite/gdb.threads/inf-thr-count.exp
@@ -163,7 +163,7 @@ gdb_test "with print thread-events on -- p \$_inferior_thread_count" \
# Set a variable in the inferior, this will cause the second thread to
# exit.
-gdb_test_no_output "set variable spin = 0" \
+gdb_test_no_output -no-prompt-anchor "set variable spin = 0" \
"set 'spin' flag to allow main thread to exit"
# When the second thread exits, the main thread joins with it, and
--
2.43.0
next prev parent reply other threads:[~2025-04-18 9:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-18 9:23 [PATCH 0/2] [gdb/testsuite] Fixes " Tom de Vries
2025-04-18 9:23 ` Tom de Vries [this message]
2025-04-18 9:23 ` [PATCH 2/2] [gdb/testsuite] Make gdb.threads/inf-thr-count.exp more readable Tom de Vries
2025-04-18 9:39 ` Andreas Schwab
2025-04-18 10:47 ` Tom de Vries
2025-04-18 16:57 ` Tom Tromey
2025-05-02 8:37 ` Tom de Vries
2025-05-02 8:31 ` Tom de Vries
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=20250418092356.4579-2-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