From: Thiago Jung Bauermann <thiago.bauermann@linaro.org>
To: gdb-patches@sourceware.org
Subject: [PATCH] GDB: testsuite: Fix proc return value in gdb.python/py-prettyprint.exp
Date: Sun, 26 Apr 2026 01:18:34 -0300 [thread overview]
Message-ID: <20260426041834.2414288-1-thiago.bauermann@linaro.org> (raw)
The callers of the procedure run_lang_tests expect it to return -1 in
case of error but in the case where runto_main fails, it will return
without any value. Make it return -1 in that case as well.
Found by code inspection.
---
gdb/testsuite/gdb.python/py-prettyprint.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.python/py-prettyprint.exp b/gdb/testsuite/gdb.python/py-prettyprint.exp
index ca189a403298..ab31928fa778 100644
--- a/gdb/testsuite/gdb.python/py-prettyprint.exp
+++ b/gdb/testsuite/gdb.python/py-prettyprint.exp
@@ -40,7 +40,7 @@ proc run_lang_tests {exefile lang} {
gdb_load $exefile
if {![runto_main]} {
- return
+ return -1
}
gdb_test_no_output "set print pretty on"
base-commit: 680fc384d6e9000722f822e53aa8fb80491d59c6
next reply other threads:[~2026-04-26 4:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-26 4:18 Thiago Jung Bauermann [this message]
2026-04-28 13:57 ` Tom Tromey
2026-04-28 17:35 ` Thiago Jung Bauermann
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=20260426041834.2414288-1-thiago.bauermann@linaro.org \
--to=thiago.bauermann@linaro.org \
--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