* [PATCH] GDB: testsuite: Fix proc return value in gdb.python/py-prettyprint.exp
@ 2026-04-26 4:18 Thiago Jung Bauermann
2026-04-28 13:57 ` Tom Tromey
0 siblings, 1 reply; 3+ messages in thread
From: Thiago Jung Bauermann @ 2026-04-26 4:18 UTC (permalink / raw)
To: gdb-patches
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] GDB: testsuite: Fix proc return value in gdb.python/py-prettyprint.exp
2026-04-26 4:18 [PATCH] GDB: testsuite: Fix proc return value in gdb.python/py-prettyprint.exp Thiago Jung Bauermann
@ 2026-04-28 13:57 ` Tom Tromey
2026-04-28 17:35 ` Thiago Jung Bauermann
0 siblings, 1 reply; 3+ messages in thread
From: Tom Tromey @ 2026-04-28 13:57 UTC (permalink / raw)
To: Thiago Jung Bauermann; +Cc: gdb-patches
>>>>> "Thiago" == Thiago Jung Bauermann <thiago.bauermann@linaro.org> writes:
Thiago> The callers of the procedure run_lang_tests expect it to return -1 in
Thiago> case of error but in the case where runto_main fails, it will return
Thiago> without any value. Make it return -1 in that case as well.
Ok.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] GDB: testsuite: Fix proc return value in gdb.python/py-prettyprint.exp
2026-04-28 13:57 ` Tom Tromey
@ 2026-04-28 17:35 ` Thiago Jung Bauermann
0 siblings, 0 replies; 3+ messages in thread
From: Thiago Jung Bauermann @ 2026-04-28 17:35 UTC (permalink / raw)
To: Tom Tromey; +Cc: gdb-patches
Tom Tromey <tom@tromey.com> writes:
>>>>>> "Thiago" == Thiago Jung Bauermann <thiago.bauermann@linaro.org> writes:
>
> Thiago> The callers of the procedure run_lang_tests expect it to return -1 in
> Thiago> case of error but in the case where runto_main fails, it will return
> Thiago> without any value. Make it return -1 in that case as well.
>
> Ok.
> Approved-By: Tom Tromey <tom@tromey.com>
Thanks! Pushed as commit 721db7bd56d8.
--
Thiago
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-04-28 17:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-04-26 4:18 [PATCH] GDB: testsuite: Fix proc return value in gdb.python/py-prettyprint.exp Thiago Jung Bauermann
2026-04-28 13:57 ` Tom Tromey
2026-04-28 17:35 ` Thiago Jung Bauermann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox