From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id kfzuJFYF72ky5z0AWB0awg (envelope-from ) for ; Mon, 27 Apr 2026 02:42:30 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=axjM0jCc; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 932F01E093; Mon, 27 Apr 2026 02:42:30 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 02B911E093 for ; Mon, 27 Apr 2026 02:42:29 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id D19B14BB3B95 for ; Mon, 27 Apr 2026 06:42:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D19B14BB3B95 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=axjM0jCc Received: from mail-dl1-x1236.google.com (mail-dl1-x1236.google.com [IPv6:2607:f8b0:4864:20::1236]) by sourceware.org (Postfix) with ESMTPS id E28D24BA5439 for ; Mon, 27 Apr 2026 06:37:09 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E28D24BA5439 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org E28D24BA5439 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1236 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777271830; cv=none; b=J8n1E17ZoNJd0uIE8naK6tBBBO7aZAj2D0CXAjSD7Y+U7pqUejHIjNlzKKgYglUigwPGH/DzKuS3bFIkZ8vV+R1XE53MCkahNZf+3qbyQsCdtVSuBlyv4tTWKMgHxemo4H061dC1B73uATy5+9Trjut9iC9hYnD74RK4VGFRX50= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777271830; c=relaxed/simple; bh=rRPwL9TDBH4OEHzuzw81LsBXkV9+G0vgINsoqMwNDcU=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=TtBBXvfb43yXCOQ9aKtYUPvbAPpo8F2sZzul6MVd8kbYTMWgu9GBLulB8kRZ7Rzha5X92rw/dL5xZ0jbRALgvC6Y65finmJD6dI/AsZrzwd/yyDEoMd6yluXUCTVDZf7d06fjTsfznI0XL3C3wJ0sGla9tq33VuClyA7YstKn8s= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E28D24BA5439 Received: by mail-dl1-x1236.google.com with SMTP id a92af1059eb24-12c8ccc7755so9742750c88.0 for ; Sun, 26 Apr 2026 23:37:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1777271829; x=1777876629; darn=sourceware.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/VvgATVzuJPRAzAMwmMpulzF8ePEpuany9Qz/8HJlfI=; b=axjM0jCc+/yHrkZMCk9G7ZY149G2dTMJ7WPYqdnWPdyqOjuiS6Zc7JlXQcseSVqndr mc6cKIlf9x/C/gUS5sBXMVhDFZl+yxMpe4HbrnnbJorjXcqi+9mdATckV1QbD9/KOlTf MZIeM+fOKZv+UvltqMnTwCBznd37eUtxHqlBgaWlZfBArzhsEwUFtGVUzdA5zXKZwYvJ WARaWobRX6+4225h4tos52e9z8ScD7XvSkezuOaq0JbW/xGkLB6z6m6yxJPqlgxnFa9T WDL9JJz//THYlREq8Hl77dv6YXu90qzcuP0PWJuGJstgP+v5nh/rXB75Ohq9bt1tLZmo vcTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777271829; x=1777876629; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=/VvgATVzuJPRAzAMwmMpulzF8ePEpuany9Qz/8HJlfI=; b=lB1y5rzo8VPfosmL/WkPzrZSM8pQbeFUuwYYMq9MbZGA0dHqN5spAEcKdSTK/P6k5H tgOY4jPWj7LXwvfEDCWVVJkA9cyvMu2ZhLn/ycKsp3hZkNIEN3243mlkiBWqSQRKVTPP HfLM0OEqqkeffLRYFHi8VbPqthI1vWJUaOj+IJD4DjYrU1OlRz0Dp80bBHHMh5xcoTtO FGbVeJwEWoREzQG3v/qVcWxo/FAJzSIlX8GbnFTOXWX1cchX3trICw7KciHzqASY6B70 xiA88PDWv6+yNrsbdkFsZm7iR3MIXFdUxvmNQ6AqvDwUwMdV4BJ/TaRDsRxC0NnJ6Oz0 0ceQ== X-Gm-Message-State: AOJu0YzfVUmfXJ3tw6vOrFN4HNws3xJz3YL/w0H2HFJZaGtctHNS2ZEk BLwOUFTb56zjl5LcPr9GLxTbhSKIDTrcV3ch7tIdr3NXENr6Sw8YCmq3EuQ2Pu28hnhZsTaNaq4 6y7x6 X-Gm-Gg: AeBDietFksDSlllJaY/UMxyr6yG04+xVKIxHJv5Ra8F2GKZliIbD6pcQlTb7j6xvYJu y7qE5zc5KpseZN8dNRHiycM7fxPsutjfFxIMe0qfWp6woP35Qvwr+A0AN8NCb8gA8WwypEjtdEX M7nRSYbHEvfwoCKRW4gyJzFnNjOHm3BYTziY4egvUQU4GVlydHYkmt+mcj4lK0qs19CYJ8gcyAn QPPSVJpij0kKNINLVKSlv4VZ4ccXPtlx+aMhS3ba7zPcGWFHyL5O4muVM3HHE9J0bVHiUFakJJg DUY9UCWzjb4seXjq9EzqLP5PTEQ5e7Hwr83MQ+4fMmrM5WG1zKlRxDPd9/LHUwzp1xTQPcPMbcq qFeGYYGhoOJSAKi+6eNQnUFurDt6QdlKdEI+LUqprH8ucr0OMUrUZtUwVqxn26lO+FSgoDYxSKh UYkboGn1SY4rffuWBXBjYJH8Hlbo1005IAWyw/kd0WjFg2 X-Received: by 2002:a05:701b:2816:b0:12d:b2ca:a9ef with SMTP id a92af1059eb24-12db2caad1amr7966726c88.17.1777271828500; Sun, 26 Apr 2026 23:37:08 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8083:33bc:f32e:9aa5:b915]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-12dcbe079c3sm10371649c88.2.2026.04.26.23.37.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Apr 2026 23:37:08 -0700 (PDT) From: Thiago Jung Bauermann To: gdb-patches@sourceware.org Subject: [PATCH 33/36] GDB: testsuite: threads: Don't return -1 from top-level (manual) Date: Mon, 27 Apr 2026 03:34:57 -0300 Message-ID: <20260427063500.3847618-34-thiago.bauermann@linaro.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260427063500.3847618-1-thiago.bauermann@linaro.org> References: <20260427063500.3847618-1-thiago.bauermann@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org This patch manually changes most "return -1" statements that weren't caught by the sed command. These return statements fall into one of these criteria: - misaligned line, which is then fixed by this patch; - return at top level but inside block such as for loops, with_test_prefix, foreach_with_prefix, gdb_test_multiple. - procedure whose callers don't use the return value; I also fixed a few cases of "return 0" from top-level that also weren't caught by sed. --- .../gdb.threads/access-mem-running-thread-exit.exp | 6 +++--- gdb/testsuite/gdb.threads/attach-slow-waitpid.exp | 4 ++-- gdb/testsuite/gdb.threads/break-while-running.exp | 4 ++-- .../gdb.threads/continue-pending-after-query.exp | 2 +- gdb/testsuite/gdb.threads/corethreads.exp | 4 ++-- gdb/testsuite/gdb.threads/create-fail.exp | 2 +- gdb/testsuite/gdb.threads/fork-plus-threads.exp | 4 ++-- gdb/testsuite/gdb.threads/gcore-stale-thread.exp | 2 +- gdb/testsuite/gdb.threads/gcore-thread.exp | 4 ++-- gdb/testsuite/gdb.threads/kill.exp | 2 +- gdb/testsuite/gdb.threads/linux-dp.exp | 2 +- .../gdb.threads/main-thread-exit-during-detach.exp | 2 +- gdb/testsuite/gdb.threads/multiple-step-overs.exp | 2 +- .../gdb.threads/multiple-successive-infcall.exp | 6 +++--- 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/omp-par-scope.exp | 2 +- gdb/testsuite/gdb.threads/omp-task.exp | 2 +- .../gdb.threads/process-dies-while-detaching.exp | 10 +++++----- gdb/testsuite/gdb.threads/siginfo-threads.exp | 2 +- gdb/testsuite/gdb.threads/staticthreads.exp | 4 ++-- gdb/testsuite/gdb.threads/step-over-exec.exp | 4 ++-- gdb/testsuite/gdb.threads/stepi-over-clone.exp | 2 +- gdb/testsuite/gdb.threads/thread-specific-bp.exp | 6 +++--- gdb/testsuite/gdb.threads/threadapply.exp | 2 +- gdb/testsuite/gdb.threads/threadcrash.exp | 2 +- gdb/testsuite/gdb.threads/threads-after-exec.exp | 2 +- gdb/testsuite/gdb.threads/tls.exp | 4 ++-- gdb/testsuite/gdb.threads/watchpoint-fork.exp | 2 +- gdb/testsuite/gdb.threads/watchthreads-reorder.exp | 2 +- 32 files changed, 50 insertions(+), 50 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 d0db40c4be5b..31af95316165 100644 --- a/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp +++ b/gdb/testsuite/gdb.threads/access-mem-running-thread-exit.exp @@ -55,7 +55,7 @@ proc test { non_stop } { } if {![runto setup_done]} { - return -1 + return } # If debugging with target remote, check whether the all-stop variant @@ -67,7 +67,7 @@ proc test { non_stop } { if {![is_target_non_stop]} { unsupported "can't issue commands while target is running" - return 0 + return } } @@ -111,7 +111,7 @@ proc test { non_stop } { gdb_load $binfile if {![runto setup_done]} { - return -1 + return } } } diff --git a/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp b/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp index 343a96bc5112..de5a901f0b1f 100644 --- a/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp +++ b/gdb/testsuite/gdb.threads/attach-slow-waitpid.exp @@ -53,7 +53,7 @@ with_test_prefix "compile preload library" { # limit this test to running when ISNATIVE is true. if { [gdb_compile_shlib_pthreads \ $libsrc $libobj {debug}] != "" } then { - return -1 + return } } @@ -62,7 +62,7 @@ with_test_prefix "compile test executable" { if { [gdb_compile_pthreads \ "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ executable {debug}] != "" } { - return -1 + return } } diff --git a/gdb/testsuite/gdb.threads/break-while-running.exp b/gdb/testsuite/gdb.threads/break-while-running.exp index c4ad127d982c..d133c994e092 100644 --- a/gdb/testsuite/gdb.threads/break-while-running.exp +++ b/gdb/testsuite/gdb.threads/break-while-running.exp @@ -45,7 +45,7 @@ proc test { update_thread_list always_inserted non_stop } { gdb_test_no_output "set breakpoint always-inserted $always_inserted" if {![runto_main]} { - return -1 + return } # In all-stop, check whether we're testing with the remote or @@ -54,7 +54,7 @@ proc test { update_thread_list always_inserted non_stop } { # Not an issue with the non-stop RSP variant, which has a # non-blocking vCont. if {$non_stop=="off" && [gdb_protocol_is_remote]} { - return -1 + return } gdb_breakpoint [gdb_get_line_number "set wait-thread breakpoint here"] diff --git a/gdb/testsuite/gdb.threads/continue-pending-after-query.exp b/gdb/testsuite/gdb.threads/continue-pending-after-query.exp index 97f9081443a7..9b80dbf84eb2 100644 --- a/gdb/testsuite/gdb.threads/continue-pending-after-query.exp +++ b/gdb/testsuite/gdb.threads/continue-pending-after-query.exp @@ -52,7 +52,7 @@ proc test {} { global srcfile gdb_prompt if {![runto_main]} { - return -1 + return } delete_breakpoints diff --git a/gdb/testsuite/gdb.threads/corethreads.exp b/gdb/testsuite/gdb.threads/corethreads.exp index 4e520c5e8f22..2ea879623368 100644 --- a/gdb/testsuite/gdb.threads/corethreads.exp +++ b/gdb/testsuite/gdb.threads/corethreads.exp @@ -23,8 +23,8 @@ if {![istarget "*-*-linux*"]} { standard_testfile set executable ${testfile} if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } set corefile [core_find $binfile] diff --git a/gdb/testsuite/gdb.threads/create-fail.exp b/gdb/testsuite/gdb.threads/create-fail.exp index c77ccab17ae2..bb7c341a5b5b 100644 --- a/gdb/testsuite/gdb.threads/create-fail.exp +++ b/gdb/testsuite/gdb.threads/create-fail.exp @@ -34,7 +34,7 @@ for {set i 1} {$i <= $iterations} {incr i} { clean_restart ${executable} if {![runto_main]} { - return -1 + return } set test "run till end" diff --git a/gdb/testsuite/gdb.threads/fork-plus-threads.exp b/gdb/testsuite/gdb.threads/fork-plus-threads.exp index 06c4981ca232..d6f2109043b9 100644 --- a/gdb/testsuite/gdb.threads/fork-plus-threads.exp +++ b/gdb/testsuite/gdb.threads/fork-plus-threads.exp @@ -41,12 +41,12 @@ proc do_test { detach-on-fork } { if {[prepare_for_testing "failed to prepare" \ $testfile $srcfile {debug pthreads}] == -1} { - return -1 + return } } if {![runto_main]} { - return 0 + return } gdb_test_no_output "set detach-on-fork ${detach-on-fork}" diff --git a/gdb/testsuite/gdb.threads/gcore-stale-thread.exp b/gdb/testsuite/gdb.threads/gcore-stale-thread.exp index 9faa2686c767..d0465c87a4ad 100644 --- a/gdb/testsuite/gdb.threads/gcore-stale-thread.exp +++ b/gdb/testsuite/gdb.threads/gcore-stale-thread.exp @@ -34,7 +34,7 @@ gdb_test_multiple "info threads" "threads are supported" { } -re "\r\n$gdb_prompt $" { unsupported "gdb does not support threads on this target" - return -1 + return } } diff --git a/gdb/testsuite/gdb.threads/gcore-thread.exp b/gdb/testsuite/gdb.threads/gcore-thread.exp index c3b8c56dd4b9..1d0150da6745 100644 --- a/gdb/testsuite/gdb.threads/gcore-thread.exp +++ b/gdb/testsuite/gdb.threads/gcore-thread.exp @@ -65,7 +65,7 @@ gdb_test_multiple "info threads" "threads are supported" { } -re "${nl}$gdb_prompt $" { unsupported "gdb does not support threads on this target" - return -1 + return } } @@ -83,7 +83,7 @@ gdb_test "continue" "Continuing.*Breakpoint.* thread2 .*" "thread 2 is running" set core_supported [gdb_gcore_cmd "$corefile" "save a corefile"] if {!$core_supported} { - return -1 + return } diff --git a/gdb/testsuite/gdb.threads/kill.exp b/gdb/testsuite/gdb.threads/kill.exp index 84ab6cd561c4..f004307a2ca4 100644 --- a/gdb/testsuite/gdb.threads/kill.exp +++ b/gdb/testsuite/gdb.threads/kill.exp @@ -35,7 +35,7 @@ proc test {threaded} { } if {[prepare_for_testing "failed to prepare" $prog $srcfile $options] == -1} { - return -1 + return } if {![runto_main]} { diff --git a/gdb/testsuite/gdb.threads/linux-dp.exp b/gdb/testsuite/gdb.threads/linux-dp.exp index 42773f2293b5..f573964ea6a4 100644 --- a/gdb/testsuite/gdb.threads/linux-dp.exp +++ b/gdb/testsuite/gdb.threads/linux-dp.exp @@ -99,7 +99,7 @@ for {set i 0} {$i < 5} {incr i} { # when it first notices that the thread library doesn't support # debugging, or if we could explicitly ask GDB somehow. unsupported "this GDB does not support threads on this system." - return -1 + return } -re "$gdb_prompt $" { } 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 717eca236c03..29d801721eca 100644 --- a/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp +++ b/gdb/testsuite/gdb.threads/main-thread-exit-during-detach.exp @@ -85,7 +85,7 @@ proc run_test { spawn_inferior } { gdb_test "continue&" } else { if {![runto_main]} { - return -1 + return } gdb_breakpoint "breakpt" diff --git a/gdb/testsuite/gdb.threads/multiple-step-overs.exp b/gdb/testsuite/gdb.threads/multiple-step-overs.exp index 2159718f2a63..0ee18d306805 100644 --- a/gdb/testsuite/gdb.threads/multiple-step-overs.exp +++ b/gdb/testsuite/gdb.threads/multiple-step-overs.exp @@ -36,7 +36,7 @@ proc setup {} { clean_restart $executable if {![runto_main]} { - return -1 + return } gdb_test_no_output "set displaced-stepping $displaced" diff --git a/gdb/testsuite/gdb.threads/multiple-successive-infcall.exp b/gdb/testsuite/gdb.threads/multiple-successive-infcall.exp index 8d438673cf07..fdcbaa47c7f4 100644 --- a/gdb/testsuite/gdb.threads/multiple-successive-infcall.exp +++ b/gdb/testsuite/gdb.threads/multiple-successive-infcall.exp @@ -19,14 +19,14 @@ standard_testfile if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ - executable {debug additional_flags=-std=gnu99}] != "" } { - return -1 + executable {debug additional_flags=-std=gnu99}] != "" } { + return } clean_restart "${::testfile}" if {![runto_main]} { - return 0 + return } # Ensure that each new thread is detected by GDB in the order that the diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp index 442b6fb639ff..206a2d804608 100644 --- a/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp +++ b/gdb/testsuite/gdb.threads/non-ldr-exc-1.exp @@ -32,7 +32,7 @@ proc do_test { lock_sched nonstop } { } if {![runto_main]} { - return -1 + return } gdb_breakpoint [gdb_get_line_number "break-here"] diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp index ead262cc2b50..984f28600f72 100644 --- a/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp +++ b/gdb/testsuite/gdb.threads/non-ldr-exc-2.exp @@ -34,7 +34,7 @@ proc do_test { lock_sched nonstop } { } if {![runto_main]} { - return -1 + return } gdb_breakpoint [gdb_get_line_number "break-here"] diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp index 2ad3a84d24bf..426e6e70f14f 100644 --- a/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp +++ b/gdb/testsuite/gdb.threads/non-ldr-exc-3.exp @@ -35,7 +35,7 @@ proc do_test { lock_sched nonstop } { } if {![runto_main]} { - return -1 + return } gdb_breakpoint [gdb_get_line_number "break-here"] diff --git a/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp b/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp index fad49047ac39..8dc0db42c155 100644 --- a/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp +++ b/gdb/testsuite/gdb.threads/non-ldr-exc-4.exp @@ -34,7 +34,7 @@ proc do_test { lock_sched nonstop } { } if {![runto_main]} { - return -1 + return } gdb_breakpoint [gdb_get_line_number "break-here"] diff --git a/gdb/testsuite/gdb.threads/omp-par-scope.exp b/gdb/testsuite/gdb.threads/omp-par-scope.exp index b561bf2f4a5b..7d706078b2c4 100644 --- a/gdb/testsuite/gdb.threads/omp-par-scope.exp +++ b/gdb/testsuite/gdb.threads/omp-par-scope.exp @@ -56,7 +56,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile $opts]} { if {[info procs gdb_openmp_setup] != ""} { if {[gdb_openmp_setup $binfile] != ""} { untested "could not set up OpenMP environment" - return -1 + return } } diff --git a/gdb/testsuite/gdb.threads/omp-task.exp b/gdb/testsuite/gdb.threads/omp-task.exp index 636bcf989159..a7f39933d744 100644 --- a/gdb/testsuite/gdb.threads/omp-task.exp +++ b/gdb/testsuite/gdb.threads/omp-task.exp @@ -30,7 +30,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile $opts]} { if {[info procs gdb_openmp_setup] != ""} { if {[gdb_openmp_setup $binfile] != ""} { untested "could not set up OpenMP environment" - return -1 + return } } diff --git a/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp b/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp index e394edf53ea7..8a2b054dcc41 100644 --- a/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp +++ b/gdb/testsuite/gdb.threads/process-dies-while-detaching.exp @@ -219,7 +219,7 @@ proc test_detach {multi_process cmd} { clean_restart ${::testfile} if {![runto_main]} { - return -1 + return } if {$multi_process} { @@ -247,7 +247,7 @@ proc test_detach_watch {wp multi_process cmd} { clean_restart ${::testfile} if {![runto_main]} { - return -1 + return } if {$multi_process} { @@ -295,7 +295,7 @@ proc test_detach_killed_outside {multi_process cmd} { clean_restart ${::testfile} if {![runto_main]} { - return -1 + return } gdb_test_no_output "set breakpoint always-inserted on" @@ -311,7 +311,7 @@ proc test_detach_killed_outside {multi_process cmd} { set childpid [get_integer_valueof "mypid" -1] if { $childpid == -1 } { untested "failed to extract child pid" - return -1 + return } remote_exec target "kill -9 ${childpid}" @@ -345,7 +345,7 @@ proc do_test {multi_process cmd} { if {[build_executable "failed to build" \ $testfile $srcfile $options] == -1} { - return -1 + return } test_detach $multi_process $cmd diff --git a/gdb/testsuite/gdb.threads/siginfo-threads.exp b/gdb/testsuite/gdb.threads/siginfo-threads.exp index acf1185cdfc5..6b095ac968ad 100644 --- a/gdb/testsuite/gdb.threads/siginfo-threads.exp +++ b/gdb/testsuite/gdb.threads/siginfo-threads.exp @@ -62,7 +62,7 @@ for {set sigcount 0} {$sigcount < 4} {incr sigcount} { } } if {$sigusr == ""} { - return -1 + return } set test "signal $sigcount si_signo" diff --git a/gdb/testsuite/gdb.threads/staticthreads.exp b/gdb/testsuite/gdb.threads/staticthreads.exp index bc36d87f7d70..b25c0ae4e3b9 100644 --- a/gdb/testsuite/gdb.threads/staticthreads.exp +++ b/gdb/testsuite/gdb.threads/staticthreads.exp @@ -30,7 +30,7 @@ foreach_with_prefix have_tls { "-DHAVE_TLS" "" } { break } if { $have_tls == "" } { - return -1 + return } } @@ -99,7 +99,7 @@ clean_restart ${::testfile} if { "$have_tls" != "" } { if {![runto_main]} { - return -1 + return } gdb_breakpoint [gdb_get_line_number "tlsvar-is-set"] gdb_continue_to_breakpoint "tlsvar-is-set" ".* tlsvar-is-set .*" diff --git a/gdb/testsuite/gdb.threads/step-over-exec.exp b/gdb/testsuite/gdb.threads/step-over-exec.exp index 667be33ef99d..1409b908d61d 100644 --- a/gdb/testsuite/gdb.threads/step-over-exec.exp +++ b/gdb/testsuite/gdb.threads/step-over-exec.exp @@ -63,12 +63,12 @@ proc do_test { execr_thread different_text_segments displaced_stepping } { # Compile execr binary (the one that does the exec). if {[gdb_compile_pthreads $execr_srcs $execr_binfile executable $execr_opts] != "" } { - return -1 + return } # Compile the second binary (the one that gets exec'd). if {[gdb_compile $execd_srcs $execd_binfile executable $execd_opts] != "" } { - return -1 + return } clean_restart diff --git a/gdb/testsuite/gdb.threads/stepi-over-clone.exp b/gdb/testsuite/gdb.threads/stepi-over-clone.exp index f59c6275c5d4..673d77f0028b 100644 --- a/gdb/testsuite/gdb.threads/stepi-over-clone.exp +++ b/gdb/testsuite/gdb.threads/stepi-over-clone.exp @@ -85,7 +85,7 @@ gdb_test_multiple "disassemble" "" { -re "^End of assembler dump\\.\r\n$gdb_prompt $" { if { [llength $syscall_addrs] == 0 } { unsupported "no syscalls found" - return -1 + return } } } diff --git a/gdb/testsuite/gdb.threads/thread-specific-bp.exp b/gdb/testsuite/gdb.threads/thread-specific-bp.exp index d698b0ce96b1..a40ff71411bc 100644 --- a/gdb/testsuite/gdb.threads/thread-specific-bp.exp +++ b/gdb/testsuite/gdb.threads/thread-specific-bp.exp @@ -48,12 +48,12 @@ proc check_thread_specific_breakpoint {non_stop} { global gdb_prompt if { ![runto_main] } { - return -1 + return } set main_thre [get_thread_id "main"] if { $main_thre < 0 } { - return -1 + return } gdb_breakpoint "start" @@ -61,7 +61,7 @@ proc check_thread_specific_breakpoint {non_stop} { set start_thre [get_thread_id "start"] if { $start_thre < 0 } { - return -1 + return } # Check that multiple uses of 'thread' keyword give an error. diff --git a/gdb/testsuite/gdb.threads/threadapply.exp b/gdb/testsuite/gdb.threads/threadapply.exp index 7fdc647705a9..f405bfc52c91 100644 --- a/gdb/testsuite/gdb.threads/threadapply.exp +++ b/gdb/testsuite/gdb.threads/threadapply.exp @@ -76,7 +76,7 @@ proc thr_apply_detach {thread_set} { clean_restart ${::testfile} if {![runto_main]} { - return -1 + return } gdb_breakpoint "$break_line" diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp index aa39f6509e9c..818dce751959 100644 --- a/gdb/testsuite/gdb.threads/threadcrash.exp +++ b/gdb/testsuite/gdb.threads/threadcrash.exp @@ -248,7 +248,7 @@ proc_with_prefix test_gcore {} { "setup SIGUSR2" if {![runto_main]} { - return -1 + return } gdb_test "continue" ".*Segmentation fault.*" "continue to crash" diff --git a/gdb/testsuite/gdb.threads/threads-after-exec.exp b/gdb/testsuite/gdb.threads/threads-after-exec.exp index fd8550d3e99e..74cc0f4495d1 100644 --- a/gdb/testsuite/gdb.threads/threads-after-exec.exp +++ b/gdb/testsuite/gdb.threads/threads-after-exec.exp @@ -20,7 +20,7 @@ standard_testfile .c proc do_test { } { if {[prepare_for_testing "failed to prepare" $::testfile $::srcfile {debug pthreads}]} { - return -1 + return } if {![runto_main]} { diff --git a/gdb/testsuite/gdb.threads/tls.exp b/gdb/testsuite/gdb.threads/tls.exp index bf48a6f9fc9e..96e41eed411f 100644 --- a/gdb/testsuite/gdb.threads/tls.exp +++ b/gdb/testsuite/gdb.threads/tls.exp @@ -165,7 +165,7 @@ gdb_test_multiple "print a_thread_local" "" { } if {![runto_main]} { - return 0 + return } # Set a breakpoint at the "spin" routine to @@ -190,7 +190,7 @@ gdb_expect { # This is the first symptom if the gcc and binutils versions # in use support TLS, but the system glibc does not. unsupported "continue to first thread: system does not support TLS" - return -1 + return } -re ".*$inferior_exited_re normally.*$gdb_prompt $" { fail "continue to first thread: program runaway" diff --git a/gdb/testsuite/gdb.threads/watchpoint-fork.exp b/gdb/testsuite/gdb.threads/watchpoint-fork.exp index a57edca20aed..3654b84c55c6 100644 --- a/gdb/testsuite/gdb.threads/watchpoint-fork.exp +++ b/gdb/testsuite/gdb.threads/watchpoint-fork.exp @@ -47,7 +47,7 @@ proc test {type symbol} { [list $srcfile_main ${testfile}-${type}.c] \ [list debug additional_flags=-D$symbol \ additional_flags=-DDEBUG=$debug]] == -1} { - return -1 + return } clean_restart $executable diff --git a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp index f56661d7a5c2..192996b51ca9 100644 --- a/gdb/testsuite/gdb.threads/watchthreads-reorder.exp +++ b/gdb/testsuite/gdb.threads/watchthreads-reorder.exp @@ -42,7 +42,7 @@ foreach reorder {0 1} { with_test_prefix "reorder$reorder" { gdb_test "set can-use-hw-watchpoints 1" if {![runto_main]} { - return -1 + return } # Use "rwatch" as "watch" would report the watchpoint changed just based on its