[binutils-gdb] GDB: testsuite: threads: Don't return -1 from top-level (sed)

Thiago Bauermann via Gdb-cvs <[email protected]>
Newsgroups gmane.comp.gdb.cvs
Message-ID <[email protected]>
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=01934c8a84f6de4db326b70b19f807810b2ef485

commit 01934c8a84f6de4db326b70b19f807810b2ef485
Author: Thiago Jung Bauermann <[email protected]>
Date:   Wed Apr 29 20:04:23 2026 -0300

    GDB: testsuite: threads: Don't return -1 from top-level (sed)
    
    This patch is purely the result of running:
    
    $ sed -i 's/^    return -1/    return/' *.exp*
    
    inside gdb/testsuite/gdb.threads.
    
    Approved-By: Tom Tromey <[email protected]>

Diff:
---
 gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp      | 2 +-
 gdb/testsuite/gdb.threads/async.exp                               | 2 +-
 gdb/testsuite/gdb.threads/attach-into-signal.exp                  | 4 ++--
 gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp     | 2 +-
 gdb/testsuite/gdb.threads/attach-non-stop.exp                     | 2 +-
 gdb/testsuite/gdb.threads/attach-slow-waitpid.exp                 | 2 +-
 gdb/testsuite/gdb.threads/attach-stopped.exp                      | 4 ++--
 gdb/testsuite/gdb.threads/bp_in_thread.exp                        | 2 +-
 gdb/testsuite/gdb.threads/break-while-running.exp                 | 2 +-
 gdb/testsuite/gdb.threads/check-libthread-db.exp                  | 2 +-
 gdb/testsuite/gdb.threads/clone-attach-detach.exp                 | 2 +-
 gdb/testsuite/gdb.threads/clone-new-thread-event.exp              | 4 ++--
 gdb/testsuite/gdb.threads/clone-thread_db.exp                     | 4 ++--
 gdb/testsuite/gdb.threads/continue-pending-after-query.exp        | 2 +-
 gdb/testsuite/gdb.threads/continue-pending-status.exp             | 4 ++--
 gdb/testsuite/gdb.threads/create-fail.exp                         | 2 +-
 gdb/testsuite/gdb.threads/current-lwp-dead.exp                    | 4 ++--
 gdb/testsuite/gdb.threads/del-pending-thread-bp.exp               | 4 ++--
 gdb/testsuite/gdb.threads/detach-step-over.exp                    | 4 ++--
 gdb/testsuite/gdb.threads/dlopen-libpthread.exp                   | 6 +++---
 gdb/testsuite/gdb.threads/execl.exp                               | 4 ++--
 gdb/testsuite/gdb.threads/fork-child-threads.exp                  | 2 +-
 gdb/testsuite/gdb.threads/fork-thread-pending.exp                 | 2 +-
 gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp     | 2 +-
 gdb/testsuite/gdb.threads/gcore-stale-thread.exp                  | 4 ++--
 gdb/testsuite/gdb.threads/gcore-thread.exp                        | 4 ++--
 gdb/testsuite/gdb.threads/hand-call-in-threads.exp                | 2 +-
 gdb/testsuite/gdb.threads/hand-call-new-thread.exp                | 2 +-
 gdb/testsuite/gdb.threads/ia64-sigill.exp                         | 4 ++--
 gdb/testsuite/gdb.threads/inf-thr-count.exp                       | 8 ++++----
 gdb/testsuite/gdb.threads/infcall-thread-announce.exp             | 4 ++--
 gdb/testsuite/gdb.threads/info-threads-cur-sal.exp                | 4 ++--
 gdb/testsuite/gdb.threads/info-threads-options.exp                | 4 ++--
 gdb/testsuite/gdb.threads/interrupt-while-step-over.exp           | 4 ++--
 gdb/testsuite/gdb.threads/interrupted-hand-call.exp               | 2 +-
 gdb/testsuite/gdb.threads/killed-outside.exp                      | 6 +++---
 gdb/testsuite/gdb.threads/killed.exp                              | 2 +-
 gdb/testsuite/gdb.threads/leader-exit.exp                         | 4 ++--
 gdb/testsuite/gdb.threads/linux-dp.exp                            | 2 +-
 gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp            | 2 +-
 gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp      | 2 +-
 gdb/testsuite/gdb.threads/manythreads.exp                         | 2 +-
 gdb/testsuite/gdb.threads/multi-create-ns-info-thr.exp            | 4 ++--
 gdb/testsuite/gdb.threads/multi-create.exp                        | 2 +-
 gdb/testsuite/gdb.threads/multiple-step-overs.exp                 | 2 +-
 gdb/testsuite/gdb.threads/names.exp                               | 2 +-
 gdb/testsuite/gdb.threads/next-bp-other-thread.exp                | 2 +-
 gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.exp    | 2 +-
 gdb/testsuite/gdb.threads/no-unwaited-for-left.exp                | 4 ++--
 gdb/testsuite/gdb.threads/non-ldr-exc-1.exp                       | 2 +-
 gdb/testsuite/gdb.threads/non-ldr-exc-2.exp                       | 2 +-
 gdb/testsuite/gdb.threads/non-ldr-exc-3.exp                       | 2 +-
 gdb/testsuite/gdb.threads/non-ldr-exc-4.exp                       | 2 +-
 gdb/testsuite/gdb.threads/non-ldr-exit.exp                        | 4 ++--
 gdb/testsuite/gdb.threads/non-stop-fair-events.exp                | 4 ++--
 gdb/testsuite/gdb.threads/omp-par-scope.exp                       | 4 ++--
 gdb/testsuite/gdb.threads/omp-task.exp                            | 4 ++--
 gdb/testsuite/gdb.threads/pending-step.exp                        | 2 +-
 gdb/testsuite/gdb.threads/print-threads.exp                       | 2 +-
 gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp      | 2 +-
 .../gdb.threads/process-exit-status-is-leader-exit-status.exp     | 2 +-
 gdb/testsuite/gdb.threads/pthread_cond_wait.exp                   | 2 +-
 gdb/testsuite/gdb.threads/pthreads.exp                            | 2 +-
 gdb/testsuite/gdb.threads/queue-signal.exp                        | 2 +-
 gdb/testsuite/gdb.threads/reconnect-signal.exp                    | 2 +-
 gdb/testsuite/gdb.threads/schedlock.exp                           | 2 +-
 gdb/testsuite/gdb.threads/siginfo-threads.exp                     | 4 ++--
 gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp        | 2 +-
 .../gdb.threads/signal-command-multiple-signals-pending.exp       | 2 +-
 gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp       | 2 +-
 gdb/testsuite/gdb.threads/signal-sigtrap.exp                      | 2 +-
 .../gdb.threads/signal-while-stepping-over-bp-other-thread.exp    | 4 ++--
 gdb/testsuite/gdb.threads/sigstep-threads.exp                     | 4 ++--
 gdb/testsuite/gdb.threads/sigthread.exp                           | 2 +-
 gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp       | 2 +-
 gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp       | 2 +-
 gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp       | 2 +-
 gdb/testsuite/gdb.threads/stepi-random-signal.exp                 | 4 ++--
 gdb/testsuite/gdb.threads/stop-with-handle.exp                    | 2 +-
 gdb/testsuite/gdb.threads/switch-threads.exp                      | 2 +-
 gdb/testsuite/gdb.threads/thread-bp-deleted.exp                   | 6 +++---
 gdb/testsuite/gdb.threads/thread-execl.exp                        | 2 +-
 gdb/testsuite/gdb.threads/thread-find.exp                         | 2 +-
 gdb/testsuite/gdb.threads/thread-specific-bp.exp                  | 2 +-
 gdb/testsuite/gdb.threads/thread-specific.exp                     | 2 +-
 gdb/testsuite/gdb.threads/thread-unwindonsignal.exp               | 2 +-
 gdb/testsuite/gdb.threads/thread_check.exp                        | 2 +-
 gdb/testsuite/gdb.threads/thread_events.exp                       | 2 +-
 gdb/testsuite/gdb.threads/threadapply.exp                         | 2 +-
 gdb/testsuite/gdb.threads/threadcrash.exp                         | 2 +-
 gdb/testsuite/gdb.threads/threxit-hop-specific.exp                | 2 +-
 gdb/testsuite/gdb.threads/tid-reuse.exp                           | 4 ++--
 gdb/testsuite/gdb.threads/tls-core.exp                            | 2 +-
 gdb/testsuite/gdb.threads/tls-nodebug-pie.exp                     | 2 +-
 gdb/testsuite/gdb.threads/tls-nodebug.exp                         | 2 +-
 gdb/testsuite/gdb.threads/tls-sepdebug.exp                        | 4 ++--
 gdb/testsuite/gdb.threads/tls-shared.exp                          | 2 +-
 gdb/testsuite/gdb.threads/tls-so_extern.exp                       | 2 +-
 gdb/testsuite/gdb.threads/tls-var.exp                             | 2 +-
 gdb/testsuite/gdb.threads/tls.exp                                 | 2 +-
 gdb/testsuite/gdb.threads/vfork-follow-child-exec.exp             | 2 +-
 gdb/testsuite/gdb.threads/vfork-follow-child-exit.exp             | 2 +-
 gdb/testsuite/gdb.threads/vfork-multi-inferior.exp                | 4 ++--
 gdb/testsuite/gdb.threads/watchthreads-reorder.exp                | 2 +-
 gdb/testsuite/gdb.threads/watchthreads.exp                        | 2 +-
 gdb/testsuite/gdb.threads/watchthreads2.exp                       | 4 ++--
 gdb/testsuite/gdb.threads/wp-replication.exp                      | 2 +-
 107 files changed, 147 insertions(+), 147 deletions(-)

