From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id UX4SM3UE72n/4z0AWB0awg (envelope-from ) for ; Mon, 27 Apr 2026 02:38:45 -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=p5GtMasv; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id CC95A1E0BA; Mon, 27 Apr 2026 02:38:45 -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 A191D1E093 for ; Mon, 27 Apr 2026 02:38:44 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 44D044B99F43 for ; Mon, 27 Apr 2026 06:38:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 44D044B99F43 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=p5GtMasv Received: from mail-dy1-x132a.google.com (mail-dy1-x132a.google.com [IPv6:2607:f8b0:4864:20::132a]) by sourceware.org (Postfix) with ESMTPS id 075584BABF0B for ; Mon, 27 Apr 2026 06:36:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 075584BABF0B 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 075584BABF0B Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::132a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777271795; cv=none; b=siyYY2SNGTva+OoJEoqof2vTmVBiBYbsBlLQ23Etx0bMebMD42NL5ArlksbXHUPBBr7YTO1zspjN6zW3RIItHbLpFiayA2v+mfC6qP05VrMbTXOiDkGhpm5A8Kq6qlTrM5Oc4b2ZpuwwdjI7lTJLqNRB4UcN/EeK5CGmn16wNu8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777271795; c=relaxed/simple; bh=r1Dfua9EsWR/I6C8/woG+1jf5WDjulZMoXhCpHxAjjs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Swdt/Bo0ObMM2ZKh9pUD82gBWcBeMF5l2HrmQlUO8bTBMj36C6thbXzYqfaPyvHS5kJ2+fV7tDHn/SMTVGfGTYicTSz6UxZiUzUIplV8A1Vd516glrsmLy4zbNCNoLUTYhXl+uvYMjAtheLSqtHUig1vVZsK4v8MogH4jr6cBHw= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 075584BABF0B Received: by mail-dy1-x132a.google.com with SMTP id 5a478bee46e88-2d8ffdc31d0so3070752eec.0 for ; Sun, 26 Apr 2026 23:36:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1777271794; x=1777876594; 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=dCh0pNMnUvA2nuU6aTzRmAxYJ5ygjD+5SjYf5hrW6qE=; b=p5GtMasvBSaOGCCehhcezIrlq2ZnO5pGDuCqyXjbDr8QKQRkkX2lMnUGXvJK/PYFiU 2TCbEn4eEBtsbA4NPPkEcpyQWo3xzyPoobAMoDRnVJd8q+hYdC3fo9YNky0aQhFntzgd rKQa4zYZ8ThgFF4qMoG8IN+DvNPdadkJ0X6xZbHenrhHVDaZN7njBCxi5Isop+xhR7An yq1vXqVRrCGjr9V8Bkr6/erGH5ZF96KJQzKXM2m+U6UoyZ6hncz4Lh49yVz2SXgzTR7f x04znrKK17zGpu/lKURA3ej2kFWDIFpDAGB8M4JRfrdsVq6NIW3gS7Gm9FJF9SeUNCJG MFDg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777271794; x=1777876594; 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=dCh0pNMnUvA2nuU6aTzRmAxYJ5ygjD+5SjYf5hrW6qE=; b=gvyhwvJfuoplyNeClotQa1F+pNTHAKaAXqkxCwhC//ds7IupUiPSNfhfqyD7u0C2WI /WZ99b9+hEh7Xq7RV5cB6GMJ+08yjo13ITI8W38beHrTq+gXZOp4pKAwQ99TPx7ZJ0Td ljDZwsvg64ELE90EbsjRxiVr5T5eM4fsKWInKLxalMv4D/pL2Qtycsb+Xw/9zqkm/zFR XVxFNcYuxwbQp9q4xcmRaxG5aMf9DV462PflTIE6VMnypKA6amIJ0w28uxvx8aCE5Rm6 NJicJ14IetVOzWK4EBrXnW05qz4iv9SSklkk3X3E6k0fN7V3xS7FQIGMqUrWuTkwCxDE OuzA== X-Gm-Message-State: AOJu0YxBnyvIJTvC1SrMjnDZz9BFdR6NtIEM+waSInNYDN31IkTljXOB oT9IvnuWIklCkLDbSyKQkhkwLYWwLwEtU5MrWCMhG/lLnrWCJZJsQJ4wueaUc7kwN+1qI086Sqs xsyWo X-Gm-Gg: AeBDietHPdjLCOHe4JZw8+8U/AHAJvzjtI4ZCA3uBMYE9eTdqbo15oZ9CN5VjqRoTZg MDfigQIc1cy8OanhGwAjj7R/OhxRD11I/QmqP86AaMYwPhqW0uVVk7OA++a1dAqm1nkpSzQ0Qog 9x3vk+I7oD9P8g78psEXGZbHDBPAS4/lJzRpnhVa1sq8LOQI+bsMk2F7eV81b2WdbFIVyeolsx9 fgq2CPFz94hYoBI5BTW08KzSRqj47v8WaHYXP1p7v0AHeHT9ztc5aX/yPqXhX/jbll2hBE1RIFw hxsjDS6JVpa5owadd29t2OxdYW1DmTroEhckt++d/esl3DLo5+w9vDcGwJYj+I10b/g9J3r8GsV DyKKtX6bRQB9Gf3ZAsuKgo5dEtPWkQfFqdEvV/tDSUZPYMYWy53PnHO1u3vv5W2iUo5wZKRzneT TvRBpAHoD6ErtvcpoZUJrBo7ZQylEsYlDzM0HIfVEkZ1hA X-Received: by 2002:a05:7022:b88:b0:12d:ce36:8928 with SMTP id a92af1059eb24-12dce3691d2mr3421800c88.0.1777271793617; Sun, 26 Apr 2026 23:36:33 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8083:33bc:f32e:9aa5:b915]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-12dcbe079c3sm10370124c88.2.2026.04.26.23.36.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Apr 2026 23:36:33 -0700 (PDT) From: Thiago Jung Bauermann To: gdb-patches@sourceware.org Subject: [PATCH 23/36] GDB: testsuite: Python: Don't return -1 from top-level (manual) Date: Mon, 27 Apr 2026 03:34:47 -0300 Message-ID: <20260427063500.3847618-24-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 save_vars, with_test_prefix, foreach, gdb_test_multiple. - procedure whose callers don't use the return value; In a couple of cases the whole if block was in a single line: if { condition } { return -1 } In those cases the formatting was changed to the multi-line style we tend to use. --- .../gdb.python/py-arch-reg-groups.exp | 2 +- .../gdb.python/py-arch-reg-names.exp | 2 +- gdb/testsuite/gdb.python/py-arch.exp | 2 +- .../gdb.python/py-auto-load-chaining.exp | 10 ++--- gdb/testsuite/gdb.python/py-breakpoint.exp | 38 ++++++++++--------- gdb/testsuite/gdb.python/py-disasm.exp.tcl | 6 +-- gdb/testsuite/gdb.python/py-explore-cc.exp | 2 +- gdb/testsuite/gdb.python/py-explore.exp | 2 +- .../gdb.python/py-format-address.exp | 4 +- .../gdb.python/py-framefilter-addr.exp | 2 +- .../gdb.python/py-label-symbol-value.exp | 2 +- .../gdb.python/py-linetable-empty.exp | 2 +- .../gdb.python/py-pp-registration.exp | 6 +-- .../gdb.python/py-read-memory-leak.exp | 2 +- gdb/testsuite/gdb.python/py-record-btrace.exp | 4 +- gdb/testsuite/gdb.python/py-record-full.exp | 4 +- .../gdb.python/py-rvalue-ref-value-cc.exp | 2 +- gdb/testsuite/gdb.python/py-template.exp | 2 +- gdb/testsuite/gdb.python/py-value-cc.exp | 2 +- gdb/testsuite/gdb.python/py-value.exp | 4 +- gdb/testsuite/gdb.python/py-xmethods.exp | 2 +- gdb/testsuite/gdb.python/python.exp | 8 ++-- 22 files changed, 58 insertions(+), 52 deletions(-) diff --git a/gdb/testsuite/gdb.python/py-arch-reg-groups.exp b/gdb/testsuite/gdb.python/py-arch-reg-groups.exp index 6630143f0373..7a1025841f46 100644 --- a/gdb/testsuite/gdb.python/py-arch-reg-groups.exp +++ b/gdb/testsuite/gdb.python/py-arch-reg-groups.exp @@ -24,7 +24,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { } if {![runto_main]} { - return -1 + return } # First, use 'maint print reggroups' to get a list of all register diff --git a/gdb/testsuite/gdb.python/py-arch-reg-names.exp b/gdb/testsuite/gdb.python/py-arch-reg-names.exp index 7bbb171e13e1..6807098fbda8 100644 --- a/gdb/testsuite/gdb.python/py-arch-reg-names.exp +++ b/gdb/testsuite/gdb.python/py-arch-reg-names.exp @@ -24,7 +24,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { } if {![runto_main]} { - return -1 + return } # First, use 'info registers' to get a list of register names. diff --git a/gdb/testsuite/gdb.python/py-arch.exp b/gdb/testsuite/gdb.python/py-arch.exp index a2ac6ad4bfa1..b1dd81a05839 100644 --- a/gdb/testsuite/gdb.python/py-arch.exp +++ b/gdb/testsuite/gdb.python/py-arch.exp @@ -21,7 +21,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { } if {![runto_main]} { - return -1 + return } # Test python/15461. Invalid architectures should not trigger an diff --git a/gdb/testsuite/gdb.python/py-auto-load-chaining.exp b/gdb/testsuite/gdb.python/py-auto-load-chaining.exp index 7a92ff0fac71..bd0d1c4b11ef 100644 --- a/gdb/testsuite/gdb.python/py-auto-load-chaining.exp +++ b/gdb/testsuite/gdb.python/py-auto-load-chaining.exp @@ -29,13 +29,13 @@ set f2_o [standard_output_file ${gdb_test_file_name}-f2.o] # Now build the object files. if {[gdb_compile "${srcdir}/${subdir}/${srcfile2}" ${f1_o} object {}] != ""} { - untested "failed to compile object file f1.o" - return -1 + untested "failed to compile object file f1.o" + return } if {[gdb_compile "${srcdir}/${subdir}/${srcfile3}" ${f2_o} object {}] != ""} { - untested "failed to compile object file f2.o" - return -1 + untested "failed to compile object file f2.o" + return } # Copy the two Python scripts to where the tests are being run. @@ -50,7 +50,7 @@ if {[prepare_for_testing "failed to prepare" ${testfile} ${srcfile}]} { } if {![runto_main]} { - return -1 + return } set safe_path [standard_output_file ""] diff --git a/gdb/testsuite/gdb.python/py-breakpoint.exp b/gdb/testsuite/gdb.python/py-breakpoint.exp index 692d55eb0a21..f74b6a73c815 100644 --- a/gdb/testsuite/gdb.python/py-breakpoint.exp +++ b/gdb/testsuite/gdb.python/py-breakpoint.exp @@ -78,7 +78,7 @@ proc_with_prefix test_bkpt_basic { } { gdb_test "python print (gdb.breakpoints())" "\\(\\)" if {![runto_main]} { - return 0 + return } # Now there should be one breakpoint: main. @@ -172,7 +172,7 @@ proc_with_prefix test_bkpt_deletion { } { clean_restart ${testfile} if {![runto_main]} { - return 0 + return } # Test breakpoints are deleted correctly. @@ -207,7 +207,7 @@ proc_with_prefix test_bkpt_cond_and_cmds { } { clean_restart ${testfile} if {![runto_main]} { - return 0 + return } # Test conditional setting. @@ -265,7 +265,7 @@ proc_with_prefix test_bkpt_thread_and_inferior { } { clean_restart ${testfile} if {![runto_main]} { - return 0 + return } with_test_prefix "thread" { @@ -304,7 +304,7 @@ proc_with_prefix test_bkpt_invisible { } { clean_restart ${testfile} if {![runto_main]} { - return 0 + return } delete_breakpoints @@ -344,13 +344,15 @@ proc_with_prefix test_hardware_breakpoints { } { global srcfile testfile hex decimal # Skip these tests if the HW does not support hardware breakpoints. - if { ![allow_hw_breakpoint_tests] } { return 0 } + if { ![allow_hw_breakpoint_tests] } { + return + } # Start with a fresh gdb. clean_restart ${testfile} if {![runto_main]} { - return 0 + return } delete_breakpoints @@ -379,7 +381,7 @@ proc_with_prefix test_watchpoints { } { } if {![runto $srcfile:$::past_throw_catch_line]} { - return 0 + return } gdb_py_test_silent_cmd "python wp1 = gdb.Breakpoint (\"result\", type=gdb.BP_WATCHPOINT, wp_class=gdb.WP_WRITE )" \ @@ -402,7 +404,7 @@ proc_with_prefix test_bkpt_internal { } { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } if {![runto $srcfile:$::past_throw_catch_line]} { - return 0 + return } delete_breakpoints gdb_py_test_silent_cmd "python bp1 = gdb.Breakpoint (\"main\", type=gdb.BP_BREAKPOINT, wp_class=gdb.WP_WRITE, internal=True )" \ @@ -450,7 +452,7 @@ proc_with_prefix test_bkpt_eval_funcs { } { gdb_test_no_output "set can-use-hw-watchpoints 0" "" } if {![runto_main]} { - return 0 + return } delete_breakpoints @@ -563,7 +565,7 @@ proc_with_prefix test_bkpt_temporary { } { clean_restart ${testfile} if {![runto_main]} { - return 0 + return } delete_breakpoints @@ -681,7 +683,7 @@ proc_with_prefix test_bkpt_explicit_loc {} { clean_restart ${testfile} if {![runto_main]} { - return 0 + return } delete_breakpoints @@ -768,7 +770,7 @@ proc_with_prefix test_bkpt_qualified {} { set two_location_re "Breakpoint $decimal at $hex:.*2 locations." if {![runto_main]} { - return 0 + return } # Test the default value of "qualified". @@ -842,11 +844,11 @@ proc_with_prefix test_bkpt_probe {} { if { [prepare_for_testing "failed to prepare" ${testfile}-probes \ ${srcfile} {debug c++ additional_flags=-DUSE_PROBES}] } { - return -1 + return } if {![runto_main]} { - return 0 + return } gdb_test \ @@ -863,7 +865,7 @@ proc_with_prefix test_catchpoints {} { clean_restart ${testfile} if {![runto_main]} { - return 0 + return } # Try to create a catchpoint, currently this isn't supported via @@ -879,7 +881,7 @@ proc_with_prefix test_catchpoints {} { gdb_test_multiple "catch throw" "" { -re "The feature \'catch throw\' is not supported.*\r\n$gdb_prompt $" { unsupported "catch syscall isn't supported" - return -1 + return } -re "Catchpoint ($decimal) \\(throw\\)\r\n$gdb_prompt $" { set num $expect_out(1,string) @@ -922,7 +924,7 @@ proc_with_prefix test_bkpt_auto_disable { } { clean_restart ${testfile} if {![runto_main]} { - return 0 + return } delete_breakpoints diff --git a/gdb/testsuite/gdb.python/py-disasm.exp.tcl b/gdb/testsuite/gdb.python/py-disasm.exp.tcl index e4391fa59ced..6382005eee52 100644 --- a/gdb/testsuite/gdb.python/py-disasm.exp.tcl +++ b/gdb/testsuite/gdb.python/py-disasm.exp.tcl @@ -30,7 +30,7 @@ if { $kind == "obj" } { if { [gdb_compile "$srcdir/$subdir/$srcfile" $binfile object \ "debug"] != "" } { untested "failed to compile object file $testfile" - return -1 + return } clean_restart $testfile @@ -38,12 +38,12 @@ if { $kind == "obj" } { } else { if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } { - return -1 + return } if { ![runto_main] } { fail "can't run to main" - return 0 + return } } diff --git a/gdb/testsuite/gdb.python/py-explore-cc.exp b/gdb/testsuite/gdb.python/py-explore-cc.exp index 772886b931f9..70b1beeada0a 100644 --- a/gdb/testsuite/gdb.python/py-explore-cc.exp +++ b/gdb/testsuite/gdb.python/py-explore-cc.exp @@ -37,7 +37,7 @@ i = .*\ c = .*" if {![runto_main]} { - return -1 + return } gdb_breakpoint [gdb_get_line_number "Break here."] diff --git a/gdb/testsuite/gdb.python/py-explore.exp b/gdb/testsuite/gdb.python/py-explore.exp index 276148da8f10..debe30315356 100644 --- a/gdb/testsuite/gdb.python/py-explore.exp +++ b/gdb/testsuite/gdb.python/py-explore.exp @@ -76,7 +76,7 @@ proc scalar_value { value_name value } { set SS_fields [field_values {a = 10} {d = 100[.].*}] if {![runto_main]} { - return -1 + return } gdb_breakpoint [gdb_get_line_number "Break here."] diff --git a/gdb/testsuite/gdb.python/py-format-address.exp b/gdb/testsuite/gdb.python/py-format-address.exp index dda012234b77..9f32686dfd3d 100644 --- a/gdb/testsuite/gdb.python/py-format-address.exp +++ b/gdb/testsuite/gdb.python/py-format-address.exp @@ -23,7 +23,7 @@ foreach func_name { foo bar } { [list debug \ nopie \ additional_flags=-DFUNCTION_NAME=${func_name}]] == -1} { - return -1 + return } } @@ -35,7 +35,7 @@ set binary_bar [standard_output_file $testfile_bar] clean_restart $testfile_foo if {![runto_main]} { - return -1 + return } # Check the gdb.format_address method when using the default values diff --git a/gdb/testsuite/gdb.python/py-framefilter-addr.exp b/gdb/testsuite/gdb.python/py-framefilter-addr.exp index 3c0436ce1972..1c85a8afcb36 100644 --- a/gdb/testsuite/gdb.python/py-framefilter-addr.exp +++ b/gdb/testsuite/gdb.python/py-framefilter-addr.exp @@ -28,7 +28,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { } if {![runto_main]} { - return -1 + return } # Run to our test breakpoint. diff --git a/gdb/testsuite/gdb.python/py-label-symbol-value.exp b/gdb/testsuite/gdb.python/py-label-symbol-value.exp index c97ae72ec58d..bd3f9ee689e9 100644 --- a/gdb/testsuite/gdb.python/py-label-symbol-value.exp +++ b/gdb/testsuite/gdb.python/py-label-symbol-value.exp @@ -25,7 +25,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { } if {![runto_main]} { - return -1 + return } # Use Python to print the value of the 'some_label' symbol. diff --git a/gdb/testsuite/gdb.python/py-linetable-empty.exp b/gdb/testsuite/gdb.python/py-linetable-empty.exp index 651fe9b6dbf3..3244d88a9367 100644 --- a/gdb/testsuite/gdb.python/py-linetable-empty.exp +++ b/gdb/testsuite/gdb.python/py-linetable-empty.exp @@ -43,7 +43,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} \ } if {![runto_main]} { - return -1 + return } gdb_test "python print(gdb.selected_frame().function().symtab.fullname())" \ diff --git a/gdb/testsuite/gdb.python/py-pp-registration.exp b/gdb/testsuite/gdb.python/py-pp-registration.exp index 3d974b2120b6..ab84a0f7f905 100644 --- a/gdb/testsuite/gdb.python/py-pp-registration.exp +++ b/gdb/testsuite/gdb.python/py-pp-registration.exp @@ -64,7 +64,7 @@ proc test_printers { s_prefix } { with_test_prefix "verbose off" { if {![prepare_test]} { - return -1 + return } gdb_test_no_output "set verbose off" @@ -79,7 +79,7 @@ with_test_prefix "verbose off" { with_test_prefix "verbose on" { if {![prepare_test]} { - return -1 + return } gdb_test_no_output "set verbose on" @@ -96,7 +96,7 @@ with_test_prefix "verbose on" { with_test_prefix "replace" { if {![prepare_test]} { - return -1 + return } gdb_test_no_output "py gdb.printing.register_pretty_printer(gdb, lookup_function_lookup_test)" diff --git a/gdb/testsuite/gdb.python/py-read-memory-leak.exp b/gdb/testsuite/gdb.python/py-read-memory-leak.exp index 58343126e67c..1a361c990533 100644 --- a/gdb/testsuite/gdb.python/py-read-memory-leak.exp +++ b/gdb/testsuite/gdb.python/py-read-memory-leak.exp @@ -27,7 +27,7 @@ if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile}] } { } if {![runto_main]} { - return -1 + return } gdb_py_run_memory_leak_test ${srcdir}/${subdir}/${testfile}.py \ diff --git a/gdb/testsuite/gdb.python/py-record-btrace.exp b/gdb/testsuite/gdb.python/py-record-btrace.exp index 4e324e71fc09..d5a647ebc59a 100644 --- a/gdb/testsuite/gdb.python/py-record-btrace.exp +++ b/gdb/testsuite/gdb.python/py-record-btrace.exp @@ -23,7 +23,9 @@ load_lib gdb-python.exp standard_testfile -if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} { return -1 } +if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} { + return +} if {![runto_main]} { return diff --git a/gdb/testsuite/gdb.python/py-record-full.exp b/gdb/testsuite/gdb.python/py-record-full.exp index 95640770e9a5..37bf07a64bfd 100644 --- a/gdb/testsuite/gdb.python/py-record-full.exp +++ b/gdb/testsuite/gdb.python/py-record-full.exp @@ -23,7 +23,9 @@ load_lib gdb-python.exp standard_testfile -if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} { return -1 } +if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} { + return +} if {![runto_main]} { return diff --git a/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp b/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp index 576fd5a85d3d..5e2b769cf71f 100644 --- a/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp +++ b/gdb/testsuite/gdb.python/py-rvalue-ref-value-cc.exp @@ -27,7 +27,7 @@ if {[prepare_for_testing $testfile.exp $testfile $srcfile \ } if {![runto_main]} { - return -1 + return } gdb_breakpoint [gdb_get_line_number "Break here."] diff --git a/gdb/testsuite/gdb.python/py-template.exp b/gdb/testsuite/gdb.python/py-template.exp index 9099e7e32dc0..c6c82f33283e 100644 --- a/gdb/testsuite/gdb.python/py-template.exp +++ b/gdb/testsuite/gdb.python/py-template.exp @@ -36,7 +36,7 @@ proc test_template_arg {exefile type} { if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${exefile}" \ executable $opts] != "" } { untested $type - return -1 + return } gdb_load ${exefile} # There is no executable code in main(), so we are where we want to be diff --git a/gdb/testsuite/gdb.python/py-value-cc.exp b/gdb/testsuite/gdb.python/py-value-cc.exp index 1d65d617e30d..fa0cd066978b 100644 --- a/gdb/testsuite/gdb.python/py-value-cc.exp +++ b/gdb/testsuite/gdb.python/py-value-cc.exp @@ -25,7 +25,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} { } if {![runto_main]} { - return -1 + return } gdb_breakpoint [gdb_get_line_number "Break here."] diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp index 3746a6cbc0bc..ba3b1376ff5a 100644 --- a/gdb/testsuite/gdb.python/py-value.exp +++ b/gdb/testsuite/gdb.python/py-value.exp @@ -821,7 +821,7 @@ test_add_to_history # The following tests require execution. if {![runto_main]} { - return 0 + return } test_unavailable @@ -840,7 +840,7 @@ test_subscript_regression "${binfile}" "c" if {[allow_cplus_tests]} { if { [build_inferior "${binfile}-cxx" "c++"] < 0 } { - return -1 + return } with_test_prefix "c++" { test_subscript_regression "${binfile}-cxx" "c++" diff --git a/gdb/testsuite/gdb.python/py-xmethods.exp b/gdb/testsuite/gdb.python/py-xmethods.exp index 52f0a7597093..b8a8b46c1db3 100644 --- a/gdb/testsuite/gdb.python/py-xmethods.exp +++ b/gdb/testsuite/gdb.python/py-xmethods.exp @@ -27,7 +27,7 @@ if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug c++}]} { } if {![runto_main]} { - return -1 + return } set xmethods_script [gdb_remote_download host \ diff --git a/gdb/testsuite/gdb.python/python.exp b/gdb/testsuite/gdb.python/python.exp index f2f32019e4c2..27dbc555a17b 100644 --- a/gdb/testsuite/gdb.python/python.exp +++ b/gdb/testsuite/gdb.python/python.exp @@ -48,7 +48,7 @@ gdb_test_multiple "python print (23)" "verify python support" { "print (23)" "" \ "end" "not supported.*" - return -1 + return } -re "$gdb_prompt $" {} } @@ -210,7 +210,7 @@ clean_restart ${testfile} # The following tests require execution. if {![runto_main]} { - return 0 + return } set lineno [gdb_get_line_number "Break to end."] @@ -424,7 +424,7 @@ clean_restart ${testfile} # The following tests require execution. if {![runto_main]} { - return 0 + return } # print-stack settings @@ -479,7 +479,7 @@ clean_restart ${testfile} # The following tests require execution. if {![runto_main]} { - return 0 + return } runto [gdb_get_line_number "Break at func2 call site."]