]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
GDB: testsuite: Python: Don't return 0 from top-level (sed)
authorThiago Jung Bauermann <thiago.bauermann@linaro.org>
Wed, 29 Apr 2026 23:04:14 +0000 (20:04 -0300)
committerThiago Jung Bauermann <thiago.bauermann@linaro.org>
Fri, 8 May 2026 21:55:59 +0000 (18:55 -0300)
This patch is purely the result of running:

$ sed -i 's/^    return -1/    return/' *.exp*

inside gdb/testsuite/gdb.python.  A couple of false positives weren't
included.

Approved-By: Tom Tromey <tom@tromey.com>
27 files changed:
gdb/testsuite/gdb.python/lib-types.exp
gdb/testsuite/gdb.python/py-as-string.exp
gdb/testsuite/gdb.python/py-block.exp
gdb/testsuite/gdb.python/py-caller-is.exp
gdb/testsuite/gdb.python/py-cmd.exp
gdb/testsuite/gdb.python/py-commands-breakpoint.exp
gdb/testsuite/gdb.python/py-connection.exp
gdb/testsuite/gdb.python/py-error.exp
gdb/testsuite/gdb.python/py-finish-breakpoint2.exp
gdb/testsuite/gdb.python/py-frame-inline.exp
gdb/testsuite/gdb.python/py-frame.exp
gdb/testsuite/gdb.python/py-inferior.exp
gdb/testsuite/gdb.python/py-infthread.exp
gdb/testsuite/gdb.python/py-missing-objfile.exp
gdb/testsuite/gdb.python/py-objfile.exp
gdb/testsuite/gdb.python/py-pending-frame-level.exp
gdb/testsuite/gdb.python/py-rbreak.exp
gdb/testsuite/gdb.python/py-recurse-unwind.exp
gdb/testsuite/gdb.python/py-shared.exp
gdb/testsuite/gdb.python/py-strfns.exp
gdb/testsuite/gdb.python/py-symbol.exp
gdb/testsuite/gdb.python/py-symtab.exp
gdb/testsuite/gdb.python/py-unwind-inline.exp
gdb/testsuite/gdb.python/py-unwind-user-regs.exp
gdb/testsuite/gdb.python/py-unwind.exp
gdb/testsuite/gdb.python/py-value.exp
gdb/testsuite/gdb.python/python.exp

index aa281c6443d540278c06dc318c3cfdf38a3611ef..d2e7d391a779f6027b7a1868d49fc87626552865 100644 (file)
@@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
 }
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_test_no_output "python import gdb.types"
index 3dc858db1adab5f8d0a21cf1c2a826bfd5be271a..41cefbe0411fd89f0067ef21ebcfa9d475dd4bd8 100644 (file)
@@ -27,7 +27,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
 }
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 proc test_as_string { } {
index b0123c4d3b5787b96557a005fdffda6a0757a696..30983ac35f259ed3a13b6389f6f885ae670bf13a 100644 (file)
@@ -27,7 +27,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
 }
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 global hex decimal
index e195e42a8ca603b9a9860d1bf2e0f4fbd6742ae8..d9b826cb6a23933f850dd3c9a1d9e86e16dab806 100644 (file)
@@ -27,7 +27,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
 }
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_breakpoint "bottom_func"
index 766a594d2f49e3cee799663862305c7c803f167b..0bda3cdc934ce0a8e5118dcd525a76f4c62fc32d 100644 (file)
@@ -27,7 +27,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
 }
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 # Test a simple command.
index 2b3842c816f6016e4d4e1aa97ea4fff063763cd1..1afb41c80ea275cc087b644aed49d8aadbfe8054 100644 (file)
@@ -26,7 +26,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
 }
 
 if { ![runto_main] } {
-    return 0
+    return
 }
 
 set host_python_file \
index e520e91368aac63111dd9367dc99c1a8e3094516..7f3b46eff797732ccb13fe2ca7e34bb79b4cd8db 100644 (file)
@@ -29,7 +29,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
 }
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 if { [target_info exists gdb_protocol] } {
index 583e63571a4a70a0d96e82e6bf0df1faabc459ca..3285746a47ca921e5c313b3a82d4d56cec8d7b0f 100644 (file)
@@ -44,7 +44,7 @@ gdb_test_multiple $test $test {
 }
 
 if {$test2 == ""} {
-    return 0
+    return
 }
 
 set remote_python_file [gdb_remote_download host \
index d782c577cfc1c6c9ab2de5e8a8b8c334cba201bd..9fa3faa7b9f581a5c3586c6047f9daf5febaabb0 100644 (file)
@@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} {
 }
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 set pyfile [gdb_remote_download host \
index a44136990c0215a0c8a92598832563d234c93ee7..c90aed09e677f64973d76f44cb8a43a61f0b92a3 100644 (file)
@@ -24,7 +24,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
 }
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_breakpoint [gdb_get_line_number "break-here"]
index 92a0ef3f7ebbe229993d38505a1fbcb7e54d5883..ca350cf03c2d63124d5d0b02efe68489fa4a4e14 100644 (file)
@@ -29,7 +29,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
 # The following tests require execution.
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_breakpoint [gdb_get_line_number "Block break here."]
@@ -210,7 +210,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {}] } {
 }
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 # Test if Frame.static_link works for a frame without debug info.
index 8479427f726acb099aa1ebdca00a5e448787c515..f69ad8fc0d8d660f533075b190c9bd3347c07b58 100644 (file)
@@ -62,7 +62,7 @@ gdb_test "python \
 # The following tests require execution.
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 # The most recently added inferior.
index 65ccc8f9a9e89720356bf4283474d339b474f4ab..93022e8ade3b97a4610ebc8e074038ca6a638248 100644 (file)
@@ -40,7 +40,7 @@ gdb_test_multiline "install new_thread event handler" \
 # The following tests require execution.
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_test "python print(seen_a_thread)" "True"
index e5e086130b004a77f1d0774c8e3c684e48a14e08..907bdec76f4bc70232cc4377f757163830f783e5 100644 (file)
@@ -56,7 +56,7 @@ set remote_python_file \
 set corefile [core_find $binfile {}]
 if {$corefile == ""} {
     unsupported "core file not generated"
-    return 0
+    return
 }
 
 # Create a directory named DIRNAME for use as the