diff --git a/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp b/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp
index 35da068db6b..d0db40c4be5 100644
--- a/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp
+++ b/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp
@@ -38,7 +38,7 @@
 standard_testfile
 
 if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
-    return -1
+    return
 }
 
 # The test proper.  NON_STOP indicates whether we're testing in
diff --git a/gdb/testsuite/gdb.threads/async.exp b/gdb/testsuite/gdb.threads/async.exp
index fa57796452f..2fe787f6bed 100644
--- a/gdb/testsuite/gdb.threads/async.exp
+++ b/gdb/testsuite/gdb.threads/async.exp
@@ -16,7 +16,7 @@
 standard_testfile
 
 if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
-    return -1
+    return
 }
 
 # At this point GDB will be busy handling the breakpoint hits and
diff --git a/gdb/testsuite/gdb.threads/attach-into-signal.exp b/gdb/testsuite/gdb.threads/attach-into-signal.exp
index 7c9c30036d2..2f682ebb073 100644
--- a/gdb/testsuite/gdb.threads/attach-into-signal.exp
+++ b/gdb/testsuite/gdb.threads/attach-into-signal.exp
@@ -121,7 +121,7 @@ proc corefunc { threadtype executable } {
 #
 if {[build_executable $testfile $executable_nothr $srcfile] == -1} {
     untested "attach-into-signal.exp (nonthreaded)"
-    return -1
+    return
 }
 
 corefunc nonthreaded ${executable_nothr}
@@ -130,7 +130,7 @@ corefunc nonthreaded ${executable_nothr}
 #
 if  { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" [standard_output_file ${executable_thr}] executable {debug additional_flags=-DUSE_THREADS}] != "" } {
     untested "attach-into-signal.exp (threaded)"
-    return -1
+    return
 }
 
 corefunc threaded ${executable_thr}
diff --git a/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp b/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp
index 16e33c027b0..0f1b141b1ea 100644
--- a/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp
+++ b/gdb/testsuite/gdb.threads/attach-many-short-lived-threads.exp
@@ -195,7 +195,7 @@ set options { "additional_flags=-DTIMEOUT=$timeout" debug pthreads }
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 $options] == -1} {
-    return -1
+    return
 }
 
 test
diff --git a/gdb/testsuite/gdb.threads/attach-non-stop.exp b/gdb/testsuite/gdb.threads/attach-non-stop.exp
index 3f55459e7ed..3d363398cc2 100644
--- a/gdb/testsuite/gdb.threads/attach-non-stop.exp
+++ b/gdb/testsuite/gdb.threads/attach-non-stop.exp
@@ -134,7 +134,7 @@ proc test {target_non_stop non_stop cmd} {
 }
 
 if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
-    return -1
+    return
 }
 
 foreach_with_prefix target-non-stop {"off" "on"} {
diff --git a/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp b/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp
index c71cd98501f..343a96bc511 100644
--- a/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp
+++ b/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp
@@ -98,7 +98,7 @@ if { [gdb_spawn_with_ld_preload $libobj] == -1 } {
     # Make sure we get UNTESTED rather than UNRESOLVED.
     set errcnt 0
     untested "Couldn't start GDB with preloaded lib"
-    return -1
+    return
 }
 
 # Load binary, and attach to running program.
diff --git a/gdb/testsuite/gdb.threads/attach-stopped.exp b/gdb/testsuite/gdb.threads/attach-stopped.exp
index 63a8f481e2e..2f84c6d77f2 100644
--- a/gdb/testsuite/gdb.threads/attach-stopped.exp
+++ b/gdb/testsuite/gdb.threads/attach-stopped.exp
@@ -79,7 +79,7 @@ proc corefunc { threadtype } {
 #
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
     untested "attach-stopped.exp (unthreaded)"
-    return -1
+    return
 }
 
 corefunc nonthreaded
@@ -88,7 +88,7 @@ corefunc nonthreaded
 #
 if  { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DUSE_THREADS}] != "" } {
     untested "attach-stopped.exp (threaded)"
-    return -1
+    return
 }
 
 corefunc threaded
diff --git a/gdb/testsuite/gdb.threads/bp_in_thread.exp b/gdb/testsuite/gdb.threads/bp_in_thread.exp
index 001eeaae6e9..07f5e2f1b80 100644
--- a/gdb/testsuite/gdb.threads/bp_in_thread.exp
+++ b/gdb/testsuite/gdb.threads/bp_in_thread.exp
@@ -21,7 +21,7 @@
 standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
-    return -1
+    return
 }
 
 clean_restart $::testfile
diff --git a/gdb/testsuite/gdb.threads/break-while-running.exp b/gdb/testsuite/gdb.threads/break-while-running.exp
index 9d500f38b14..c4ad127d982 100644
--- a/gdb/testsuite/gdb.threads/break-while-running.exp
+++ b/gdb/testsuite/gdb.threads/break-while-running.exp
@@ -25,7 +25,7 @@
 standard_testfile
 
 if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
-    return -1
+    return
 }
 
 # The test proper.  UPDATE_THREAD_LIST indicates whether we should do
diff --git a/gdb/testsuite/gdb.threads/check-libthread-db.exp b/gdb/testsuite/gdb.threads/check-libthread-db.exp
index 3e95d7e84a7..1110c1c848e 100644
--- a/gdb/testsuite/gdb.threads/check-libthread-db.exp
+++ b/gdb/testsuite/gdb.threads/check-libthread-db.exp
@@ -27,7 +27,7 @@ standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	 executable debug] != "" } {
-    return -1
+    return
 }
 
 # Case 1: libthread_db fakes a single thread with th_unique == NULL.
diff --git a/gdb/testsuite/gdb.threads/clone-attach-detach.exp b/gdb/testsuite/gdb.threads/clone-attach-detach.exp
index e3294b8c7bf..cd4544a8057 100644
--- a/gdb/testsuite/gdb.threads/clone-attach-detach.exp
+++ b/gdb/testsuite/gdb.threads/clone-attach-detach.exp
@@ -28,7 +28,7 @@ require can_spawn_for_attach
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug}]} {
-    return -1
+    return
 }
 
 set test_spawn_id [spawn_wait_for_attach $binfile]
diff --git a/gdb/testsuite/gdb.threads/clone-new-thread-event.exp b/gdb/testsuite/gdb.threads/clone-new-thread-event.exp
index 44f4f7e6310..2e49766f33d 100644
--- a/gdb/testsuite/gdb.threads/clone-new-thread-event.exp
+++ b/gdb/testsuite/gdb.threads/clone-new-thread-event.exp
@@ -21,11 +21,11 @@ if {![istarget *-*-linux*]} {
 }
 
 if { [prepare_for_testing "failed to prepare" clone-new-thread-event] } {
-    return -1
+    return
 }
 
 if { ![runto_main] } {
-    return -1
+    return
 }
 
 gdb_test "continue" \
