From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 6VRmDECP8mm9ZgQAWB0awg (envelope-from ) for ; Wed, 29 Apr 2026 19:07:44 -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=Qp/rDCkN; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 1A6221E0CA; Wed, 29 Apr 2026 19:07:44 -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_MSPIKE_H2,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 138151E0B1 for ; Wed, 29 Apr 2026 19:07:40 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id E32434358A55 for ; Wed, 29 Apr 2026 23:07:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E32434358A55 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=Qp/rDCkN Received: from mail-vk1-xa2e.google.com (mail-vk1-xa2e.google.com [IPv6:2607:f8b0:4864:20::a2e]) by sourceware.org (Postfix) with ESMTPS id BAD824BB58A5 for ; Wed, 29 Apr 2026 23:06:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org BAD824BB58A5 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 BAD824BB58A5 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::a2e ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777503960; cv=none; b=ZfjI2kW0pdtvHBLx7gV5JMnS3TQw0mw0bNUnVrcmMJcV6nV57GJEqEpFGcMtUEahOYXQGb+UrTFC6hX+tCxC0CBwCyYGFq5e5tI3x6hfhx6X6rNumkmvreJcn3f7/fk1B28vJnfQzm9PDnJcbrIVJO69j0CSTnQSr8y03xX/a+w= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777503960; c=relaxed/simple; bh=WZ+kbQPyrZt6U+WDs6yqmqn6SfoQyHUhP1FqU0BZb84=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=eDaD2278iaovf/K11tuCj3gQOM7bmrCXnNoHC3eoa6S00RqDfi7LdPRqV0AQGFqLe+Ipmvhyym3sQyj4Py9gQx3w9XyNnbZgyE5seND1cOVnfdYV4twBhC7ouo3kWRr1kxqJoaGx5WF6pzhiiE8Kk8LrV2/NTB2SbE3w+/ktqTY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BAD824BB58A5 Received: by mail-vk1-xa2e.google.com with SMTP id 71dfb90a1353d-56a86f0a23bso301972e0c.0 for ; Wed, 29 Apr 2026 16:06:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1777503960; x=1778108760; 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=bMOJc5xpIWk1OrctRXc8P/Blf0dimOKgDcQMKSmFtE0=; b=Qp/rDCkNc8vxXlMCU9XnOgyVKHozShYDjSXkEL4z497f3I28QxUeVmLPeWPKpEo0YB S1Q3Nn/ll+/GGYNowAlaXIjEAfcthj+J3IqpipOPVX6Kae2TR0FTLWjMT3f184QvdOZZ v8cHySKerMFBInp9ufDdzFZ8UGSmVn1Za8Km1yVRwjHlHsiwTyxpwU5wFHUXTw3fnhcP gDaO2OhD6cEleqgH+q3t6kgH3w2oZtZVXl39Peqo7ir1m+7/Kxbmqtag4taIkBfVivMb GwR3b+quP4zmzpiUQP40+CRb27qBqIECkVN4cg/T7rxlZzSb13sw+fzXGJKokWaY4TE2 jRmw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777503960; x=1778108760; 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=bMOJc5xpIWk1OrctRXc8P/Blf0dimOKgDcQMKSmFtE0=; b=l9Ar447Ic7BUYjQiccYNUXDfsTtfR7wuLwd1We6fbDuxm8hKHu23pZr/nTTLUk4kBQ b2LOOAgpQLW4sHzArwFe/py24DBJy+BBgyBeS1N7hZbbMocsTHgjX3DtYMU62fh1lQNC tNHRphzzl/Bx5ayjftnriSgxPtzmfR2flmZ82MZJ1BnWpGPkgEdJ5pNRotRaFaCfRdUP EOARw0Q89Trs9No8z/vgS9wAnZgBxqd3/zi3ubcoUhlnNYu8nn/scHrThKKQ80KPyIJo kPb5hwCdKBz2XrPtMwuBCFSAUVDv3+L43UXHuWCbzWugm4/2t3obF9Khlx8mii/Qu/Jd Z/OQ== X-Gm-Message-State: AOJu0YyB8tqHsWUA8ACfC88rxADl0wsbQalEW91u0CXSzVZDyzELXoPg CWpT8bop1r5D6K0l0HiC7wCjIEogEQ2bxS2aicaciXtQOu0yA9t5BaQgsfiCChUxtzhxWS8yMgv wX0cY X-Gm-Gg: AeBDietIKH1OFZtR1csO2Iqf7Xj+1aZ+I9Bq1vhsp360cF0xBXL8kCdTqePp+rXMZAB Yt/BHyzDNQalSuOPBEsMpj9gugw2vmRHwBEJLdA3rbC2biW784D4/4FT42iCnGQvkOIe0YnTTEi QhoeA0EG2HgUGsUTqoiRdjBkxPFTKfsVk8YuY9VakGFDdDI7F7OXSB6PqiOsSodLvE23qkjLAwi j26yTQe1Pvpw2Y00klkjbw3Ld00kq5/zyKsHN8U8glep/lNVGFUXu37o0i5N0j4r+mGfLJGBFn1 Y83d1MLUp9su22fSyIDTBKTtiNd+/gLGqsWYixoajletQANMVNXSZcbeibNf5KnW/c/botsE1W4 Mx3i9eoxlwTmeom+3+byckN1+jWNaz+Zi2YZUrp2gtXpQw/n+khd5zkmMCqR2F1GtC2De5FowkI N/O1i4eVGOn6wGdMBobmSfHguo2X5jESTGW7xC4eheTFbo X-Received: by 2002:a05:6122:208b:b0:56e:f262:9109 with SMTP id 71dfb90a1353d-573c953836cmr108031e0c.2.1777503959976; Wed, 29 Apr 2026 16:05:59 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8083:f04c:42e3:5943:38f6]) by smtp.gmail.com with ESMTPSA id a1e0cc1a2514c-95cb75c4030sm1925625241.4.2026.04.29.16.05.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2026 16:05:59 -0700 (PDT) From: Thiago Jung Bauermann To: gdb-patches@sourceware.org Subject: [PATCH v2 23/37] GDB: testsuite: Python: Don't return 0 from top-level (sed) Date: Wed, 29 Apr 2026 20:04:14 -0300 Message-ID: <20260429230432.60487-24-thiago.bauermann@linaro.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260429230432.60487-1-thiago.bauermann@linaro.org> References: <20260429230432.60487-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 is purely the result of running: $ sed -i 's/^ return -1/ return/' *.exp* inside gdb/testsuite/gdb.python. A couple of false positives weren't included. --- gdb/testsuite/gdb.python/lib-types.exp | 2 +- gdb/testsuite/gdb.python/py-as-string.exp | 2 +- gdb/testsuite/gdb.python/py-block.exp | 2 +- gdb/testsuite/gdb.python/py-caller-is.exp | 2 +- gdb/testsuite/gdb.python/py-cmd.exp | 2 +- gdb/testsuite/gdb.python/py-commands-breakpoint.exp | 2 +- gdb/testsuite/gdb.python/py-connection.exp | 2 +- gdb/testsuite/gdb.python/py-error.exp | 2 +- gdb/testsuite/gdb.python/py-finish-breakpoint2.exp | 2 +- gdb/testsuite/gdb.python/py-frame-inline.exp | 2 +- gdb/testsuite/gdb.python/py-frame.exp | 4 ++-- gdb/testsuite/gdb.python/py-inferior.exp | 2 +- gdb/testsuite/gdb.python/py-infthread.exp | 2 +- gdb/testsuite/gdb.python/py-missing-objfile.exp | 2 +- gdb/testsuite/gdb.python/py-objfile.exp | 4 ++-- gdb/testsuite/gdb.python/py-pending-frame-level.exp | 2 +- gdb/testsuite/gdb.python/py-rbreak.exp | 2 +- gdb/testsuite/gdb.python/py-recurse-unwind.exp | 2 +- gdb/testsuite/gdb.python/py-shared.exp | 2 +- gdb/testsuite/gdb.python/py-strfns.exp | 2 +- gdb/testsuite/gdb.python/py-symbol.exp | 6 +++--- gdb/testsuite/gdb.python/py-symtab.exp | 2 +- gdb/testsuite/gdb.python/py-unwind-inline.exp | 2 +- gdb/testsuite/gdb.python/py-unwind-user-regs.exp | 2 +- gdb/testsuite/gdb.python/py-unwind.exp | 2 +- gdb/testsuite/gdb.python/py-value.exp | 2 +- gdb/testsuite/gdb.python/python.exp | 6 +++--- 27 files changed, 33 insertions(+), 33 deletions(-) diff --git a/gdb/testsuite/gdb.python/lib-types.exp b/gdb/testsuite/gdb.python/lib-types.exp index aa281c6443d5..d2e7d391a779 100644 --- a/gdb/testsuite/gdb.python/lib-types.exp +++ b/gdb/testsuite/gdb.python/lib-types.exp @@ -25,11 +25,11 @@ standard_testfile .cc if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} { return } if {![runto_main]} { - return 0 + return } gdb_test_no_output "python import gdb.types" # test get_basic_type const stripping diff --git a/gdb/testsuite/gdb.python/py-as-string.exp b/gdb/testsuite/gdb.python/py-as-string.exp index 3dc858db1ada..41cefbe0411f 100644 --- a/gdb/testsuite/gdb.python/py-as-string.exp +++ b/gdb/testsuite/gdb.python/py-as-string.exp @@ -25,11 +25,11 @@ standard_testfile if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { return } if {![runto_main]} { - return 0 + return } proc test_as_string { } { gdb_test "p \$_as_string(2)" "\"2\"" gdb_test "p \$_as_string(enum_valid)" "\"ENUM_VALUE_B\"" diff --git a/gdb/testsuite/gdb.python/py-block.exp b/gdb/testsuite/gdb.python/py-block.exp index b0123c4d3b57..30983ac35f25 100644 --- a/gdb/testsuite/gdb.python/py-block.exp +++ b/gdb/testsuite/gdb.python/py-block.exp @@ -25,11 +25,11 @@ standard_testfile if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { return } if {![runto_main]} { - return 0 + return } global hex decimal gdb_breakpoint [gdb_get_line_number "Block break here."] gdb_continue_to_breakpoint "Block break here." diff --git a/gdb/testsuite/gdb.python/py-caller-is.exp b/gdb/testsuite/gdb.python/py-caller-is.exp index e195e42a8ca6..d9b826cb6a23 100644 --- a/gdb/testsuite/gdb.python/py-caller-is.exp +++ b/gdb/testsuite/gdb.python/py-caller-is.exp @@ -25,11 +25,11 @@ standard_testfile if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { return } if {![runto_main]} { - return 0 + return } gdb_breakpoint "bottom_func" gdb_continue_to_breakpoint "bottom_func" diff --git a/gdb/testsuite/gdb.python/py-cmd.exp b/gdb/testsuite/gdb.python/py-cmd.exp index 766a594d2f49..0bda3cdc934c 100644 --- a/gdb/testsuite/gdb.python/py-cmd.exp +++ b/gdb/testsuite/gdb.python/py-cmd.exp @@ -25,11 +25,11 @@ standard_testfile if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { return } if {![runto_main]} { - return 0 + return } # Test a simple command. gdb_test_multiline "input simple command" \ diff --git a/gdb/testsuite/gdb.python/py-commands-breakpoint.exp b/gdb/testsuite/gdb.python/py-commands-breakpoint.exp index 2b3842c816f6..1afb41c80ea2 100644 --- a/gdb/testsuite/gdb.python/py-commands-breakpoint.exp +++ b/gdb/testsuite/gdb.python/py-commands-breakpoint.exp @@ -24,11 +24,11 @@ standard_testfile .c .py if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } { return } if { ![runto_main] } { - return 0 + return } set host_python_file \ [gdb_remote_download host $srcdir/$subdir/$srcfile2] diff --git a/gdb/testsuite/gdb.python/py-connection.exp b/gdb/testsuite/gdb.python/py-connection.exp index e520e91368aa..7f3b46eff797 100644 --- a/gdb/testsuite/gdb.python/py-connection.exp +++ b/gdb/testsuite/gdb.python/py-connection.exp @@ -27,11 +27,11 @@ standard_testfile if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { return } if {![runto_main]} { - return 0 + return } if { [target_info exists gdb_protocol] } { set connection_type "RemoteTargetConnection" } else { diff --git a/gdb/testsuite/gdb.python/py-error.exp b/gdb/testsuite/gdb.python/py-error.exp index 583e63571a4a..3285746a47ca 100644 --- a/gdb/testsuite/gdb.python/py-error.exp +++ b/gdb/testsuite/gdb.python/py-error.exp @@ -42,11 +42,11 @@ gdb_test_multiple $test $test { set test2 "" } } if {$test2 == ""} { - return 0 + return } set remote_python_file [gdb_remote_download host \ ${srcdir}/${subdir}/${testfile}.py] diff --git a/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp b/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp index d782c577cfc1..9fa3faa7b9f5 100644 --- a/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp +++ b/gdb/testsuite/gdb.python/py-finish-breakpoint2.exp @@ -25,11 +25,11 @@ standard_testfile .cc if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} { return } if {![runto_main]} { - return 0 + return } set pyfile [gdb_remote_download host \ ${srcdir}/${subdir}/${testfile}.py] diff --git a/gdb/testsuite/gdb.python/py-frame-inline.exp b/gdb/testsuite/gdb.python/py-frame-inline.exp index a44136990c02..c90aed09e677 100644 --- a/gdb/testsuite/gdb.python/py-frame-inline.exp +++ b/gdb/testsuite/gdb.python/py-frame-inline.exp @@ -22,11 +22,11 @@ standard_testfile if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { return } if {![runto_main]} { - return 0 + return } gdb_breakpoint [gdb_get_line_number "break-here"] gdb_continue_to_breakpoint "Block break here." diff --git a/gdb/testsuite/gdb.python/py-frame.exp b/gdb/testsuite/gdb.python/py-frame.exp index 92a0ef3f7ebb..ca350cf03c2d 100644 --- a/gdb/testsuite/gdb.python/py-frame.exp +++ b/gdb/testsuite/gdb.python/py-frame.exp @@ -27,11 +27,11 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { } # The following tests require execution. if {![runto_main]} { - return 0 + return } gdb_breakpoint [gdb_get_line_number "Block break here."] gdb_continue_to_breakpoint "Block break here." gdb_py_test_silent_cmd "python bf1 = gdb.selected_frame ()" "get frame" 0 @@ -208,11 +208,11 @@ gdb_exit if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} {}] } { return } if {![runto_main]} { - return 0 + return } # Test if Frame.static_link works for a frame without debug info. gdb_test "python print(gdb.selected_frame().static_link())" "None" \ "test Frame.static_link for a frame without debug info" diff --git a/gdb/testsuite/gdb.python/py-inferior.exp b/gdb/testsuite/gdb.python/py-inferior.exp index 8479427f726a..f69ad8fc0d8d 100644 --- a/gdb/testsuite/gdb.python/py-inferior.exp +++ b/gdb/testsuite/gdb.python/py-inferior.exp @@ -60,11 +60,11 @@ gdb_test "python \ "read memory without execution" # The following tests require execution. if {![runto_main]} { - return 0 + return } # The most recently added inferior. set most_recent_inf 1 diff --git a/gdb/testsuite/gdb.python/py-infthread.exp b/gdb/testsuite/gdb.python/py-infthread.exp index 65ccc8f9a9e8..93022e8ade3b 100644 --- a/gdb/testsuite/gdb.python/py-infthread.exp +++ b/gdb/testsuite/gdb.python/py-infthread.exp @@ -38,11 +38,11 @@ gdb_test_multiline "install new_thread event handler" \ "end" "" # The following tests require execution. if {![runto_main]} { - return 0 + return } gdb_test "python print(seen_a_thread)" "True" # Test basic gdb.Inferior attributes and methods. diff --git a/gdb/testsuite/gdb.python/py-missing-objfile.exp b/gdb/testsuite/gdb.python/py-missing-objfile.exp index e5e086130b00..907bdec76f4b 100644 --- a/gdb/testsuite/gdb.python/py-missing-objfile.exp +++ b/gdb/testsuite/gdb.python/py-missing-objfile.exp @@ -54,11 +54,11 @@ set remote_python_file \ # Generate a core file. set corefile [core_find $binfile {}] if {$corefile == ""} { unsupported "core file not generated" - return 0 + return } # Create a directory named DIRNAME for use as the # debug-file-directory. Populate the directory with links (based on # the build-ids) to each file in the list FILES. diff --git a/gdb/testsuite/gdb.python/py-objfile.exp b/gdb/testsuite/gdb.python/py-objfile.exp index 0127b82936cb..64c626029300 100644 --- a/gdb/testsuite/gdb.python/py-objfile.exp +++ b/gdb/testsuite/gdb.python/py-objfile.exp @@ -25,11 +25,11 @@ standard_testfile if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { return } if {![runto_main]} { - return 0 + return } set python_error_text "Error occurred in Python.*" gdb_py_test_silent_cmd "python sym = gdb.lookup_symbol(\"some_var\")" \ @@ -118,11 +118,11 @@ gdb_test "python print(objfile.username)" "None" \ if { [prepare_for_testing "failed to prepare" ${testfile}2 ${srcfile} {nodebug ldflags=-Wl,--strip-debug}] } { return } if {![runto_main]} { - return 0 + return } gdb_py_test_silent_cmd "python objfile = gdb.objfiles()\[0\]" \ "Get no-debug objfile file" 1 diff --git a/gdb/testsuite/gdb.python/py-pending-frame-level.exp b/gdb/testsuite/gdb.python/py-pending-frame-level.exp index 204c7c36c54b..0e10b8065d16 100644 --- a/gdb/testsuite/gdb.python/py-pending-frame-level.exp +++ b/gdb/testsuite/gdb.python/py-pending-frame-level.exp @@ -24,11 +24,11 @@ standard_testfile if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { return } if {![runto_main]} { - return 0 + return } set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py] gdb_breakpoint [gdb_get_line_number "Break here"] diff --git a/gdb/testsuite/gdb.python/py-rbreak.exp b/gdb/testsuite/gdb.python/py-rbreak.exp index eead513caeb2..ba02758ae798 100644 --- a/gdb/testsuite/gdb.python/py-rbreak.exp +++ b/gdb/testsuite/gdb.python/py-rbreak.exp @@ -25,11 +25,11 @@ standard_testfile py-rbreak.c py-rbreak-func2.c if {[prepare_for_testing "failed to prepare" ${testfile} [list $srcfile $srcfile2]] } { return 1 } if {![runto_main]} { - return 0 + return } gdb_test_no_output "nosharedlibrary" gdb_py_test_silent_cmd "py sl = gdb.rbreak(\"\",minsyms=False)" \ "get all function breakpoints" 0 diff --git a/gdb/testsuite/gdb.python/py-recurse-unwind.exp b/gdb/testsuite/gdb.python/py-recurse-unwind.exp index 4df47a6e8b4b..25cefc9b87ed 100644 --- a/gdb/testsuite/gdb.python/py-recurse-unwind.exp +++ b/gdb/testsuite/gdb.python/py-recurse-unwind.exp @@ -38,11 +38,11 @@ gdb_test "source ${pyfile}" "Python script imported" \ "import python scripts" # The following tests require execution. if {![runto_main]} { - return 0 + return } proc cont_and_backtrace { tst } { diff --git a/gdb/testsuite/gdb.python/py-shared.exp b/gdb/testsuite/gdb.python/py-shared.exp index 0eef359d0b87..ff47270c0717 100644 --- a/gdb/testsuite/gdb.python/py-shared.exp +++ b/gdb/testsuite/gdb.python/py-shared.exp @@ -42,11 +42,11 @@ clean_restart $testfile gdb_load_shlib ${library} # The following tests require execution. if {![runto_main]} { - return 0 + return } runto [gdb_get_line_number "Break to end."] # Test gdb.solib_name diff --git a/gdb/testsuite/gdb.python/py-strfns.exp b/gdb/testsuite/gdb.python/py-strfns.exp index 539ba984db02..3a8610a971ed 100644 --- a/gdb/testsuite/gdb.python/py-strfns.exp +++ b/gdb/testsuite/gdb.python/py-strfns.exp @@ -25,11 +25,11 @@ standard_testfile if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { return } if {![runto_main]} { - return 0 + return } proc test_all_strfns { } { gdb_test "p \$_streq (str1, str2)" " = 1" gdb_test "p \$_streq (str1, str3)" " = 0" diff --git a/gdb/testsuite/gdb.python/py-symbol.exp b/gdb/testsuite/gdb.python/py-symbol.exp index 90e724ca0313..af187857176a 100644 --- a/gdb/testsuite/gdb.python/py-symbol.exp +++ b/gdb/testsuite/gdb.python/py-symbol.exp @@ -88,11 +88,11 @@ gdb_test "python print (gdb.lookup_static_symbol ('nonexistent') is None)" \ gdb_test "python print (gdb.lookup_static_symbol ('qq') is None)" \ "True" "lookup_static_symbol for global var" if {![runto_main]} { - return 0 + return } global hex decimal gdb_breakpoint [gdb_get_line_number "Block break here."] @@ -203,11 +203,11 @@ gdb_test "python print (gdb.lookup_global_symbol ('(anonymous namespace)::anon') "True" "anon is None" gdb_test "python print (gdb.lookup_static_symbol ('(anonymous namespace)::anon').value ())" \ "10" "print value of anon" if {![runto_main]} { - return 0 + return } gdb_breakpoint [gdb_get_line_number "Break in class."] gdb_continue_to_breakpoint "Break in class." @@ -231,11 +231,11 @@ gdb_test "python print (cplusfunc.addr_class == gdb.SYMBOL_LOC_BLOCK)" "True" "t # Test is_valid when the objfile is unloaded. This must be the last # test as it unloads the object file in GDB. # Start with a fresh gdb. clean_restart ${::testfile} if {![runto_main]} { - return 0 + return } gdb_breakpoint [gdb_get_line_number "Break at end."] gdb_continue_to_breakpoint "Break at end for symbol validity" ".*Break at end.*" gdb_py_test_silent_cmd "python a = gdb.lookup_symbol(\'a\')" "Get variable a" 0 diff --git a/gdb/testsuite/gdb.python/py-symtab.exp b/gdb/testsuite/gdb.python/py-symtab.exp index 786bdc75fc4d..b5dd0c26988e 100644 --- a/gdb/testsuite/gdb.python/py-symtab.exp +++ b/gdb/testsuite/gdb.python/py-symtab.exp @@ -25,11 +25,11 @@ standard_testfile py-symbol.c if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} { return } if {![runto_main]} { - return 0 + return } set debug_types [debug_types] global hex decimal diff --git a/gdb/testsuite/gdb.python/py-unwind-inline.exp b/gdb/testsuite/gdb.python/py-unwind-inline.exp index ef9b00eccc8b..d7d82913f61a 100644 --- a/gdb/testsuite/gdb.python/py-unwind-inline.exp +++ b/gdb/testsuite/gdb.python/py-unwind-inline.exp @@ -27,11 +27,11 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ return } # The following tests require execution. if {![runto_main]} { - return 0 + return } set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py] gdb_breakpoint "foo" diff --git a/gdb/testsuite/gdb.python/py-unwind-user-regs.exp b/gdb/testsuite/gdb.python/py-unwind-user-regs.exp index c594bf74ceef..248996c51615 100644 --- a/gdb/testsuite/gdb.python/py-unwind-user-regs.exp +++ b/gdb/testsuite/gdb.python/py-unwind-user-regs.exp @@ -45,11 +45,11 @@ standard_testfile if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { return } if {![runto_main]} { - return 0 + return } set pyfile [gdb_remote_download host ${srcdir}/${subdir}/${testfile}.py] gdb_breakpoint [gdb_get_line_number "Break here"] diff --git a/gdb/testsuite/gdb.python/py-unwind.exp b/gdb/testsuite/gdb.python/py-unwind.exp index 058caaf1efc7..af864dceedfd 100644 --- a/gdb/testsuite/gdb.python/py-unwind.exp +++ b/gdb/testsuite/gdb.python/py-unwind.exp @@ -35,11 +35,11 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} "debug $fla require is_x86_64_m64_target # The following tests require execution. if {![runto_main]} { - return 0 + return } # Check for the corrupt backtrace. proc check_for_broken_backtrace {testname} { gdb_test_sequence "where" $testname { diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp index 3746a6cbc0bc..4337928ddef4 100644 --- a/gdb/testsuite/gdb.python/py-value.exp +++ b/gdb/testsuite/gdb.python/py-value.exp @@ -819,11 +819,11 @@ test_float_conversion test_add_to_history # The following tests require execution. if {![runto_main]} { - return 0 + return } test_unavailable test_value_in_inferior test_value_from_buffer diff --git a/gdb/testsuite/gdb.python/python.exp b/gdb/testsuite/gdb.python/python.exp index f2f32019e4c2..7d3cd299bc8c 100644 --- a/gdb/testsuite/gdb.python/python.exp +++ b/gdb/testsuite/gdb.python/python.exp @@ -208,11 +208,11 @@ gdb_expect { clean_restart ${testfile} # The following tests require execution. if {![runto_main]} { - return 0 + return } set lineno [gdb_get_line_number "Break to end."] runto $lineno @@ -422,11 +422,11 @@ gdb_test_multiple "set extended-prompt some param \\p{python print-stack} " \ clean_restart ${testfile} # The following tests require execution. if {![runto_main]} { - return 0 + return } # print-stack settings gdb_test "show python print-stack" \ "The mode of Python stack printing on error is \"message\".*" \ @@ -477,11 +477,11 @@ gdb_py_test_silent_cmd "python gdb.prompt_hook = None" \ clean_restart ${testfile} # The following tests require execution. if {![runto_main]} { - return 0 + return } runto [gdb_get_line_number "Break at func2 call site."] gdb_py_test_silent_cmd "python line = gdb.selected_frame().find_sal().line" "Get line number of func2 call site" 1