index 0127b82936cb5dc7c55469bc26494734598bf418..64c6260293000f30562f92a3020e71951a05c4ee 100644 (file)
@@ -27,7 +27,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
 }
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 set python_error_text "Error occurred in Python.*"
@@ -120,7 +120,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile}2 ${srcfile} {nodebug l
 }
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_py_test_silent_cmd "python objfile = gdb.objfiles()\[0\]" \
index 204c7c36c54b0115fe82cba2aceeaa3eda043a3a..0e10b8065d1658c05c68e447afd50053ac748aba 100644 (file)
@@ -26,7 +26,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
 }
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
index eead513caeb2e7ee07ff01bca325b53a59fca174..ba02758ae79832f112396155bc0893dc48180054 100644 (file)
@@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" ${testfile} [list $srcfile $srcfile
 }
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_test_no_output "nosharedlibrary"
index 4df47a6e8b4b1872c905c2b9d953a200beb48a24..25cefc9b87ed86ef9132116c7d8b2fa3cef27317 100644 (file)
@@ -40,7 +40,7 @@ gdb_test "source ${pyfile}" "Python script imported" \
 # The following tests require execution.
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 
index 0eef359d0b87b7f043f5654c5288662ff9df9031..ff47270c07173386cf93b1f5f231548382123711 100644 (file)
@@ -44,7 +44,7 @@ gdb_load_shlib ${library}
 # The following tests require execution.
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 runto [gdb_get_line_number "Break to end."]
index 539ba984db028d0044dd07cf6b1910536bcfe9d7..3a8610a971ed3942b9fa0816c3ce4d989153bcef 100644 (file)
@@ -27,7 +27,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
 }
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 proc test_all_strfns { } {
index 90e724ca0313235374a2d4ac7b98f1846b4df204..af187857176a5c7a302279b94d2b0d89ff7a4466 100644 (file)
@@ -90,7 +90,7 @@ gdb_test "python print (gdb.lookup_static_symbol ('qq') is None)" \
     "True" "lookup_static_symbol for global var"
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 global hex decimal
@@ -205,7 +205,7 @@ gdb_test "python print (gdb.lookup_static_symbol ('(anonymous namespace)::anon')
     "10" "print value of anon"
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_breakpoint [gdb_get_line_number "Break in class."]
@@ -233,7 +233,7 @@ gdb_test "python print (cplusfunc.addr_class == gdb.SYMBOL_LOC_BLOCK)" "True" "t
 # Start with a fresh gdb.
 clean_restart ${::testfile}
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_breakpoint [gdb_get_line_number "Break at end."]
index 786bdc75fc4d5a7ce03d52ffe822bbef37715966..b5dd0c26988e6e6936a69d9fc8b7e61ca8adbd39 100644 (file)
@@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
 }
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 set debug_types [debug_types]
index ef9b00eccc8bb6c5d7a29ebcfc5a095a95a1356f..d7d82913f61aa1e2e6cec9b088a8ebff3b9453cc 100644 (file)
@@ -29,7 +29,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \
 
 # The following tests require execution.
 if {![runto_main]} {
-    return 0
+    return
 }
 
 set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
index c594bf74ceef383388d9bff71ce8f52a7f0350ce..248996c51615172153c17bc7acdeb93a21591ef8 100644 (file)
@@ -47,7 +47,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } {
 }
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py]
index 058caaf1efc79a7639fabea6ec1f512409c330b9..af864dceedfd2d621e180f18e3213d34bfeeae51 100644 (file)
@@ -37,7 +37,7 @@ require is_x86_64_m64_target
 # The following tests require execution.
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 # Check for the corrupt backtrace.
index 3746a6cbc0bce8d76087f965159607bd012fa360..4337928ddef49f6833f7066710f2b69276eb371e 100644 (file)
@@ -821,7 +821,7 @@ test_add_to_history
 # The following tests require execution.
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 test_unavailable
index f2f32019e4c2d4c2a802648726a6512080de9b7d..7d3cd299bc8cf04cd017f59bbb46fad474079be5 100644 (file)
@@ -210,7 +210,7 @@ clean_restart ${testfile}
 # The following tests require execution.
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 set lineno [gdb_get_line_number "Break to end."]
@@ -424,7 +424,7 @@ clean_restart ${testfile}
 # The following tests require execution.
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 # print-stack settings
@@ -479,7 +479,7 @@ clean_restart ${testfile}
 # The following tests require execution.
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 runto [gdb_get_line_number "Break at func2 call site."]