diff --git a/gdb/testsuite/gdb.threads/clone-thread_db.exp b/gdb/testsuite/gdb.threads/clone-thread_db.exp
index a5a185ad9c8..77297a8e74b 100644
--- a/gdb/testsuite/gdb.threads/clone-thread_db.exp
+++ b/gdb/testsuite/gdb.threads/clone-thread_db.exp
@@ -23,11 +23,11 @@ if {![istarget *-*-linux*]} {
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test "break clone_fn" "Breakpoint.*at.*file.*$srcfile.*line.*"
diff --git a/gdb/testsuite/gdb.threads/continue-pending-after-query.exp b/gdb/testsuite/gdb.threads/continue-pending-after-query.exp
index 43f5bd368b1..97f9081443a 100644
--- a/gdb/testsuite/gdb.threads/continue-pending-after-query.exp
+++ b/gdb/testsuite/gdb.threads/continue-pending-after-query.exp
@@ -45,7 +45,7 @@
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
-    return -1
+    return
 }
 
 proc test {} {
diff --git a/gdb/testsuite/gdb.threads/continue-pending-status.exp b/gdb/testsuite/gdb.threads/continue-pending-status.exp
index 1ffa6fd3242..01fb61c3b52 100644
--- a/gdb/testsuite/gdb.threads/continue-pending-status.exp
+++ b/gdb/testsuite/gdb.threads/continue-pending-status.exp
@@ -22,11 +22,11 @@ require {!target_info exists gdb,nointerrupts}
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 set break_line [gdb_get_line_number "break here"]
diff --git a/gdb/testsuite/gdb.threads/create-fail.exp b/gdb/testsuite/gdb.threads/create-fail.exp
index b2528281b7e..c77ccab17ae 100644
--- a/gdb/testsuite/gdb.threads/create-fail.exp
+++ b/gdb/testsuite/gdb.threads/create-fail.exp
@@ -24,7 +24,7 @@ standard_testfile
 set executable ${testfile}
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    return -1
+    return
 }
 
 set iterations 10
diff --git a/gdb/testsuite/gdb.threads/current-lwp-dead.exp b/gdb/testsuite/gdb.threads/current-lwp-dead.exp
index 5c9aa76e9d9..272771114a3 100644
--- a/gdb/testsuite/gdb.threads/current-lwp-dead.exp
+++ b/gdb/testsuite/gdb.threads/current-lwp-dead.exp
@@ -30,11 +30,11 @@ if {![istarget *-*-linux*]} {
 }
 
 if { [prepare_for_testing "failed to prepare" current-lwp-dead] } {
-    return -1
+    return
 }
 
 if {[runto_main] <= 0} {
-    return -1
+    return
 }
 
 # Run to "fn" so that thread 2 is made current.
diff --git a/gdb/testsuite/gdb.threads/del-pending-thread-bp.exp b/gdb/testsuite/gdb.threads/del-pending-thread-bp.exp
index 1870adcde22..09a6f56a566 100644
--- a/gdb/testsuite/gdb.threads/del-pending-thread-bp.exp
+++ b/gdb/testsuite/gdb.threads/del-pending-thread-bp.exp
@@ -30,7 +30,7 @@ set binfile_lib [standard_output_file $libname.so]
 
 if { [gdb_compile_shlib $srcfile_lib $binfile_lib {}] != "" } {
     untested "failed to compile shared library 1"
-    return -1
+    return
 }
 
 set binfile_lib_target [gdb_download_shlib $binfile_lib]
@@ -39,7 +39,7 @@ if { [prepare_for_testing "failed to prepare" $testfile $srcfile \
 	  [list debug \
 	       additional_flags=-DSHLIB_NAME=\"$binfile_lib_target\" \
 	       shlib_load pthreads]] } {
-    return -1
+    return
 }
 
 gdb_locate_shlib $binfile_lib
diff --git a/gdb/testsuite/gdb.threads/detach-step-over.exp b/gdb/testsuite/gdb.threads/detach-step-over.exp
index 85198111fd0..b034788ae6c 100644
--- a/gdb/testsuite/gdb.threads/detach-step-over.exp
+++ b/gdb/testsuite/gdb.threads/detach-step-over.exp
@@ -354,11 +354,11 @@ proc_with_prefix test_detach_quit {condition_eval target_non_stop \
 set options { "additional_flags=-DTIMEOUT=$timeout" debug pthreads }
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile $options] == -1} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Probe support for "set breakpoint condition-evaluation target".
diff --git a/gdb/testsuite/gdb.threads/dlopen-libpthread.exp b/gdb/testsuite/gdb.threads/dlopen-libpthread.exp
index 1dacbdbb1b2..03ce0dd1612 100644
--- a/gdb/testsuite/gdb.threads/dlopen-libpthread.exp
+++ b/gdb/testsuite/gdb.threads/dlopen-libpthread.exp
@@ -33,12 +33,12 @@ set lib_dlopen [shlib_target_file ${executable}.so]
 set relink_args [build_executable_own_libs ${testfile}.exp ${executable}.so $srclibfile {debug shlib_pthreads} no]
 if {$relink_args == "" || ![prelink_no $relink_args]
     || [prepare_for_testing "failed to prepare" ${executable} ${srcmainfile} {debug shlib_load}] } {
-    return -1
+    return
 }
 gdb_load_shlib $binfile_lib
 
 if { ![runto_main] } {
-    return -1
+    return
 }
 
 set probe_names {}
@@ -62,7 +62,7 @@ foreach probe_name $probe_names {
 
 if { !$have_probe } {
     untested "no matching probes"
-    return -1
+    return
 }
 
 # We link the exec without -lpthread, but libpthread.so may already be loaded at main
diff --git a/gdb/testsuite/gdb.threads/execl.exp b/gdb/testsuite/gdb.threads/execl.exp
index fcbd865a9e8..a5ad5a48ca9 100644
--- a/gdb/testsuite/gdb.threads/execl.exp
+++ b/gdb/testsuite/gdb.threads/execl.exp
@@ -19,7 +19,7 @@
 standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    return -1
+    return
 }
 
 # New image, that does not load a thread library.
@@ -28,7 +28,7 @@ set srcfile1 ${testfile1}.c
 set binfile1 [standard_output_file ${testfile1}]
 
 if {[gdb_compile "${srcdir}/${subdir}/${srcfile1}" "${binfile1}" executable {debug}] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.threads/fork-child-threads.exp b/gdb/testsuite/gdb.threads/fork-child-threads.exp
index fec474f4c70..c6090eaaaf4 100644
--- a/gdb/testsuite/gdb.threads/fork-child-threads.exp
+++ b/gdb/testsuite/gdb.threads/fork-child-threads.exp
@@ -18,7 +18,7 @@ require allow_fork_tests
 standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.threads/fork-thread-pending.exp b/gdb/testsuite/gdb.threads/fork-thread-pending.exp
index 6f81e5e7e49..0cf4878d13f 100644
--- a/gdb/testsuite/gdb.threads/fork-thread-pending.exp
+++ b/gdb/testsuite/gdb.threads/fork-thread-pending.exp
@@ -18,7 +18,7 @@ require allow_fork_tests
 standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp b/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp
index 231709369e5..b3a2fdb9ac1 100644
--- a/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp
+++ b/gdb/testsuite/gdb.threads/forking-threads-plus-breakpoint.exp
@@ -23,7 +23,7 @@ standard_testfile
 set linenum [gdb_get_line_number "set break here"]
 
 if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
-    return -1
+    return
 }
 
 # Assume yes.
diff --git a/gdb/testsuite/gdb.threads/gcore-stale-thread.exp b/gdb/testsuite/gdb.threads/gcore-stale-thread.exp
index 1f1974109fe..9faa2686c76 100644
--- a/gdb/testsuite/gdb.threads/gcore-stale-thread.exp
+++ b/gdb/testsuite/gdb.threads/gcore-stale-thread.exp
@@ -17,7 +17,7 @@ standard_testfile
 set corefile [standard_output_file ${testfile}.core]
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != ""} {
-    return -1
+    return
 }
 
 clean_restart ${testfile}
@@ -25,7 +25,7 @@ clean_restart ${testfile}
 gdb_test_no_output "set non-stop on"
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test_multiple "info threads" "threads are supported" {
diff --git a/gdb/testsuite/gdb.threads/gcore-thread.exp b/gdb/testsuite/gdb.threads/gcore-thread.exp
index 75c538074a9..c3b8c56dd4b 100644
--- a/gdb/testsuite/gdb.threads/gcore-thread.exp
+++ b/gdb/testsuite/gdb.threads/gcore-thread.exp
@@ -37,7 +37,7 @@ set opts [list debug]
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${objfile}" object $opts] != ""
     || ([gdb_compile_pthreads "${objfile}" "${binfile}" executable [concat $opts {ldflags=-Wl,-z,norelro}] ] != ""
 	&& [gdb_compile_pthreads "${objfile}" "${binfile}" executable $opts] != "") } {
-    return -1
+    return
 }
 
 # Now we can proceed with the real testing.
