From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id yVEUIm0F72ky5z0AWB0awg (envelope-from ) for ; Mon, 27 Apr 2026 02:42:53 -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=CCFLoIy/; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 84DCF1E0BA; Mon, 27 Apr 2026 02:42:53 -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 DAF821E093 for ; Mon, 27 Apr 2026 02:42:51 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 886724BA23C0 for ; Mon, 27 Apr 2026 06:42:51 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 886724BA23C0 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=CCFLoIy/ Received: from mail-dy1-x1331.google.com (mail-dy1-x1331.google.com [IPv6:2607:f8b0:4864:20::1331]) by sourceware.org (Postfix) with ESMTPS id 186194BB1C3E for ; Mon, 27 Apr 2026 06:36:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 186194BB1C3E 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 186194BB1C3E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::1331 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777271805; cv=none; b=SoKz1UI1bHiHfRVfvC1a2x5c8oqnzVzjpJVJlByJrubfYCHN7yseXGQv+3yeYYOHjszg0zAxz3vDdTrtxPZTO7vpRMkLqRJgtOzFHbhm1Fyg6vsXGFqV3XnSLEaiiYJ+h2VkJKy6J0fPheSVf5Xdy4gbpyw0lOTz9MnBCsuEWD4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777271805; c=relaxed/simple; bh=ORzC0fDnhqGmNc/9t/Xd6tdmr7zlGX4EgxUJIM+d7do=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=rWWnmuyPUzmWjlFWC+KzmxYHvwIssdfYv/xJVv06Cr3YkpsLpSs8zAUpEYpqO8IisN9R9/RFBq16PWsWjcfehxAVXKUovExxDuVaCdu126CuC140anL4wqPUZGG5+3FoeegA+fVEqKxsj0c/Msz39zXUVU6DxvqnftjGrAjNCS4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 186194BB1C3E Received: by mail-dy1-x1331.google.com with SMTP id 5a478bee46e88-2dedf5f88adso4576045eec.1 for ; Sun, 26 Apr 2026 23:36:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1777271804; x=1777876604; 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=pGB14BYd7xPpzsC7foSmV5JOI1fBZ+eFj/UaIXjiwlY=; b=CCFLoIy/ewo7HRn8COBj7WVAk/bAUOyre2XdyH/TgOyK6dUzXnPQZrZxm/4HOIV8GC 45eUZfzcfLVCJXGgkM8g4MfXnr9gyoNZ/DVwcRvnEnp2MqGM1Ex643jm7dF9vygfA1WE rokG+3dN50Ng8d1JUA2hO3lOOH68iBpGKtw5x3QtS1nxNeBMVYj6WOUQ0+e3ZvuxChbi iFsmZg0aE2IordeWJzvGth3rtZLV6rt9Y/0YjYqZ2tG4UtfRQIFQAfgFe2CGq5XkfdUS FjaMCU6yTgLZ0kTmN3lDt54gmVFMZXt5wA8f8IRl9h8cLxTN0SfPnbuQcxmcNy3gA/3B XDUg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777271804; x=1777876604; 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=pGB14BYd7xPpzsC7foSmV5JOI1fBZ+eFj/UaIXjiwlY=; b=fzd5Py9vaD4fQepPDMA9SW/P0SJPLJoRcoCdvWx/ZBD9RUyrDmbo8wUcqhFiGqVKpQ rTUl0Y3DAA0LtIH00eZZ+SPcaud/qugJczS7zzZStKuVM5y8/QfUVQloxPxCRafnSB23 J1XS0Lg1xQDwHC37gsxGfH3bXcfynWRecXcvG8WOTG5YQJWJ5B3HkA2CZE7lBqYZlFhQ eP4Q3WaDaxuf9C7cSKJpvTeVnhGBYcSl2D8ilQTH2GZQ9oUfZIW5uPuRvFqnkv7zFR3i VESVLSNDFb8Z72D+wEkcjiUo7ql43lkJdnKYOJyVJltQPzGfyHyC4GYcwbI/WVDtkr3X 7Iog== X-Gm-Message-State: AOJu0YxjEGtQI43pgklZQfQj89rJmQUPe1ULSMS6P5vxyFTVJkBOLFEJ Fwx8JGBx4MOSCJMXtQpseF5AJutTdwFKEeuCBhAEZeJl74uCnPFfZcBdVpxvr5j9y2iC9cu7ODR 0YTOS X-Gm-Gg: AeBDievK+kruvTuWw3mrGByUEUaarlaPs1qZkXSlxn9lqIYtyS49EridWIfLZ4mVS9T 1KobpZC+qV48gdyLwRWKUJbai/ScBxrCOENGFb140L/oe3skbeg7+67mITdqMZCkDdqw4suVfna Vbw37dOfZI5db36qAPBGpOmToOetK2mrPDyyLK15b2sBvqGvAznBgipt04mA37A0Lw2LpNa9YOJ m3AENxwY7xJUMUFFPRjqnGboOLZL16KfktlZGdSnaJ+RaBWUXtJ3IsfKdOKkAnNxBfLhX7u2a1e rNpCjgNtUUaiutq7QabTbuPoO6AOu8sCBfSCxQm7jvQlYyinuzjnxlSdQtt5WaPNCmMugvk1vsj UaOiRX0wZ3eIKq3DMVNDMK9hxy428cOC9rbsMUbUo9SH7RIPiIbSO6TVm/5WOYHgleMAHAmC/ga oxoSyfLezB1l9fUesdgnXTYbLSIPt7/8maFEBolSmf0wRM X-Received: by 2002:a05:7301:3d19:b0:2d1:9b35:4edb with SMTP id 5a478bee46e88-2e41a1e3fb6mr15912213eec.0.1777271803709; Sun, 26 Apr 2026 23:36:43 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8083:33bc:f32e:9aa5:b915]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2e53ccce440sm40868057eec.14.2026.04.26.23.36.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Apr 2026 23:36:43 -0700 (PDT) From: Thiago Jung Bauermann To: gdb-patches@sourceware.org Subject: [PATCH 26/36] GDB: testsuite: MI: Don't return -1 from top-level (manual) Date: Mon, 27 Apr 2026 03:34:50 -0300 Message-ID: <20260427063500.3847618-27-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 with_test_prefix, foreach_with_prefix, gdb_expect. - procedure whose callers don't use the return value; In one casae the whole if block was in a single line: if { condition } { return -1 } I changed the formatting to the multi-line style we tend to use. --- gdb/testsuite/gdb.mi/gdb2549.exp | 4 ++-- gdb/testsuite/gdb.mi/gdb701.exp | 4 ++-- gdb/testsuite/gdb.mi/gdb792.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-async-run.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-async.exp | 6 +++--- gdb/testsuite/gdb.mi/mi-basics.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-break-qualified.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-break.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-cli.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-cmd-param-changed.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-complete.exp | 4 ++-- .../gdb.mi/mi-condbreak-call-thr-state.exp | 2 +- gdb/testsuite/gdb.mi/mi-console.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-corefile.exp | 2 +- gdb/testsuite/gdb.mi/mi-detach.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-disassemble.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-eval.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-exec-run.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-file.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-fill-memory.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-frame-regs.exp | 8 +++++--- .../gdb.mi/mi-inheritance-syntax-error.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-pending.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-read-memory.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-reg-undefined.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-regs.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-return.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-reverse.exp | 6 +++--- gdb/testsuite/gdb.mi/mi-simplerun.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-solib.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-stack.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-start.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-stepi.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-syn-frame.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-until.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-var-cmd.exp | 2 +- gdb/testsuite/gdb.mi/mi-var-cp.exp | 6 +++--- gdb/testsuite/gdb.mi/mi-var-rtti.exp | 2 +- gdb/testsuite/gdb.mi/mi-vla-c99.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-vla-fortran.exp | 4 ++-- gdb/testsuite/gdb.mi/mi-watch.exp | 4 ++-- gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp | 14 +++++++------- .../gdb.mi/user-selected-context-sync.exp | 2 +- 43 files changed, 92 insertions(+), 90 deletions(-) diff --git a/gdb/testsuite/gdb.mi/gdb2549.exp b/gdb/testsuite/gdb.mi/gdb2549.exp index c644e3bd1d32..570e1bdeb4a9 100644 --- a/gdb/testsuite/gdb.mi/gdb2549.exp +++ b/gdb/testsuite/gdb.mi/gdb2549.exp @@ -28,8 +28,8 @@ set MIFLAGS "-i=mi" standard_testfile basics.c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } proc register_tests_no_exec { } { diff --git a/gdb/testsuite/gdb.mi/gdb701.exp b/gdb/testsuite/gdb.mi/gdb701.exp index d72bd1ae81bf..dd6fd6181b2c 100644 --- a/gdb/testsuite/gdb.mi/gdb701.exp +++ b/gdb/testsuite/gdb.mi/gdb701.exp @@ -23,8 +23,8 @@ set MIFLAGS "-i=mi" standard_testfile if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable debug] != ""} { - untested "failed to compile" - return -1 + untested "failed to compile" + return } # When varobj reports the types of objects, it often isn't really reporting diff --git a/gdb/testsuite/gdb.mi/gdb792.exp b/gdb/testsuite/gdb.mi/gdb792.exp index e2df8216956a..d0b7a97f02de 100644 --- a/gdb/testsuite/gdb.mi/gdb792.exp +++ b/gdb/testsuite/gdb.mi/gdb792.exp @@ -24,8 +24,8 @@ set MIFLAGS "-i=mi" standard_testfile .cc if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable {debug c++}] != ""} { - untested "failed to compile" - return -1 + untested "failed to compile" + return } mi_clean_restart $::testfile diff --git a/gdb/testsuite/gdb.mi/mi-async-run.exp b/gdb/testsuite/gdb.mi/mi-async-run.exp index 5a4077b6d198..a60a85393225 100644 --- a/gdb/testsuite/gdb.mi/mi-async-run.exp +++ b/gdb/testsuite/gdb.mi/mi-async-run.exp @@ -18,8 +18,8 @@ load_lib mi-support.exp standard_testfile if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } # Test the resolution of PR 18077 diff --git a/gdb/testsuite/gdb.mi/mi-async.exp b/gdb/testsuite/gdb.mi/mi-async.exp index d1674cdfe49f..7f7603cf7068 100644 --- a/gdb/testsuite/gdb.mi/mi-async.exp +++ b/gdb/testsuite/gdb.mi/mi-async.exp @@ -23,7 +23,7 @@ # we're actually testing native. require isnative if {![istarget *-linux*]} { - return + return } # Check if start command is supported. @@ -34,8 +34,8 @@ load_lib mi-support.exp standard_testfile basics.c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } # The plan is for async mode to become the default but toggle for now. diff --git a/gdb/testsuite/gdb.mi/mi-basics.exp b/gdb/testsuite/gdb.mi/mi-basics.exp index 27ac334e4a30..8f18f41af04b 100644 --- a/gdb/testsuite/gdb.mi/mi-basics.exp +++ b/gdb/testsuite/gdb.mi/mi-basics.exp @@ -37,8 +37,8 @@ set testsubdir [standard_output_file ""] set envirodir [string_to_regexp $testsubdir] if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } # In this file we want to test if the operations needed by the following diff --git a/gdb/testsuite/gdb.mi/mi-break-qualified.exp b/gdb/testsuite/gdb.mi/mi-break-qualified.exp index 1bb8258b9536..d196c37ef78b 100644 --- a/gdb/testsuite/gdb.mi/mi-break-qualified.exp +++ b/gdb/testsuite/gdb.mi/mi-break-qualified.exp @@ -24,8 +24,8 @@ set MIFLAGS "-i=mi" standard_testfile .cc if {[build_executable $testfile.exp $testfile $srcfile {c++ debug}] == -1} { - untested "failed to compile" - return -1 + untested "failed to compile" + return } set loc_ns_func_line [gdb_get_line_number "location NS::func here"] diff --git a/gdb/testsuite/gdb.mi/mi-break.exp b/gdb/testsuite/gdb.mi/mi-break.exp index a7b64faa8a5a..b0df2cedc4e5 100644 --- a/gdb/testsuite/gdb.mi/mi-break.exp +++ b/gdb/testsuite/gdb.mi/mi-break.exp @@ -26,8 +26,8 @@ set MIFLAGS "-i=mi" standard_testfile basics.c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } # Locate line numbers in basics.c. diff --git a/gdb/testsuite/gdb.mi/mi-cli.exp b/gdb/testsuite/gdb.mi/mi-cli.exp index e3a5d3b87a25..9d696e4b291c 100644 --- a/gdb/testsuite/gdb.mi/mi-cli.exp +++ b/gdb/testsuite/gdb.mi/mi-cli.exp @@ -25,8 +25,8 @@ set MIFLAGS "-i=mi" standard_testfile basics.c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } mi_clean_restart $::testfile diff --git a/gdb/testsuite/gdb.mi/mi-cmd-param-changed.exp b/gdb/testsuite/gdb.mi/mi-cmd-param-changed.exp index 29c44c8475c3..9d43fc6e21c0 100644 --- a/gdb/testsuite/gdb.mi/mi-cmd-param-changed.exp +++ b/gdb/testsuite/gdb.mi/mi-cmd-param-changed.exp @@ -22,8 +22,8 @@ set MIFLAGS "-i=mi" standard_testfile basics.c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } proc test_command_param_changed { } { diff --git a/gdb/testsuite/gdb.mi/mi-complete.exp b/gdb/testsuite/gdb.mi/mi-complete.exp index 4038ae57f8ac..54084cab86d3 100644 --- a/gdb/testsuite/gdb.mi/mi-complete.exp +++ b/gdb/testsuite/gdb.mi/mi-complete.exp @@ -22,8 +22,8 @@ set MIFLAGS "-i=mi" standard_testfile .cc if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug c++}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } mi_clean_restart $::testfile diff --git a/gdb/testsuite/gdb.mi/mi-condbreak-call-thr-state.exp b/gdb/testsuite/gdb.mi/mi-condbreak-call-thr-state.exp index 34ac495bb5d6..bda6753d65e0 100644 --- a/gdb/testsuite/gdb.mi/mi-condbreak-call-thr-state.exp +++ b/gdb/testsuite/gdb.mi/mi-condbreak-call-thr-state.exp @@ -56,7 +56,7 @@ proc test { variant } { $testfile \ "${srcfile} ${srcfile2}" \ $options] == -1} { - return -1 + return } if {[mi_clean_restart $::testfile]} { diff --git a/gdb/testsuite/gdb.mi/mi-console.exp b/gdb/testsuite/gdb.mi/mi-console.exp index a7a083a56766..23ae1a280997 100644 --- a/gdb/testsuite/gdb.mi/mi-console.exp +++ b/gdb/testsuite/gdb.mi/mi-console.exp @@ -49,8 +49,8 @@ proc semihosted_string { string } { standard_testfile if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } if {[mi_clean_restart $::testfile]} { diff --git a/gdb/testsuite/gdb.mi/mi-corefile.exp b/gdb/testsuite/gdb.mi/mi-corefile.exp index 67c6183f3867..864c8f74ddcf 100644 --- a/gdb/testsuite/gdb.mi/mi-corefile.exp +++ b/gdb/testsuite/gdb.mi/mi-corefile.exp @@ -30,7 +30,7 @@ if {[build_executable $testfile.exp $testfile $srcfile debug] == -1} { set corefile [core_find $binfile {}] if {$corefile == ""} { untested "unable to create or find corefile" - return 0 + return } if {[mi_gdb_start]} { diff --git a/gdb/testsuite/gdb.mi/mi-detach.exp b/gdb/testsuite/gdb.mi/mi-detach.exp index 62bd699ea8ac..e82e216315e7 100644 --- a/gdb/testsuite/gdb.mi/mi-detach.exp +++ b/gdb/testsuite/gdb.mi/mi-detach.exp @@ -21,8 +21,8 @@ set MIFLAGS "-i=mi" standard_testfile basics.c if {[build_executable $testfile.exp $testfile $srcfile {debug}] == -1} { - untested "failed to compile" - return -1 + untested "failed to compile" + return } mi_clean_restart $::testfile diff --git a/gdb/testsuite/gdb.mi/mi-disassemble.exp b/gdb/testsuite/gdb.mi/mi-disassemble.exp index cd4c91bd06a6..2ecbce193c75 100644 --- a/gdb/testsuite/gdb.mi/mi-disassemble.exp +++ b/gdb/testsuite/gdb.mi/mi-disassemble.exp @@ -26,8 +26,8 @@ set MIFLAGS "-i=mi" standard_testfile basics.c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } proc test_disassembly_only {} { diff --git a/gdb/testsuite/gdb.mi/mi-eval.exp b/gdb/testsuite/gdb.mi/mi-eval.exp index 6720f878538a..f2761f46219b 100644 --- a/gdb/testsuite/gdb.mi/mi-eval.exp +++ b/gdb/testsuite/gdb.mi/mi-eval.exp @@ -28,8 +28,8 @@ set MIFLAGS "-i=mi" standard_testfile basics.c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } if {[mi_clean_restart $::testfile]} { diff --git a/gdb/testsuite/gdb.mi/mi-exec-run.exp b/gdb/testsuite/gdb.mi/mi-exec-run.exp index 9707504aa21c..d7a680daa6c6 100644 --- a/gdb/testsuite/gdb.mi/mi-exec-run.exp +++ b/gdb/testsuite/gdb.mi/mi-exec-run.exp @@ -35,8 +35,8 @@ set have_startup_shell [have_startup_shell] standard_testfile mi-start.c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "could not build mi-exec-run" - return -1 + untested "could not build mi-exec-run" + return } # The test proper. INFTTY_MODE determines whether "set inferior-tty" diff --git a/gdb/testsuite/gdb.mi/mi-file.exp b/gdb/testsuite/gdb.mi/mi-file.exp index 8ca0511f55d8..80411b82ff74 100644 --- a/gdb/testsuite/gdb.mi/mi-file.exp +++ b/gdb/testsuite/gdb.mi/mi-file.exp @@ -21,8 +21,8 @@ set MIFLAGS "-i=mi" standard_testfile basics.c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } if {[mi_clean_restart]} { diff --git a/gdb/testsuite/gdb.mi/mi-fill-memory.exp b/gdb/testsuite/gdb.mi/mi-fill-memory.exp index 524732bebbd6..f9bd13209822 100644 --- a/gdb/testsuite/gdb.mi/mi-fill-memory.exp +++ b/gdb/testsuite/gdb.mi/mi-fill-memory.exp @@ -23,8 +23,8 @@ set MIFLAGS "-i=mi" standard_testfile "mi-read-memory" if { [gdb_compile "${srcdir}/${subdir}/${srcfile}.c" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } mi_clean_restart $::testfile diff --git a/gdb/testsuite/gdb.mi/mi-frame-regs.exp b/gdb/testsuite/gdb.mi/mi-frame-regs.exp index 65e3bd93d4a4..5d408f4d23e6 100644 --- a/gdb/testsuite/gdb.mi/mi-frame-regs.exp +++ b/gdb/testsuite/gdb.mi/mi-frame-regs.exp @@ -26,8 +26,8 @@ standard_testfile basics.c if {[gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \ executable {debug}] != "" } then { - untested "failed to compile" - return -1 + untested "failed to compile" + return } # Return the address of the specified breakpoint. @@ -98,7 +98,9 @@ proc_with_prefix do_floating_varobj_test {} { # Get the address of the current breakpoint. set bpaddr [breakpoint_address $bpnum] - if {$bpaddr == ""} { return } + if {$bpaddr == ""} { + return + } # Check that the addresses are the same. gdb_assert [expr {$bpaddr == $pcval}] "\$pc equals address of breakpoint in callee$i" diff --git a/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp b/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp index d9baa7639525..17ed3f1dcefd 100644 --- a/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp +++ b/gdb/testsuite/gdb.mi/mi-inheritance-syntax-error.exp @@ -21,8 +21,8 @@ set MIFLAGS "-i=mi" standard_testfile .cc if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable {debug c++}] != ""} { - untested "failed to compile" - return -1 + untested "failed to compile" + return } if {[mi_clean_restart $::testfile]} { diff --git a/gdb/testsuite/gdb.mi/mi-pending.exp b/gdb/testsuite/gdb.mi/mi-pending.exp index 1ad9aecdc8b4..51be357d4c0a 100644 --- a/gdb/testsuite/gdb.mi/mi-pending.exp +++ b/gdb/testsuite/gdb.mi/mi-pending.exp @@ -141,10 +141,10 @@ set testname "run till MI pending breakpoint on pendfunc3 on thread 2" gdb_expect { -re "\\*stopped,reason=\"breakpoint-hit\",disp=\"keep\",bkptno=\"4\",frame=\{addr=\"$hex\",func=\"pendfunc3\".*thread-id=\"2\".*" { pass $testname - return 0 + return } timeout { fail "$testname (timeout)" - return -1 + return } } diff --git a/gdb/testsuite/gdb.mi/mi-read-memory.exp b/gdb/testsuite/gdb.mi/mi-read-memory.exp index 782c0ee13dca..035c31e2ae84 100644 --- a/gdb/testsuite/gdb.mi/mi-read-memory.exp +++ b/gdb/testsuite/gdb.mi/mi-read-memory.exp @@ -21,8 +21,8 @@ set MIFLAGS "-i=mi" standard_testfile if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } mi_clean_restart $::testfile diff --git a/gdb/testsuite/gdb.mi/mi-reg-undefined.exp b/gdb/testsuite/gdb.mi/mi-reg-undefined.exp index dd7b2961b03f..725925d01a81 100644 --- a/gdb/testsuite/gdb.mi/mi-reg-undefined.exp +++ b/gdb/testsuite/gdb.mi/mi-reg-undefined.exp @@ -25,8 +25,8 @@ require is_x86_64_m64_target standard_testfile .S if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nopie}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } if {[mi_clean_restart $::testfile]} { diff --git a/gdb/testsuite/gdb.mi/mi-regs.exp b/gdb/testsuite/gdb.mi/mi-regs.exp index 7aa4fb62c7ac..756855d9ded0 100644 --- a/gdb/testsuite/gdb.mi/mi-regs.exp +++ b/gdb/testsuite/gdb.mi/mi-regs.exp @@ -28,8 +28,8 @@ set MIFLAGS "-i=mi" standard_testfile basics.c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } proc sparc_register_tests_no_exec { } { diff --git a/gdb/testsuite/gdb.mi/mi-return.exp b/gdb/testsuite/gdb.mi/mi-return.exp index bd90ac79893f..c9265c80317a 100644 --- a/gdb/testsuite/gdb.mi/mi-return.exp +++ b/gdb/testsuite/gdb.mi/mi-return.exp @@ -27,8 +27,8 @@ set MIFLAGS "-i=mi" standard_testfile basics.c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } if {[mi_clean_restart $::testfile]} { diff --git a/gdb/testsuite/gdb.mi/mi-reverse.exp b/gdb/testsuite/gdb.mi/mi-reverse.exp index 100857c6e299..dacb86048f60 100644 --- a/gdb/testsuite/gdb.mi/mi-reverse.exp +++ b/gdb/testsuite/gdb.mi/mi-reverse.exp @@ -35,8 +35,8 @@ set MIFLAGS "-i=mi" standard_testfile basics.c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } mi_clean_restart $::testfile @@ -48,7 +48,7 @@ if {[supports_process_record]} { "=record-started,thread-group=\"i1\",method=\"full\"\r\n\\^done" \ "Turn on process record"]} { warning "Fail to activate process record/replay, tests in this group will not be performed.\n" - return -1 + return } } diff --git a/gdb/testsuite/gdb.mi/mi-simplerun.exp b/gdb/testsuite/gdb.mi/mi-simplerun.exp index 8f18a63e46cc..98bc3da89191 100644 --- a/gdb/testsuite/gdb.mi/mi-simplerun.exp +++ b/gdb/testsuite/gdb.mi/mi-simplerun.exp @@ -30,8 +30,8 @@ set MIFLAGS "-i=mi" standard_testfile basics.c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } if {[mi_clean_restart $::testfile]} { diff --git a/gdb/testsuite/gdb.mi/mi-solib.exp b/gdb/testsuite/gdb.mi/mi-solib.exp index 0a13df407a09..a3c4d20b0004 100644 --- a/gdb/testsuite/gdb.mi/mi-solib.exp +++ b/gdb/testsuite/gdb.mi/mi-solib.exp @@ -30,8 +30,8 @@ set bin_flags [list debug shlib=${binfile_lib}] if { [gdb_compile_shlib ${srcfile_lib} ${binfile_lib} $lib_flags] != "" || [gdb_compile ${srcfile_main} ${binfile} executable $bin_flags] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } if {[mi_clean_restart $::testfile]} { diff --git a/gdb/testsuite/gdb.mi/mi-stack.exp b/gdb/testsuite/gdb.mi/mi-stack.exp index 2b7884076da1..fbfc0619d008 100644 --- a/gdb/testsuite/gdb.mi/mi-stack.exp +++ b/gdb/testsuite/gdb.mi/mi-stack.exp @@ -28,8 +28,8 @@ set MIFLAGS "-i=mi" standard_testfile if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } if {[mi_clean_restart $::testfile]} { diff --git a/gdb/testsuite/gdb.mi/mi-start.exp b/gdb/testsuite/gdb.mi/mi-start.exp index 5a232f0e6cd4..ff18866987f0 100644 --- a/gdb/testsuite/gdb.mi/mi-start.exp +++ b/gdb/testsuite/gdb.mi/mi-start.exp @@ -24,8 +24,8 @@ require !use_gdb_stub standard_testfile mi-start.c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "could not build mi-start" - return -1 + untested "could not build mi-start" + return } if {[mi_clean_restart $::testfile]} { diff --git a/gdb/testsuite/gdb.mi/mi-stepi.exp b/gdb/testsuite/gdb.mi/mi-stepi.exp index fe8854a79050..8b9ca60ac434 100644 --- a/gdb/testsuite/gdb.mi/mi-stepi.exp +++ b/gdb/testsuite/gdb.mi/mi-stepi.exp @@ -26,8 +26,8 @@ set MIFLAGS "-i=mi" standard_testfile basics.c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } proc test_stepi_nexti {} { diff --git a/gdb/testsuite/gdb.mi/mi-syn-frame.exp b/gdb/testsuite/gdb.mi/mi-syn-frame.exp index 410849a910a5..f3b1a71ccb3c 100644 --- a/gdb/testsuite/gdb.mi/mi-syn-frame.exp +++ b/gdb/testsuite/gdb.mi/mi-syn-frame.exp @@ -25,8 +25,8 @@ set any "\[^\"\]+" standard_testfile if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } mi_clean_restart $::testfile diff --git a/gdb/testsuite/gdb.mi/mi-until.exp b/gdb/testsuite/gdb.mi/mi-until.exp index a84a1238ae45..f508ce292e1f 100644 --- a/gdb/testsuite/gdb.mi/mi-until.exp +++ b/gdb/testsuite/gdb.mi/mi-until.exp @@ -27,8 +27,8 @@ set MIFLAGS "-i=mi" standard_testfile until.c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } if {[mi_clean_restart $::testfile]} { diff --git a/gdb/testsuite/gdb.mi/mi-var-cmd.exp b/gdb/testsuite/gdb.mi/mi-var-cmd.exp index bf207dad255e..a08528002cb1 100644 --- a/gdb/testsuite/gdb.mi/mi-var-cmd.exp +++ b/gdb/testsuite/gdb.mi/mi-var-cmd.exp @@ -592,7 +592,7 @@ lappend inline_tests floating foreach_with_prefix inline_test $inline_tests { if { [mi_run_inline_test $inline_test] < 0 } { - return -1 + return } } diff --git a/gdb/testsuite/gdb.mi/mi-var-cp.exp b/gdb/testsuite/gdb.mi/mi-var-cp.exp index db9efd67fd3d..fb850ad51db5 100644 --- a/gdb/testsuite/gdb.mi/mi-var-cp.exp +++ b/gdb/testsuite/gdb.mi/mi-var-cp.exp @@ -21,8 +21,8 @@ set MIFLAGS "-i=mi" standard_testfile .cc if {[gdb_compile $srcdir/$subdir/$srcfile $binfile executable {debug c++}] != ""} { - untested "failed to compile" - return -1 + untested "failed to compile" + return } if {[mi_clean_restart $::testfile]} { @@ -41,7 +41,7 @@ set inline_tests { foreach_with_prefix inline_test $inline_tests { if { [mi_run_inline_test $inline_test] < 0 } { - return -1 + return } } diff --git a/gdb/testsuite/gdb.mi/mi-var-rtti.exp b/gdb/testsuite/gdb.mi/mi-var-rtti.exp index 9a98e2adfa9c..4a1bee241f9f 100644 --- a/gdb/testsuite/gdb.mi/mi-var-rtti.exp +++ b/gdb/testsuite/gdb.mi/mi-var-rtti.exp @@ -118,7 +118,7 @@ set inline_tests { foreach_with_prefix inline_test $inline_tests { if { [mi_run_inline_test $inline_test] < 0 } { - return -1 + return } } diff --git a/gdb/testsuite/gdb.mi/mi-vla-c99.exp b/gdb/testsuite/gdb.mi/mi-vla-c99.exp index 91934de2491d..5e3c8f549407 100644 --- a/gdb/testsuite/gdb.mi/mi-vla-c99.exp +++ b/gdb/testsuite/gdb.mi/mi-vla-c99.exp @@ -25,8 +25,8 @@ standard_testfile vla.c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" \ "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } if {[mi_clean_restart $::testfile]} { diff --git a/gdb/testsuite/gdb.mi/mi-vla-fortran.exp b/gdb/testsuite/gdb.mi/mi-vla-fortran.exp index fd144cb51e7a..0cc51a36f5ef 100644 --- a/gdb/testsuite/gdb.mi/mi-vla-fortran.exp +++ b/gdb/testsuite/gdb.mi/mi-vla-fortran.exp @@ -26,8 +26,8 @@ standard_testfile vla.f90 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \ {debug f90}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } # Depending on the compiler being used, diff --git a/gdb/testsuite/gdb.mi/mi-watch.exp b/gdb/testsuite/gdb.mi/mi-watch.exp index 4fcba501224c..5b01793aa3da 100644 --- a/gdb/testsuite/gdb.mi/mi-watch.exp +++ b/gdb/testsuite/gdb.mi/mi-watch.exp @@ -34,8 +34,8 @@ set MIFLAGS "-i=mi" standard_testfile basics.c if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } proc test_watchpoint_creation_and_listing {} { diff --git a/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp b/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp index fcea890d78af..adcd713453c6 100644 --- a/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp +++ b/gdb/testsuite/gdb.mi/mi2-amd64-entry-value.exp @@ -44,7 +44,7 @@ foreach name {different breakhere_different breakhere_validity breakhere_invalid with_test_prefix "entry-values=no" { if {[mi_runto_main] == -1} { - return -1 + return } mi_gdb_test "-gdb-set print entry-values no" {\^done} "no: set print entry-values" mi_send_resuming_command "exec-continue" "no: entry_equal: continue" @@ -63,7 +63,7 @@ with_test_prefix "entry-values=no" { with_test_prefix "entry-values=only" { if {[mi_runto_main] == -1} { - return -1 + return } mi_gdb_test "-gdb-set print entry-values only" {\^done} "only: set print entry-values" mi_send_resuming_command "exec-continue" "only: entry_equal: continue" @@ -82,7 +82,7 @@ with_test_prefix "entry-values=only" { with_test_prefix "entry-values=preferred" { if {[mi_runto_main] == -1} { - return -1 + return } mi_gdb_test "-gdb-set print entry-values preferred" {\^done} "preferred: set print entry-values" mi_send_resuming_command "exec-continue" "preferred: entry_equal: continue" @@ -101,7 +101,7 @@ with_test_prefix "entry-values=preferred" { with_test_prefix "entry-values=if-needed" { if {[mi_runto_main] == -1} { - return -1 + return } mi_gdb_test "-gdb-set print entry-values if-needed" {\^done} "if-needed: set print entry-values" mi_send_resuming_command "exec-continue" "if-needed: entry_equal: continue" @@ -120,7 +120,7 @@ with_test_prefix "entry-values=if-needed" { with_test_prefix "entry-values=both" { if {[mi_runto_main] == -1} { - return -1 + return } mi_gdb_test "-gdb-set print entry-values both" {\^done} "both: set print entry-values" mi_send_resuming_command "exec-continue" "both: entry_equal: continue" @@ -139,7 +139,7 @@ with_test_prefix "entry-values=both" { with_test_prefix "entry-values=compact" { if {[mi_runto_main] == -1} { - return -1 + return } mi_gdb_test "-gdb-set print entry-values compact" {\^done} "compact: set print entry-values" mi_send_resuming_command "exec-continue" "compact: entry_equal: continue" @@ -158,7 +158,7 @@ with_test_prefix "entry-values=compact" { with_test_prefix "entry-values=default" { if {[mi_runto_main] == -1} { - return -1 + return } mi_gdb_test "-gdb-set print entry-values default" {\^done} "default: set print entry-values" mi_send_resuming_command "exec-continue" "default: entry_equal: continue" diff --git a/gdb/testsuite/gdb.mi/user-selected-context-sync.exp b/gdb/testsuite/gdb.mi/user-selected-context-sync.exp index fea284b70125..d94e9eb75f40 100644 --- a/gdb/testsuite/gdb.mi/user-selected-context-sync.exp +++ b/gdb/testsuite/gdb.mi/user-selected-context-sync.exp @@ -392,7 +392,7 @@ proc_with_prefix test_setup { mode } { set any "\[^\r\n\]*" if { [mi_runto_main] < 0 } { - return -1 + return } # When using mi_expect_stop, we don't expect a prompt after the *stopped