]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
GDB: testsuite: threads: Don't return 0 from top-level (sed)
authorThiago Jung Bauermann <thiago.bauermann@linaro.org>
Wed, 29 Apr 2026 23:04:24 +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 a bit different than the others.  I noticed that
gdb.threads has many cases of "return 0" from the top level, so this
patch is purely the result of running:

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

inside gdb/testsuite/gdb.threads.

There were a number of false positives so not all sed changes were
incorporated.

Approved-By: Tom Tromey <tom@tromey.com>
22 files changed:
gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp
gdb/testsuite/gdb.threads/corethreads.exp
gdb/testsuite/gdb.threads/del-pending-thread-bp.exp
gdb/testsuite/gdb.threads/dlopen-libpthread.exp
gdb/testsuite/gdb.threads/hand-call-in-threads.exp
gdb/testsuite/gdb.threads/interrupted-hand-call.exp
gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.exp
gdb/testsuite/gdb.threads/pending-step.exp
gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.exp
gdb/testsuite/gdb.threads/queue-signal.exp
gdb/testsuite/gdb.threads/reconnect-signal.exp
gdb/testsuite/gdb.threads/stop-with-handle.exp
gdb/testsuite/gdb.threads/thread-unwindonsignal.exp
gdb/testsuite/gdb.threads/threadapply.exp
gdb/testsuite/gdb.threads/tls-nodebug-pie.exp
gdb/testsuite/gdb.threads/tls-shared.exp
gdb/testsuite/gdb.threads/tls-so_extern.exp
gdb/testsuite/gdb.threads/tls-var.exp
gdb/testsuite/gdb.threads/watchthreads-reorder.exp
gdb/testsuite/gdb.threads/watchthreads.exp
gdb/testsuite/gdb.threads/watchthreads2.exp
gdb/testsuite/gdb.threads/wp-replication.exp