@@ -56,7 +56,7 @@ set nl "\r\n"
 set timeout 30
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_test_multiple "info threads" "threads are supported" {
diff --git a/gdb/testsuite/gdb.threads/hand-call-in-threads.exp b/gdb/testsuite/gdb.threads/hand-call-in-threads.exp
index f2d93cedfed..f6d29720cc6 100644
--- a/gdb/testsuite/gdb.threads/hand-call-in-threads.exp
+++ b/gdb/testsuite/gdb.threads/hand-call-in-threads.exp
@@ -24,7 +24,7 @@ standard_testfile
 require {!target_info exists gdb,cannot_call_functions}
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } {
-    return -1
+    return
 }
 
 proc get_dummy_frame_number { } {
diff --git a/gdb/testsuite/gdb.threads/hand-call-new-thread.exp b/gdb/testsuite/gdb.threads/hand-call-new-thread.exp
index f9c59089a2b..891e47e6c9c 100644
--- a/gdb/testsuite/gdb.threads/hand-call-new-thread.exp
+++ b/gdb/testsuite/gdb.threads/hand-call-new-thread.exp
@@ -19,7 +19,7 @@
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.threads/ia64-sigill.exp b/gdb/testsuite/gdb.threads/ia64-sigill.exp
index e69b9478998..b19c62e8ded 100644
--- a/gdb/testsuite/gdb.threads/ia64-sigill.exp
+++ b/gdb/testsuite/gdb.threads/ia64-sigill.exp
@@ -22,13 +22,13 @@
 
 standard_testfile
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" ${binfile} executable [list debug additional_flags=-lrt]] != "" } {
-    return -1
+    return
 }
 
 clean_restart $testfile
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 set test "info addr label"
diff --git a/gdb/testsuite/gdb.threads/inf-thr-count.exp b/gdb/testsuite/gdb.threads/inf-thr-count.exp
index af48648e5ca..feb81ab6673 100644
--- a/gdb/testsuite/gdb.threads/inf-thr-count.exp
+++ b/gdb/testsuite/gdb.threads/inf-thr-count.exp
@@ -37,7 +37,7 @@ standard_testfile
 
 if {[build_executable "failed to prepare" $testfile $srcfile \
 	 {debug pthreads}] == -1} {
-    return -1
+    return
 }
 
 # Start GDB.  Ensure we are in non-stop mode as we need to read from
@@ -48,7 +48,7 @@ save_vars {GDBFLAGS} {
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint breakpt
@@ -131,7 +131,7 @@ proc wait_for_stage { num } {
 # Wait until we can see that the extra thread has been created.
 if {![wait_for_stage 1]} {
     unresolved "failed to see thread start"
-    return -1
+    return
 }
 
 
@@ -160,7 +160,7 @@ gdb_test_no_output "set variable spin = 0" \
 # Wait until the extra thread has exited.
 if {![wait_for_stage 2]} {
     unresolved "failed to see thread start"
-    return -1
+    return
 }
 
 # Check that the second thread has gone away.
diff --git a/gdb/testsuite/gdb.threads/infcall-thread-announce.exp b/gdb/testsuite/gdb.threads/infcall-thread-announce.exp
index 311daaca87c..a554670f1e6 100644
--- a/gdb/testsuite/gdb.threads/infcall-thread-announce.exp
+++ b/gdb/testsuite/gdb.threads/infcall-thread-announce.exp
@@ -20,11 +20,11 @@
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint breakpt
diff --git a/gdb/testsuite/gdb.threads/info-threads-cur-sal.exp b/gdb/testsuite/gdb.threads/info-threads-cur-sal.exp
index 1b4fa3a8d3e..3e8533674d4 100644
--- a/gdb/testsuite/gdb.threads/info-threads-cur-sal.exp
+++ b/gdb/testsuite/gdb.threads/info-threads-cur-sal.exp
@@ -20,13 +20,13 @@ set executable ${testfile}
 if {[gdb_compile_pthreads \
 	 "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}" \
 	 "${binfile}" executable {debug}] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${executable}
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint "start"
diff --git a/gdb/testsuite/gdb.threads/info-threads-options.exp b/gdb/testsuite/gdb.threads/info-threads-options.exp
index 15c4904892e..476c62cb323 100644
--- a/gdb/testsuite/gdb.threads/info-threads-options.exp
+++ b/gdb/testsuite/gdb.threads/info-threads-options.exp
@@ -19,7 +19,7 @@ standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	 executable debug] != "" } {
-    return -1
+    return
 }
 
 save_vars { GDBFLAGS } {
@@ -28,7 +28,7 @@ save_vars { GDBFLAGS } {
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint "stop_here"
diff --git a/gdb/testsuite/gdb.threads/interrupt-while-step-over.exp b/gdb/testsuite/gdb.threads/interrupt-while-step-over.exp
index 446af5e23ec..e8b29dce2fa 100644
--- a/gdb/testsuite/gdb.threads/interrupt-while-step-over.exp
+++ b/gdb/testsuite/gdb.threads/interrupt-while-step-over.exp
@@ -20,11 +20,11 @@ standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 {debug pthreads}] == -1} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Read the number of threads out of the inferior.
diff --git a/gdb/testsuite/gdb.threads/interrupted-hand-call.exp b/gdb/testsuite/gdb.threads/interrupted-hand-call.exp
index e921ea0cf06..23a3d038c09 100644
--- a/gdb/testsuite/gdb.threads/interrupted-hand-call.exp
+++ b/gdb/testsuite/gdb.threads/interrupted-hand-call.exp
@@ -25,7 +25,7 @@ standard_testfile
 require {!target_info exists gdb,cannot_call_functions}
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.threads/killed-outside.exp b/gdb/testsuite/gdb.threads/killed-outside.exp
index 51726ebf0e9..67d6c6b3223 100644
--- a/gdb/testsuite/gdb.threads/killed-outside.exp
+++ b/gdb/testsuite/gdb.threads/killed-outside.exp
@@ -20,17 +20,17 @@ standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 {pthreads debug}] == -1} {
-    return -1
+    return
 }
 
 if { ![runto "all_started"] } {
-    return -1
+    return
 }
 delete_breakpoints
 
 set testpid [get_valueof "" "pid" -1 "get pid of inferior"]
 if { $testpid == -1 } {
-    return -1
+    return
 }
 remote_exec target "kill -9 ${testpid}"
 
diff --git a/gdb/testsuite/gdb.threads/killed.exp b/gdb/testsuite/gdb.threads/killed.exp
index 96fe37dbefe..39b60dff8dd 100644
--- a/gdb/testsuite/gdb.threads/killed.exp
+++ b/gdb/testsuite/gdb.threads/killed.exp
@@ -58,7 +58,7 @@
 standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
-    return -1
+    return
 }
 
 
diff --git a/gdb/testsuite/gdb.threads/leader-exit.exp b/gdb/testsuite/gdb.threads/leader-exit.exp
index 9aa7d0fdf3f..b5e6f558ac7 100644
--- a/gdb/testsuite/gdb.threads/leader-exit.exp
+++ b/gdb/testsuite/gdb.threads/leader-exit.exp
@@ -21,13 +21,13 @@ standard_testfile
 set executable ${testfile}
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${executable}
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint [gdb_get_line_number "break-here"]
diff --git a/gdb/testsuite/gdb.threads/linux-dp.exp b/gdb/testsuite/gdb.threads/linux-dp.exp
index 5592e364e1f..42773f2293b 100644
--- a/gdb/testsuite/gdb.threads/linux-dp.exp
+++ b/gdb/testsuite/gdb.threads/linux-dp.exp
@@ -41,7 +41,7 @@ if {![istarget *-*-linux-gnu*]} {
 
 standard_testfile
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != ""} {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp b/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp
index a26abab630d..3a9e7c193a5 100644
--- a/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp
+++ b/gdb/testsuite/gdb.threads/local-watch-wrong-thread.exp
@@ -25,7 +25,7 @@ standard_testfile
 if {[gdb_compile_pthreads \
 	 "${srcdir}/${subdir}/${srcfile}" \
 	 "${binfile}" executable {debug} ] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp b/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp
index 7df41da642c..717eca236c0 100644
--- a/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp
+++ b/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp
@@ -40,7 +40,7 @@ require allow_python_tests
 
 if {[build_executable "failed to prepare" $testfile $srcfile \
 	 {debug pthreads}] == -1} {
-    return -1
+    return
 }
 
 # Run the test.  When SPAWN_INFERIOR is true the inferior is started
diff --git a/gdb/testsuite/gdb.threads/manythreads.exp b/gdb/testsuite/gdb.threads/manythreads.exp
index c0c0c8917c8..aabbb24b4d9 100644
--- a/gdb/testsuite/gdb.threads/manythreads.exp
+++ b/gdb/testsuite/gdb.threads/manythreads.exp
@@ -28,7 +28,7 @@ if {[info exists DEBUG]} {
 }
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $opts] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.threads/multi-create-ns-info-thr.exp b/gdb/testsuite/gdb.threads/multi-create-ns-info-thr.exp
index 881a489b04d..cc5fe888f87 100644
--- a/gdb/testsuite/gdb.threads/multi-create-ns-info-thr.exp
+++ b/gdb/testsuite/gdb.threads/multi-create-ns-info-thr.exp
@@ -19,14 +19,14 @@
 standard_testfile multi-create.c
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
-    return -1
+    return
 }
 
 gdb_test_no_output "set pagination off"
 gdb_test_no_output "set non-stop on"
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Create a breakpoint that does "info threads" when hit, which will be
diff --git a/gdb/testsuite/gdb.threads/multi-create.exp b/gdb/testsuite/gdb.threads/multi-create.exp
index 9bc49b6b7e1..a34ddfe6995 100644
--- a/gdb/testsuite/gdb.threads/multi-create.exp
+++ b/gdb/testsuite/gdb.threads/multi-create.exp
@@ -18,7 +18,7 @@ standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	 executable {debug}] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.threads/multiple-step-overs.exp b/gdb/testsuite/gdb.threads/multiple-step-overs.exp
index 8433e16340a..2159718f2a6 100644
--- a/gdb/testsuite/gdb.threads/multiple-step-overs.exp
+++ b/gdb/testsuite/gdb.threads/multiple-step-overs.exp
@@ -23,7 +23,7 @@ require {!target_info exists gdb,nosignals}
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	 executable [list debug "incdir=${objdir}"]] != "" } {
-    return -1
+    return
 }
 
 # Prepare environment for test.
