From: Tom de Vries <tdevries@suse.de>
To: gdb-patches@sourceware.org
Subject: [pushed 1/3] [gdb/testsuite] Handle help() timeout in gdb.python/python.exp
Date: Sun, 1 Nov 2026 15:07:47 +0100 [thread overview]
Message-ID: <20261101140752.548879-2-tdevries@suse.de> (raw)
In-Reply-To: <20261101140752.548879-1-tdevries@suse.de>
I ran into the following timeout in test-case gdb.python/python.exp:
...
(gdb) python
>help()
>end
FAIL: $exp: python interactive help: python; help(); end (timeout)
define zzq
Welcome to Python 3.13's help utility! If this is your first time using
Python, you should definitely check out the tutorial at
https://docs.python.org/3.13/tutorial/.
Enter the name of any module, keyword, or topic to get help on writing
Python programs and using Python modules. To get a list of available
modules, keywords, symbols, or topics, enter "modules", "keywords",
"symbols", or "topics".
Each module also comes with a one-line summary of what it does; to list
the modules whose name or summary contain a given string such as "spam",
enter "modules spam".
To quit this help utility and return to the interpreter,
enter "q", "quit" or "exit".
help> No Python documentation found for 'define zzq'.
...
The timeout means that gdb is stuck at the "help>" prompt, making all the
following tests fail.
Fix this using a clean_restart.
---
gdb/testsuite/gdb.python/python.exp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gdb/testsuite/gdb.python/python.exp b/gdb/testsuite/gdb.python/python.exp
index 63225cff8c6..3adbef72001 100644
--- a/gdb/testsuite/gdb.python/python.exp
+++ b/gdb/testsuite/gdb.python/python.exp
@@ -74,6 +74,10 @@ with_test_prefix "python interactive help" {
}
}
+# A timeout in the previous test would have gdb stuck at the "help>" prompt,
+# causing all following tests to fail. Start a clean session.
+clean_restart
+
gdb_test_multiline "show python command" \
"define zzq" "Type commands for definition of .* just \"end\"\\.*" \
"python" "" \
--
2.51.0
next prev parent reply other threads:[~2026-11-01 14:09 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-01 14:07 [pushed 0/3] [gdb/testsuite] A few fixes " Tom de Vries
2026-11-01 14:07 ` Tom de Vries [this message]
2026-11-01 14:07 ` [pushed 2/3] [gdb/testsuite] Fix remote host confusion " Tom de Vries
2026-11-01 14:07 ` [pushed 3/3] [gdb/testsuite] Disable part of gdb.python/python.exp for !readline_is_used 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=20261101140752.548879-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