index 0f1b141b1ea10b22e4d268453e550c7002ce57dc..6f51e607d77d659333ecd50e8c2770c44ab62c0c 100644 (file)
@@ -46,7 +46,7 @@ proc bad_dejagnu {} {
 
 if {[bad_dejagnu]} {
     unsupported "broken DejaGnu"
-    return 0
+    return
 }
 
 require can_spawn_for_attach
index 3749e3507bdc873e02cf874040bb11147ce9613d..4e520c5e8f22693e9b9708f3bdf724bc2e561e61 100644 (file)
@@ -30,7 +30,7 @@ if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executa
 set corefile [core_find $binfile]
 if {$corefile == ""} {
     untested "unable to create or find corefile"
-    return 0
+    return
 }
 
 clean_restart $executable
index 09a6f56a5660362bf327f2474665f7f13047031b..c318b38b472a80552628d82edda414d78d986b86 100644 (file)
@@ -45,7 +45,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
 gdb_locate_shlib $binfile_lib
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 # Run until we have two threads.
index 03ce0dd1612d3626bec504eba7a9276b160cfbcf..01f2186bcdc811f737dfad54443140bb09720052 100644 (file)
@@ -15,7 +15,7 @@
 
 require isnative allow_shlib_tests
 if {![istarget *-linux*]} {
-    return 0
+    return
 }
 
 load_lib prelink-support.exp
index f6d29720cc6f20139f3ebb70cca8908a194668cd..2f5eaa5405bffa7149231c9f74d75a1a5655d85e 100644 (file)
@@ -47,7 +47,7 @@ proc get_dummy_frame_number { } {
 clean_restart ${::testfile}
 
 if { ![runto_main] } {
-    return 0
+    return
 }
 
 gdb_test "break all_threads_running" \
index 23a3d038c09a3dd467f828d1685f9e6f202df30a..fe39b4ee9035372688ab2f0304e619b0544a02ad 100644 (file)
@@ -31,7 +31,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
 clean_restart ${::testfile}
 
 if { ![runto_main] } {
-    return 0
+    return
 }
 
 gdb_test "break all_threads_running" \
index 6852e8d7f8765e4bd30e188d85285550c69a619a..0647ff5cb76012a7ef4c9a3695138650ebdc70e7 100644 (file)
@@ -28,7 +28,7 @@ if {[prepare_for_testing "failed to prepare" \
 }
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_breakpoint $linenum
index c9ff1de32c89c801ae18b26ba45549ab70fe2cf6..a4fc5807167cf28980c870706cac59cc26e5e42f 100644 (file)
@@ -57,7 +57,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
 clean_restart ${::testfile}
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_breakpoint [gdb_get_line_number "insert breakpoint here"]
index 8ecacba59d5e22f24712cd0f330b60afd78f2ef0..80afd0e1f1a2b9f9942a44903671860216c80430 100644 (file)
@@ -26,7 +26,7 @@
 # required to reproduce the error with a misbehaving GDB.
 
 if { ![istarget "*-*-linux*"] } {
-    return 0
+    return
 }
 
 standard_testfile
index 905f47c1243b2e5ba0c0b68d86d597ccbb6c80a6..aaa5bc91818ab625124233cb7bb546c2f5c0b9fe 100644 (file)
@@ -51,7 +51,7 @@ gdb_test_multiple "bt" "determine thread functions" {
 # No point in continuing if we couldn't figure out which thread is which.
 if { $sigusr1_thread == 0 } {
     # FAIL already recorded.
-    return 0
+    return
 }
 
 # Advance each thread to where we want them one at a time.
index e1079f3d1feb6ed8d721f866f11bbe15d66250cf..f7a66ac844db5971e2cce0f9eed81a737aa0355b 100644 (file)
@@ -18,7 +18,7 @@
 set gdbserver_reconnect_p 1
 if { [info proc gdb_reconnect] == "" } {
     unsupported "requires gdbserver reconnect"
-    return 0
+    return
 }
 
 standard_testfile
@@ -35,7 +35,7 @@ if { [gdb_compile_pthreads \
 clean_restart $executable
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_test "continue" "signal SIGUSR1.*" "continue to signal"
@@ -67,7 +67,7 @@ if { [lindex $res 0] == 0 } {
     pass $test
 } else {
     fail $test
-    return 0
+    return
 }
 
 # Check that thread 2 is re-selected.
index de40a3f1e946ef9c06c2b2208eb010f30da608f5..be1d3860277813c5389714cbcc80d60b5077283b 100644 (file)
@@ -29,7 +29,7 @@ if {[prepare_for_testing "failed to prepare" \
 }
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 # Have SIGSTOP sent to the inferior.
index d77b323338cc869a13fbb7e363f0b37c76cd2d15..299d66b0516d1c50cad3f8fbfa28bceaab93a33c 100644 (file)
@@ -31,7 +31,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
 clean_restart ${::testfile}
 
 if { ![runto_main] } {
-    return 0
+    return
 }
 
 gdb_test "break all_threads_running" \
index f8827ae7ea65c253c0ee148ce5c1f114cf2f6309..7fdc647705a9b3c25b4b9be197782eae5ad2b429 100644 (file)
@@ -32,7 +32,7 @@ clean_restart ${::testfile}
 #
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 # Break after all threads have been started.
index 9d2a805c4a5fe8ab9549c3f0ebfbd190bdebd0fe..5e9c4ddd2e8b91240cab38d9daff20bce6b06efd 100644 (file)
@@ -22,7 +22,7 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executab
 
 clean_restart ${::testfile}
 if {![runto_main]} {
-    return 0
+    return
 }
 
 # Formerly: Cannot access memory at address 0xffffef7c0698
index a293809105d6793377d326d83c6b31aca8f575dc..2710145c9958e1d2db9ff63b334b86090c665fc4 100644 (file)
@@ -33,7 +33,7 @@ clean_restart ${::testfile}
 gdb_load_shlib ${binfile_lib}
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_test "print i_tls" "2" "print thread local storage variable"
index eb3f32df6210f9478f396cb14c55d09e8525dd52..f1c0b66ad9353dd0805c8ec58c99e91c48997e2e 100644 (file)
@@ -32,7 +32,7 @@ clean_restart ${::testfile}
 gdb_load_shlib ${binfile_lib}
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_test "print so_extern" "0x0" "print thread local storage variable"
index 5b2968a7bd01d4839b968ad54fe69a6c65e95b79..28d0886c6bfd59d6c86c77bbab21f34e8656c541 100644 (file)
@@ -28,7 +28,7 @@ if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${objfile} object {debug}] != "
 clean_restart ${executable}
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 # FAIL was: type = <thread local variable, no debug info>
index 58b16be70f26d5adbd9baa257930664a05d0824b..f56661d7a5c2f6a9d4c55be7b02654dea02df719 100644 (file)
@@ -27,7 +27,7 @@
 
 require allow_hw_watchpoint_access_tests allow_hw_watchpoint_multi_tests
 if {![istarget *-*-linux*]} {
-    return 0
+    return
 }
 
 standard_testfile
index e975e22e573036065b3c023385ef70dd9b91d3cb..2682db7b03285accc937517fa07942b1e219c5e3 100644 (file)
@@ -39,7 +39,7 @@ gdb_test_no_output "set can-use-hw-watchpoints 1" ""
 #
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 set args_0 0
index 49884f4136dd02b6adf2213d2d063f9c17f1c77c..0efef51b7fc69d13024373a4a5cd78d4bb4e46fb 100644 (file)
@@ -40,7 +40,7 @@ gdb_test_no_output "set can-use-hw-watchpoints 1" ""
 #
 
 if {![runto_main]} {
-    return 0
+    return
 }
 
 gdb_test "break thread_started" \
index 28a5071bd5e5d22398a962ecc3f05a9122f51871..cc9bc50f9b2e537f36e59d7a65b0b3d58479358a 100644 (file)
@@ -41,7 +41,7 @@ gdb_test_no_output "set can-use-hw-watchpoints 1" ""
 
 # Run to `main' where we begin our tests.
 if {![runto_main]} {
-    return 0
+    return
 }
 
 # Set some default values.