diff --git a/gdb/testsuite/gdb.threads/names.exp b/gdb/testsuite/gdb.threads/names.exp
index dc3ed4eaa2c..31f36f1b3d7 100644
--- a/gdb/testsuite/gdb.threads/names.exp
+++ b/gdb/testsuite/gdb.threads/names.exp
@@ -21,7 +21,7 @@ require {!target_info exists gdb,no_thread_names}
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}]} {
-    return -1
+    return
 }
 
 if {![runto "all_threads_ready"]} {
diff --git a/gdb/testsuite/gdb.threads/next-bp-other-thread.exp b/gdb/testsuite/gdb.threads/next-bp-other-thread.exp
index 56f2c8440e9..9f07ad6aaa9 100644
--- a/gdb/testsuite/gdb.threads/next-bp-other-thread.exp
+++ b/gdb/testsuite/gdb.threads/next-bp-other-thread.exp
@@ -22,7 +22,7 @@ standard_testfile
 
 if {[build_executable "failed to prepare" $testfile $srcfile \
 	 {debug pthreads}] == -1} {
-    return -1
+    return
 }
 
 # Test all "set scheduler-locking" variants.
diff --git a/gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.exp b/gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.exp
index aa6fc1965a9..6852e8d7f87 100644
--- a/gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.exp
+++ b/gdb/testsuite/gdb.threads/next-while-other-thread-longjmps.exp
@@ -24,7 +24,7 @@ set linenum [gdb_get_line_number "set break here"]
 
 if {[prepare_for_testing "failed to prepare" \
 	 $testfile $srcfile {c++ debug pthreads}] == -1} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.threads/no-unwaited-for-left.exp b/gdb/testsuite/gdb.threads/no-unwaited-for-left.exp
index e21a7fe4c9f..621da59db46 100644
--- a/gdb/testsuite/gdb.threads/no-unwaited-for-left.exp
+++ b/gdb/testsuite/gdb.threads/no-unwaited-for-left.exp
@@ -20,13 +20,13 @@ standard_testfile
 set executable ${testfile}
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${executable}
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint $srcfile:[gdb_get_line_number "break-here"]
diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp
index 360630e6f66..442b6fb639f 100644
--- a/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp
+++ b/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp
@@ -20,7 +20,7 @@ standard_testfile
 set executable ${testfile}
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    return -1
+    return
 }
 
 proc do_test { lock_sched nonstop } {
diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp
index f331e823c2b..ead262cc2b5 100644
--- a/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp
+++ b/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp
@@ -21,7 +21,7 @@ standard_testfile
 set executable ${testfile}
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    return -1
+    return
 }
 
 proc do_test { lock_sched nonstop } {
diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp
index 76ac3f15562..2ad3a84d24b 100644
--- a/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp
+++ b/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp
@@ -23,7 +23,7 @@ standard_testfile
 set executable ${testfile}
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    return -1
+    return
 }
 
 proc do_test { lock_sched nonstop } {
diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp
index a895a51f4a9..fad49047ac3 100644
--- a/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp
+++ b/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp
@@ -22,7 +22,7 @@ standard_testfile
 set executable ${testfile}
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    return -1
+    return
 }
 
 proc do_test { lock_sched nonstop } {
diff --git a/gdb/testsuite/gdb.threads/non-ldr-exit.exp b/gdb/testsuite/gdb.threads/non-ldr-exit.exp
index e49f3ce8607..6b5e85fd2fa 100644
--- a/gdb/testsuite/gdb.threads/non-ldr-exit.exp
+++ b/gdb/testsuite/gdb.threads/non-ldr-exit.exp
@@ -19,11 +19,11 @@ standard_testfile
 set executable ${testfile}
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint [gdb_get_line_number "break-here"]
diff --git a/gdb/testsuite/gdb.threads/non-stop-fair-events.exp b/gdb/testsuite/gdb.threads/non-stop-fair-events.exp
index 7593c2432f3..53d62963f62 100644
--- a/gdb/testsuite/gdb.threads/non-stop-fair-events.exp
+++ b/gdb/testsuite/gdb.threads/non-stop-fair-events.exp
@@ -23,13 +23,13 @@ require {!target_info exists gdb,nosignals}
 
 set options { "additional_flags=-DTIMEOUT=$timeout" debug pthreads }
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile $options] == -1} {
-    return -1
+    return
 }
 
 gdb_test_no_output "set non-stop on"
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # We want "handle print", to make sure the target backend reports the
diff --git a/gdb/testsuite/gdb.threads/omp-par-scope.exp b/gdb/testsuite/gdb.threads/omp-par-scope.exp
index 5f919a1952a..b561bf2f4a5 100644
--- a/gdb/testsuite/gdb.threads/omp-par-scope.exp
+++ b/gdb/testsuite/gdb.threads/omp-par-scope.exp
@@ -36,7 +36,7 @@ if {[support_nested_function_tests]} {
 }
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile $opts]} {
-    return -1
+    return
 }
 
 # gdb_openmp_setup may be defined to set auto-load safe-path and possibly
@@ -61,7 +61,7 @@ if {[info procs gdb_openmp_setup] != ""} {
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # We want to invoke setup_kfail (and in some cases setup_xfail) when
diff --git a/gdb/testsuite/gdb.threads/omp-task.exp b/gdb/testsuite/gdb.threads/omp-task.exp
index a77ffe86cf9..636bcf98915 100644
--- a/gdb/testsuite/gdb.threads/omp-task.exp
+++ b/gdb/testsuite/gdb.threads/omp-task.exp
@@ -24,7 +24,7 @@ set have_nested_function_support 0
 set opts {openmp debug}
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile $opts]} {
-    return -1
+    return
 }
 
 if {[info procs gdb_openmp_setup] != ""} {
@@ -35,7 +35,7 @@ if {[info procs gdb_openmp_setup] != ""} {
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint [gdb_get_line_number "omp task shared"]
diff --git a/gdb/testsuite/gdb.threads/pending-step.exp b/gdb/testsuite/gdb.threads/pending-step.exp
index 4395195a703..c9ff1de32c8 100644
--- a/gdb/testsuite/gdb.threads/pending-step.exp
+++ b/gdb/testsuite/gdb.threads/pending-step.exp
@@ -51,7 +51,7 @@
 standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.threads/print-threads.exp b/gdb/testsuite/gdb.threads/print-threads.exp
index e03e2e48ccb..a1ac1fdd230 100644
--- a/gdb/testsuite/gdb.threads/print-threads.exp
+++ b/gdb/testsuite/gdb.threads/print-threads.exp
@@ -27,7 +27,7 @@ standard_testfile
 set horiz "\[^\n\r\]*"
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
-    return -1
+    return
 }
 
 # Now we can proceed with the real testing.
diff --git a/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp b/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp
index e4ec42e0dd5..624422bb7ea 100644
--- a/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp
+++ b/gdb/testsuite/gdb.threads/process-dies-while-handling-bp.exp
@@ -28,7 +28,7 @@ standard_testfile
 set linenum [gdb_get_line_number "set break here"]
 
 if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
-    return -1
+    return
 }
 
 # The test proper.  If COND_BP_TARGET is true, then test with
