]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
GDB: testsuite: Fix proc return value in gdb.python/py-prettyprint.exp master
authorThiago Jung Bauermann <thiago.bauermann@linaro.org>
Sun, 26 Apr 2026 04:15:00 +0000 (01:15 -0300)
committerThiago Jung Bauermann <thiago.bauermann@linaro.org>
Tue, 28 Apr 2026 17:32:50 +0000 (14:32 -0300)
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.

Approved-By: Tom Tromey <tom@tromey.com>
gdb/testsuite/gdb.python/py-prettyprint.exp

index ca189a40329816ddb7eba3beed06ceb7a55b93b9..ab31928fa7785d2b0a1beb4fda80089ab7e3472a 100644 (file)
@@ -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"