diff --git a/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.exp b/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.exp
index 7876e9f763c..8ecacba59d5 100644
--- a/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.exp
+++ b/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.exp
@@ -32,7 +32,7 @@ if { ![istarget "*-*-linux*"] } {
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
-    return -1
+    return
 }
 
 for {set iteration 0} {$iteration < 10} {incr iteration} {
diff --git a/gdb/testsuite/gdb.threads/pthread_cond_wait.exp b/gdb/testsuite/gdb.threads/pthread_cond_wait.exp
index a3d5cc2f208..ae700b8715c 100644
--- a/gdb/testsuite/gdb.threads/pthread_cond_wait.exp
+++ b/gdb/testsuite/gdb.threads/pthread_cond_wait.exp
@@ -22,7 +22,7 @@
 standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.threads/pthreads.exp b/gdb/testsuite/gdb.threads/pthreads.exp
index 0e382af9835..93d242b56f2 100644
--- a/gdb/testsuite/gdb.threads/pthreads.exp
+++ b/gdb/testsuite/gdb.threads/pthreads.exp
@@ -31,7 +31,7 @@ if {[istarget "*-*-linux"]} {
 }
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.threads/queue-signal.exp b/gdb/testsuite/gdb.threads/queue-signal.exp
index c461df0aa28..905f47c1243 100644
--- a/gdb/testsuite/gdb.threads/queue-signal.exp
+++ b/gdb/testsuite/gdb.threads/queue-signal.exp
@@ -17,7 +17,7 @@ standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	 executable { debug }] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.threads/reconnect-signal.exp b/gdb/testsuite/gdb.threads/reconnect-signal.exp
index bbd5e651b7f..e1079f3d1fe 100644
--- a/gdb/testsuite/gdb.threads/reconnect-signal.exp
+++ b/gdb/testsuite/gdb.threads/reconnect-signal.exp
@@ -29,7 +29,7 @@ if { [gdb_compile_pthreads \
 	  "${binfile}" \
 	  executable {debug}] != "" } {
     untested "failed to compile"
-    return -1
+    return
 }
 
 clean_restart $executable
diff --git a/gdb/testsuite/gdb.threads/schedlock.exp b/gdb/testsuite/gdb.threads/schedlock.exp
index eeca3f8fd0f..61a9d5ddef5 100644
--- a/gdb/testsuite/gdb.threads/schedlock.exp
+++ b/gdb/testsuite/gdb.threads/schedlock.exp
@@ -28,7 +28,7 @@ standard_testfile
 set NUM 2
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
-    return -1
+    return
 }
 
 # Now we can proceed with the real testing.
diff --git a/gdb/testsuite/gdb.threads/siginfo-threads.exp b/gdb/testsuite/gdb.threads/siginfo-threads.exp
index 81fc03ef5a5..acf1185cdfc 100644
--- a/gdb/testsuite/gdb.threads/siginfo-threads.exp
+++ b/gdb/testsuite/gdb.threads/siginfo-threads.exp
@@ -20,13 +20,13 @@ if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" \
 	 ${binfile} \
 	 executable \
 	 [list debug additional_flags=-lrt]] != "" } {
-    return -1
+    return
 }
 
 clean_restart $testfile
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # `nostop noprint pass' could in some cases report false PASS due to
diff --git a/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp b/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp
index 4eff994fa09..d5b657bfc3d 100644
--- a/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp
+++ b/gdb/testsuite/gdb.threads/signal-command-handle-nopass.exp
@@ -24,7 +24,7 @@ require {!target_info exists gdb,nosignals}
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	 executable { debug }] != "" } {
-    return -1
+    return
 }
 
 # Run the test proper.  STEP_OVER indicates whether we leave in place
diff --git a/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp b/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp
index 983a5e8dc43..9aeb8597fc9 100644
--- a/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp
+++ b/gdb/testsuite/gdb.threads/signal-command-multiple-signals-pending.exp
@@ -22,7 +22,7 @@ require {!target_info exists gdb,nosignals}
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	 executable { debug }] != "" } {
-    return -1
+    return
 }
 
 # Run the test proper.  SCHEDLOCK indicates which variant (around
diff --git a/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp b/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp
index 0138cc0036a..745447d3a07 100644
--- a/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp
+++ b/gdb/testsuite/gdb.threads/signal-delivered-right-thread.exp
@@ -19,7 +19,7 @@ require {!target_info exists gdb,nosignals}
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	 executable { debug }] != "" } {
-    return -1
+    return
 }
 
 # Run test proper.  COMMAND indicates whether to resume the inferior
diff --git a/gdb/testsuite/gdb.threads/signal-sigtrap.exp b/gdb/testsuite/gdb.threads/signal-sigtrap.exp
index c3f5af8905e..55c2ee626d5 100644
--- a/gdb/testsuite/gdb.threads/signal-sigtrap.exp
+++ b/gdb/testsuite/gdb.threads/signal-sigtrap.exp
@@ -22,7 +22,7 @@ require {!target_info exists gdb,nosignals}
 
 if {[build_executable "failed to prepare" $testfile $srcfile \
 	 {debug pthreads}]} {
-    return -1
+    return
 }
 
 # Run test proper.  SIGTRAP_THREAD is the thread that should get the
diff --git a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
index 589da62a15b..f7bc6cb36b9 100644
--- a/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
+++ b/gdb/testsuite/gdb.threads/signal-while-stepping-over-bp-other-thread.exp
@@ -29,7 +29,7 @@ require {!target_info exists gdb,nosignals}
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	 executable [list debug "incdir=${objdir}"]] != "" } {
-    return -1
+    return
 }
 
 proc get_value {var test} {
@@ -52,7 +52,7 @@ proc get_value {var test} {
 clean_restart $executable
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 gdb_breakpoint [gdb_get_line_number "set wait-thread-2 breakpoint here"]
diff --git a/gdb/testsuite/gdb.threads/sigstep-threads.exp b/gdb/testsuite/gdb.threads/sigstep-threads.exp
index 77f65cf359d..1ad86f01440 100644
--- a/gdb/testsuite/gdb.threads/sigstep-threads.exp
+++ b/gdb/testsuite/gdb.threads/sigstep-threads.exp
@@ -18,13 +18,13 @@ set executable ${testfile}
 
 if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
     untested "failed to compile"
-    return -1
+    return
 }
 
 clean_restart $executable
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # `noprint' would not test the full logic of GDB.
diff --git a/gdb/testsuite/gdb.threads/sigthread.exp b/gdb/testsuite/gdb.threads/sigthread.exp
index 5e6094d9691..af5941a41cd 100644
--- a/gdb/testsuite/gdb.threads/sigthread.exp
+++ b/gdb/testsuite/gdb.threads/sigthread.exp
@@ -21,7 +21,7 @@ require {!target_info exists gdb,nointerrupts}
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	 executable { debug }] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp b/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp
index a87e076398e..deb3432c9a8 100644
--- a/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp
+++ b/gdb/testsuite/gdb.threads/step-bg-decr-pc-switch-thread.exp
@@ -31,7 +31,7 @@
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] == -1} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp b/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp
index ccd81078ba9..d391239f501 100644
--- a/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp
+++ b/gdb/testsuite/gdb.threads/step-over-lands-on-breakpoint.exp
@@ -21,7 +21,7 @@ set executable ${testfile}
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	 executable [list debug "incdir=${objdir}"]] != "" } {
-    return -1
+    return
 }
 
 # The test proper.  DISPLACED is true if we should try with displaced
diff --git a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp
index 0a0c5edb97a..877309a9f4e 100644
--- a/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp
+++ b/gdb/testsuite/gdb.threads/step-over-trips-on-watchpoint.exp
@@ -26,7 +26,7 @@ require allow_hw_watchpoint_tests
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	 executable [list debug "incdir=${objdir}"]] != "" } {
-    return -1
+    return
 }
 
 # The test proper.  DISPLACED is true if we should try with displaced
diff --git a/gdb/testsuite/gdb.threads/stepi-random-signal.exp b/gdb/testsuite/gdb.threads/stepi-random-signal.exp
index a63b9b76502..64b07ec00bb 100644
--- a/gdb/testsuite/gdb.threads/stepi-random-signal.exp
+++ b/gdb/testsuite/gdb.threads/stepi-random-signal.exp
@@ -25,14 +25,14 @@ if { [gdb_compile_pthreads \
 	  "${binfile}" \
 	  executable {debug}] != "" } {
     untested "failed to compile"
-    return -1
+    return
 }
 
 clean_restart $executable
 
 # Start the second thread.
 if {![runto start]} {
-    return -1
+    return
 }
 
 # Go back to the main thread, and leave it in the loop, where we're
diff --git a/gdb/testsuite/gdb.threads/stop-with-handle.exp b/gdb/testsuite/gdb.threads/stop-with-handle.exp
index 895d7ef7bac..de40a3f1e94 100644
--- a/gdb/testsuite/gdb.threads/stop-with-handle.exp
+++ b/gdb/testsuite/gdb.threads/stop-with-handle.exp
@@ -25,7 +25,7 @@ standard_testfile
 
 if {[prepare_for_testing "failed to prepare" \
 	 "${testfile}" "${srcfile}" {debug pthreads}]} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
diff --git a/gdb/testsuite/gdb.threads/switch-threads.exp b/gdb/testsuite/gdb.threads/switch-threads.exp
index bd25b1b49ff..10e40e6843b 100644
--- a/gdb/testsuite/gdb.threads/switch-threads.exp
+++ b/gdb/testsuite/gdb.threads/switch-threads.exp
@@ -26,7 +26,7 @@
 standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.threads/thread-bp-deleted.exp b/gdb/testsuite/gdb.threads/thread-bp-deleted.exp
index 037e8288b62..f7791e0ea90 100644
--- a/gdb/testsuite/gdb.threads/thread-bp-deleted.exp
+++ b/gdb/testsuite/gdb.threads/thread-bp-deleted.exp
@@ -26,7 +26,7 @@ standard_testfile
 
 if {[build_executable "failed to prepare" $testfile $srcfile \
 	 {debug pthreads}] == -1} {
-    return -1
+    return
 }
 
 # We need to do things a little differently when using the remote protocol.
@@ -43,7 +43,7 @@ save_vars { GDBFLAGS } {
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 # Check we hace non-stop mode.  We do try to force this on above, but maybe
@@ -51,7 +51,7 @@ if {![runto_main]} {
 # non-stop mode will still show as off, and this test should not be run.
 if {![is_target_non_stop]} {
     unsupported "required non-stop mode"
-    return -1
+    return
 }
 
 delete_breakpoints
diff --git a/gdb/testsuite/gdb.threads/thread-execl.exp b/gdb/testsuite/gdb.threads/thread-execl.exp
index b926664b450..cd6d6e4f57b 100644
--- a/gdb/testsuite/gdb.threads/thread-execl.exp
+++ b/gdb/testsuite/gdb.threads/thread-execl.exp
@@ -20,7 +20,7 @@ standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	 executable debug] != "" } {
-    return -1
+    return
 }
 
 # Run the test proper.  SCHEDLOCK specifies what scheduler-locking
diff --git a/gdb/testsuite/gdb.threads/thread-find.exp b/gdb/testsuite/gdb.threads/thread-find.exp
index acaf99f3c02..b08e148a081 100644
--- a/gdb/testsuite/gdb.threads/thread-find.exp
+++ b/gdb/testsuite/gdb.threads/thread-find.exp
@@ -18,7 +18,7 @@
 
 standard_testfile linux-dp.c
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != ""} {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.threads/thread-specific-bp.exp b/gdb/testsuite/gdb.threads/thread-specific-bp.exp
index 36d2344619a..d698b0ce96b 100644
--- a/gdb/testsuite/gdb.threads/thread-specific-bp.exp
+++ b/gdb/testsuite/gdb.threads/thread-specific-bp.exp
@@ -21,7 +21,7 @@ standard_testfile
 if {[gdb_compile_pthreads \
 	 "${srcdir}/${subdir}/${srcfile}" \
 	 "${binfile}" executable {debug} ] != "" } {
-    return -1
+    return
 }
 
 # Extract and return the thread ID of the thread stopped at function
diff --git a/gdb/testsuite/gdb.threads/thread-specific.exp b/gdb/testsuite/gdb.threads/thread-specific.exp
index 814e870bc89..79932ab9dc1 100644
--- a/gdb/testsuite/gdb.threads/thread-specific.exp
+++ b/gdb/testsuite/gdb.threads/thread-specific.exp
@@ -21,7 +21,7 @@
 standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
-    return -1
+    return
 }
 
 # Return a list of the valid thread IDs, with the initial thread first.
diff --git a/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp b/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp
index d46c3de8c20..d77b323338c 100644
--- a/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp
+++ b/gdb/testsuite/gdb.threads/thread-unwindonsignal.exp
@@ -25,7 +25,7 @@ standard_testfile interrupted-hand-call.c
 require {!target_info exists gdb,cannot_call_functions}
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS"]] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.threads/thread_check.exp b/gdb/testsuite/gdb.threads/thread_check.exp
index 1a79e112650..e48e3d5b3c3 100644
--- a/gdb/testsuite/gdb.threads/thread_check.exp
+++ b/gdb/testsuite/gdb.threads/thread_check.exp
@@ -35,7 +35,7 @@
 standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
-    return -1
+    return
 }
 
 
diff --git a/gdb/testsuite/gdb.threads/thread_events.exp b/gdb/testsuite/gdb.threads/thread_events.exp
index f7075f82724..37579bdd395 100644
--- a/gdb/testsuite/gdb.threads/thread_events.exp
+++ b/gdb/testsuite/gdb.threads/thread_events.exp
@@ -36,7 +36,7 @@ if {[target_info gdb_protocol] == "remote"
 standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
-    return -1
+    return
 }
 
 proc gdb_test_thread_start {messages_enabled command pattern message} {
diff --git a/gdb/testsuite/gdb.threads/threadapply.exp b/gdb/testsuite/gdb.threads/threadapply.exp
index 73b61056a19..f8827ae7ea6 100644
--- a/gdb/testsuite/gdb.threads/threadapply.exp
+++ b/gdb/testsuite/gdb.threads/threadapply.exp
@@ -22,7 +22,7 @@
 
 standard_testfile
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp
index 1699449f0ed..aa39f6509e9 100644
--- a/gdb/testsuite/gdb.threads/threadcrash.exp
+++ b/gdb/testsuite/gdb.threads/threadcrash.exp
@@ -273,7 +273,7 @@ standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile \
 	 {debug pthreads}]} {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.threads/threxit-hop-specific.exp b/gdb/testsuite/gdb.threads/threxit-hop-specific.exp
index f9064b8a19b..79134a0c542 100644
--- a/gdb/testsuite/gdb.threads/threxit-hop-specific.exp
+++ b/gdb/testsuite/gdb.threads/threxit-hop-specific.exp
@@ -20,7 +20,7 @@ standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	 executable debug] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.threads/tid-reuse.exp b/gdb/testsuite/gdb.threads/tid-reuse.exp
index ce598698650..57a544f9008 100644
--- a/gdb/testsuite/gdb.threads/tid-reuse.exp
+++ b/gdb/testsuite/gdb.threads/tid-reuse.exp
@@ -19,11 +19,11 @@
 standard_testfile
 
 if {[prepare_for_testing "failed to prepare" $testfile $srcfile { debug pthreads }] == -1} {
-    return -1
+    return
 }
 
 if {![runto_main]} {
-    return -1
+    return
 }
 
 delete_breakpoints
diff --git a/gdb/testsuite/gdb.threads/tls-core.exp b/gdb/testsuite/gdb.threads/tls-core.exp
index e59f22b2454..d2e49dbde02 100644
--- a/gdb/testsuite/gdb.threads/tls-core.exp
+++ b/gdb/testsuite/gdb.threads/tls-core.exp
@@ -17,7 +17,7 @@ standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
 	executable { debug }] != "" } {
-    return -1
+    return
 }
 
 # Generate a native core file.
diff --git a/gdb/testsuite/gdb.threads/tls-nodebug-pie.exp b/gdb/testsuite/gdb.threads/tls-nodebug-pie.exp
index cca67f882e1..9d2a805c4a5 100644
--- a/gdb/testsuite/gdb.threads/tls-nodebug-pie.exp
+++ b/gdb/testsuite/gdb.threads/tls-nodebug-pie.exp
@@ -17,7 +17,7 @@ standard_testfile
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
 	 {pie}] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.threads/tls-nodebug.exp b/gdb/testsuite/gdb.threads/tls-nodebug.exp
index cc6573aae6c..e02788700d8 100644
--- a/gdb/testsuite/gdb.threads/tls-nodebug.exp
+++ b/gdb/testsuite/gdb.threads/tls-nodebug.exp
@@ -23,7 +23,7 @@ if {[istarget "*-*-linux"]} {
 }
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable []] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
diff --git a/gdb/testsuite/gdb.threads/tls-sepdebug.exp b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
index 1b47fe243ee..5f705d1750d 100644
--- a/gdb/testsuite/gdb.threads/tls-sepdebug.exp
+++ b/gdb/testsuite/gdb.threads/tls-sepdebug.exp
@@ -46,7 +46,7 @@ set binsharedfile      [standard_output_file ${binsharedbase}]
 if { [build_executable "build library" ${binsharedfile} ${srcsharedfile} \
 	  {debug shlib additional_flags=-std=c11}] == -1 } {
     untested "Couldn't compile test library"
-    return -1
+    return
 }
 
 # Strip debug information from $binsharedfile, placing it in
@@ -61,7 +61,7 @@ if  { [gdb_compile_pthreads \
 	"${binmainfile}" executable [list debug additional_flags=-std=c11]] \
        != "" } {
     untested "Couldn't compile test program"
-    return -1
+    return
 }
 
 set absdir [file dirname [standard_output_file ${binsharedbase}]]
diff --git a/gdb/testsuite/gdb.threads/tls-shared.exp b/gdb/testsuite/gdb.threads/tls-shared.exp
index 768b84a2103..a293809105d 100644
--- a/gdb/testsuite/gdb.threads/tls-shared.exp
+++ b/gdb/testsuite/gdb.threads/tls-shared.exp
@@ -25,7 +25,7 @@ remote_exec build "rm -f ${binfile}"
 
 if { [gdb_compile_shlib_pthreads ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} {debug}] != ""
      || [gdb_compile_pthreads ${srcdir}/${subdir}/${srcfile} ${binfile} executable [list debug shlib=${binfile_lib}]] != ""} {
-    return -1
+    return
 }
 
 
diff --git a/gdb/testsuite/gdb.threads/tls-so_extern.exp b/gdb/testsuite/gdb.threads/tls-so_extern.exp
index 91205308067..eb3f32df621 100644
--- a/gdb/testsuite/gdb.threads/tls-so_extern.exp
+++ b/gdb/testsuite/gdb.threads/tls-so_extern.exp
@@ -24,7 +24,7 @@ set binfile_lib [standard_output_file ${libfile}.so]
 
 if { [gdb_compile_shlib_pthreads ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} {debug}] != ""
      || [gdb_compile_pthreads ${srcdir}/${subdir}/${srcfile} ${binfile} executable [list debug shlib=${binfile_lib}]] != ""} {
-    return -1
+    return
 }
 
 
diff --git a/gdb/testsuite/gdb.threads/tls-var.exp b/gdb/testsuite/gdb.threads/tls-var.exp
index fe95df91dbb..5b2968a7bd0 100644
--- a/gdb/testsuite/gdb.threads/tls-var.exp
+++ b/gdb/testsuite/gdb.threads/tls-var.exp
@@ -22,7 +22,7 @@ set executable ${testfile}
 if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${objfile} object {debug}] != ""
      || [gdb_compile ${srcdir}/${subdir}/${srcmainfile} ${objmainfile} object {}] != ""
      || [gdb_compile_pthreads "${objfile} ${objmainfile}" ${binfile} executable {}] != ""} {
-    return -1
+    return
 }
 
 clean_restart ${executable}
diff --git a/gdb/testsuite/gdb.threads/tls.exp b/gdb/testsuite/gdb.threads/tls.exp
index 4a93433e833..bf48a6f9fc9 100644
--- a/gdb/testsuite/gdb.threads/tls.exp
+++ b/gdb/testsuite/gdb.threads/tls.exp
@@ -25,7 +25,7 @@ if {[istarget "*-*-linux"]} {
 }
 
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile2}" "${binfile}" executable [list c++ debug]] != "" } {
-    return -1
+    return
 }
 
 ### Compute the value of the a_thread_local variable.
diff --git a/gdb/testsuite/gdb.threads/vfork-follow-child-exec.exp b/gdb/testsuite/gdb.threads/vfork-follow-child-exec.exp
index ade63410da9..555bc463bb5 100644
--- a/gdb/testsuite/gdb.threads/vfork-follow-child-exec.exp
+++ b/gdb/testsuite/gdb.threads/vfork-follow-child-exec.exp
@@ -21,7 +21,7 @@ require allow_fork_tests
 standard_testfile
 
 if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}]} {
-    return -1
+    return
 }
 
 # DETACH indicates whether "set detach-on-fork" is enabled.  It is
diff --git a/gdb/testsuite/gdb.threads/vfork-follow-child-exit.exp b/gdb/testsuite/gdb.threads/vfork-follow-child-exit.exp
index 0f35bd5faa0..b0e8079cf2d 100644
--- a/gdb/testsuite/gdb.threads/vfork-follow-child-exit.exp
+++ b/gdb/testsuite/gdb.threads/vfork-follow-child-exit.exp
@@ -21,7 +21,7 @@ require allow_fork_tests
 standard_testfile
 
 if {[build_executable "failed to prepare" $testfile $srcfile {debug pthreads}]} {
-    return -1
+    return
 }
 
 # DETACH indicates whether "set detach-on-fork" is enabled.  It is
diff --git a/gdb/testsuite/gdb.threads/vfork-multi-inferior.exp b/gdb/testsuite/gdb.threads/vfork-multi-inferior.exp
index 2686eba08e7..e258ec719e9 100644
--- a/gdb/testsuite/gdb.threads/vfork-multi-inferior.exp
+++ b/gdb/testsuite/gdb.threads/vfork-multi-inferior.exp
@@ -49,14 +49,14 @@ set opts [list debug additional_flags=-DNR_LOOPS=$nr_loops]
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
 	$opts] != "" } {
     untested "failed to compile"
-    return -1
+    return
 }
 
 # Compile the secondary program, which just sleeps.
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile_sleep}" "${binfile_sleep}" executable \
 	{debug}] != "" } {
     untested "failed to compile"
-    return -1
+    return
 }
 
 # We exercise two methods of getting a second inferior to execute while the
diff --git a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp
index 980ca4d66d0..58b16be70f2 100644
--- a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp
+++ b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp
@@ -32,7 +32,7 @@ if {![istarget *-*-linux*]} {
 
 standard_testfile
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" ${binfile} executable [list debug additional_flags=-lrt]] != "" } {
-    return -1
+    return
 }
 
 foreach reorder {0 1} { with_test_prefix "reorder$reorder" {
diff --git a/gdb/testsuite/gdb.threads/watchthreads.exp b/gdb/testsuite/gdb.threads/watchthreads.exp
index 77a3f7bc5e2..e975e22e573 100644
--- a/gdb/testsuite/gdb.threads/watchthreads.exp
+++ b/gdb/testsuite/gdb.threads/watchthreads.exp
@@ -28,7 +28,7 @@ proc target_no_stopped_data { } {
 
 standard_testfile
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable debug] != "" } {
-    return -1
+    return
 }
 
 clean_restart $::testfile
diff --git a/gdb/testsuite/gdb.threads/watchthreads2.exp b/gdb/testsuite/gdb.threads/watchthreads2.exp
index 00229d384c0..49884f4136d 100644
--- a/gdb/testsuite/gdb.threads/watchthreads2.exp
+++ b/gdb/testsuite/gdb.threads/watchthreads2.exp
@@ -28,7 +28,7 @@ require allow_hw_watchpoint_tests
 
 standard_testfile
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS -DX_INCR_COUNT=$X_INCR_COUNT"]] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
@@ -68,7 +68,7 @@ if { $nr_started == $NR_THREADS } {
 } else {
     fail "all threads started"
     # No point in continuing.
-    return -1
+    return
 }
 
 # Check that multiple uses of the 'thread' keyword will give an error.
diff --git a/gdb/testsuite/gdb.threads/wp-replication.exp b/gdb/testsuite/gdb.threads/wp-replication.exp
index d5f0ff0068c..28a5071bd5e 100644
--- a/gdb/testsuite/gdb.threads/wp-replication.exp
+++ b/gdb/testsuite/gdb.threads/wp-replication.exp
@@ -31,7 +31,7 @@ require allow_hw_watchpoint_tests
 
 standard_testfile
 if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "additional_flags=-DNR_THREADS=$NR_THREADS -DNR_TRIGGERS_PER_THREAD=$NR_TRIGGERS_PER_THREAD"]] != "" } {
-    return -1
+    return
 }
 
 clean_restart ${::testfile}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.