From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id yWWCHVEE72n/4z0AWB0awg (envelope-from ) for ; Mon, 27 Apr 2026 02:38:09 -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=Prn8dRuJ; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 71F531E0BA; Mon, 27 Apr 2026 02:38:09 -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 CB5EC1E093 for ; Mon, 27 Apr 2026 02:38:08 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 79EE84BB3B85 for ; Mon, 27 Apr 2026 06:38:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 79EE84BB3B85 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=Prn8dRuJ Received: from mail-dl1-x122f.google.com (mail-dl1-x122f.google.com [IPv6:2607:f8b0:4864:20::122f]) by sourceware.org (Postfix) with ESMTPS id 530244BAE7E9 for ; Mon, 27 Apr 2026 06:35:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 530244BAE7E9 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 530244BAE7E9 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::122f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777271730; cv=none; b=TEyy6KEMViQpplavurH2PoMDMtMMBETd9VHLeot1lRulYodS3I/5wV8v5F2mqQt0rlmCTAoAFZMaHF7T0Z05SDBXAnv3V4k4Q1A2Tdj2xI1ntos5M90YEW73GOE8YumbAwDkXZsI84V/drULOlpQeqDAvztX9hL0CE2v9mffsiA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777271730; c=relaxed/simple; bh=8IHO1Cz/VMjOJcKn0QO9HrticK2GocVrg8HlhOYP6Mc=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=GyqnbTzXOiRHL4nHfhkQzc9tHYvXHXz+VQZIG7sS6Z8vSvt5hugZZsILgHr38JhR0HK8eZhXqORUi3eCOtmx8wYrtxF04IDRtB1MyODnR5UCwGRTnobL/iQ/S2jCrR2JXu27cc6T+yWxtrYV4a5Go+eO/PdI5G/nBLXn1guFjxY= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 530244BAE7E9 Received: by mail-dl1-x122f.google.com with SMTP id a92af1059eb24-12c45281a06so12772823c88.1 for ; Sun, 26 Apr 2026 23:35:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1777271729; x=1777876529; 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=9PSHHxJwwNjbSVEGLz384b1TBFHIKxKX65kPP3Qdu8M=; b=Prn8dRuJVX7ncYetOSywcIAwSxxkWtDqSC5Ie5bbucbiBnWp2uNv8xfti17xhV2Ec5 dFh2/K5PQicJE7X7Vzm6Jiu0QWj1zDkVrN0qLPv+d0P3ggjafKuXEZm/M/xwUDunZh/r 5cqwGp7UW0u7oPbYTyvqRC2iDbggvAidFz2gNMwyeUW02m1K12rAhKEDgPXkxDa8flpB o2jNfie1ZavzuUAoaw1wPlqg7RrEt8Ge28lwfGLR7J3Zk+Bq2g/OjVgBj4CvXNob4qEW C7Yn4PMv8kG6+b/Lq06zk7n6mCqDPFJ4RGKLaPCOYOmKWqy9RkRvDkz/nd8iDcbDhy3G ifnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777271729; x=1777876529; 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=9PSHHxJwwNjbSVEGLz384b1TBFHIKxKX65kPP3Qdu8M=; b=Ju9P/lssyJ+ihiHdZI8U43BnaXG47YOp8rgjH1oMroE5NvdroCqULbotZ1OaktqzKs EaCDkWcIf4PSky/7aDK3+/ZcmDGVW5CdDbeCCRBDLVW3mYJNGsCd+PF25VhT4WAQ9QRX +rEh2z1Vb6ImXkCnpGZBvsYB7TzVTUvM+hu0MeZqNRvp9ADU5+nEBPbmXco28KxD1Yux Y7K+XCxpUYb/mfiDVt59B8BDyRVmjge2LHPZvqhGk5LFA1zCU2d0Xa5ZB0aSNYnBAJfZ 0GkzYMnBqWqp6toU/gaU9HGe5Y73hnGGCWwImG44ZZKpD9ZnjHt5quXUIMg75E5PoaqM FliA== X-Gm-Message-State: AOJu0Yw7pFlfmt23s+pe7AOfAT9bne/uQKvNMSp72qpJoA5I+Wr8SrtA W5Zz5/jjeCWk2n8YBVKYcLXtQaqfmI80cIDaNg7b5DHwfo5AJmnwEjn+6g4k9Py2b67JC5qWcIH qWZDt X-Gm-Gg: AeBDietG7EgipDo4ZtXQKPVOLxkKx69RWjxhxEB94VtciQrFhzGt0MtN3lptpRIjKru UYIC3hyNxRODOswmftZ/Obd1kyTtGFGGKKzsaw9Zs+vI+9tT2sKkROOrCmLc6jgnMS9FsEJFxyh TRZqlmrtxQl2V1WaGAFbDXy7wwIF/wwBFvOVCGj5TFPqw0IPBq9PfIedK8eZZ/KIAtBNmxI4TDR Mh0fEzT0FZAL1Ja4ggjwIEBU78eWa7WTK3C0MyCYvtNjef7HnkiNYHMEcUzbP0RNriHY+kodJdG NnA5fio8skQUDLtbbIJ5hRzVXM7HbqKifqrlur3HzlxjOAQw45Yj/EwuxEvuKUjvXlL/eGMBYUu a9/BUFAnNilaXnD/ZMxpfbmEfaYgauO5XARlTY02o7qMx/PUgm0sLcqYbm7kr8Oq4NahkgfS/bI RazeS6hPO3FTzjrBmB+TOSChK5kmyT42d/oBbxZFLEweuW X-Received: by 2002:a05:7022:fe0b:b0:128:d5bd:3572 with SMTP id a92af1059eb24-12c73fc926bmr20888396c88.31.1777271729040; Sun, 26 Apr 2026 23:35:29 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8083:33bc:f32e:9aa5:b915]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-12dcbe079c3sm10367449c88.2.2026.04.26.23.35.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 26 Apr 2026 23:35:28 -0700 (PDT) From: Thiago Jung Bauermann To: gdb-patches@sourceware.org Subject: [PATCH 06/36] GDB: testsuite: powerpc: Don't return -1 from top-level (manual) Date: Mon, 27 Apr 2026 03:34:30 -0300 Message-ID: <20260427063500.3847618-7-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; - procedure whose callers don't use the return value; There were also a few top-level "return 0" fixed opportunistically. --- gdb/testsuite/gdb.arch/altivec-abi.exp | 4 ++-- gdb/testsuite/gdb.arch/altivec-regs.exp | 6 +++--- gdb/testsuite/gdb.arch/e500-abi.exp | 6 +++--- gdb/testsuite/gdb.arch/e500-regs.exp | 8 ++++---- gdb/testsuite/gdb.arch/powerpc-d128-regs.exp | 4 ++-- gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp | 4 ++-- gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp | 2 +- gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.exp | 4 ++-- gdb/testsuite/gdb.arch/vsx-regs.exp | 8 ++++---- gdb/testsuite/gdb.arch/vsx-vsr-float28.exp | 6 +++--- 10 files changed, 26 insertions(+), 26 deletions(-) diff --git a/gdb/testsuite/gdb.arch/altivec-abi.exp b/gdb/testsuite/gdb.arch/altivec-abi.exp index f7bea3de4ced..1c2da2791083 100644 --- a/gdb/testsuite/gdb.arch/altivec-abi.exp +++ b/gdb/testsuite/gdb.arch/altivec-abi.exp @@ -33,7 +33,7 @@ proc altivec_abi_tests { extra_flags force_abi } { if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $compile_flags] != "" } { untested "failed to compile" - return -1 + return } if { "$force_abi" == "auto" } { @@ -52,7 +52,7 @@ proc altivec_abi_tests { extra_flags force_abi } { # Run to `main' where we begin our tests. if {![runto_main]} { - return -1 + return } gdb_test "set print frame-arguments all" diff --git a/gdb/testsuite/gdb.arch/altivec-regs.exp b/gdb/testsuite/gdb.arch/altivec-regs.exp index 55d245d92981..04dc342de6d4 100644 --- a/gdb/testsuite/gdb.arch/altivec-regs.exp +++ b/gdb/testsuite/gdb.arch/altivec-regs.exp @@ -36,8 +36,8 @@ if {[test_compiler_info gcc*]} { } if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $compile_flags] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } gdb_start @@ -49,7 +49,7 @@ gdb_load ${binfile} # if {![runto_main]} { - return 0 + return } gdb_breakpoint [gdb_get_line_number "start here"] diff --git a/gdb/testsuite/gdb.arch/e500-abi.exp b/gdb/testsuite/gdb.arch/e500-abi.exp index 1c074f10aa7e..e0223fd67888 100644 --- a/gdb/testsuite/gdb.arch/e500-abi.exp +++ b/gdb/testsuite/gdb.arch/e500-abi.exp @@ -29,8 +29,8 @@ set binfile ${objdir}/${subdir}/${testfile} set src1 ${srcdir}/${subdir}/${testfile}.c if { [gdb_compile ${src1} ${binfile} executable {debug nowarnings}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } gdb_start @@ -42,7 +42,7 @@ gdb_load ${binfile} # if {![runto_main]} { - return 0 + return } gdb_test "b marker" "Breakpoint 2 at.*file.*e500-abi.c, line ${::decimal}." "break marker" diff --git a/gdb/testsuite/gdb.arch/e500-regs.exp b/gdb/testsuite/gdb.arch/e500-regs.exp index 2dc1ade4b448..03d6f42b5332 100644 --- a/gdb/testsuite/gdb.arch/e500-regs.exp +++ b/gdb/testsuite/gdb.arch/e500-regs.exp @@ -28,8 +28,8 @@ set binfile ${objdir}/${subdir}/${testfile} set src1 ${srcdir}/${subdir}/${testfile}.c if { [gdb_compile ${src1} ${binfile} executable {debug nowarnings}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } gdb_start @@ -41,7 +41,7 @@ gdb_load ${binfile} # if {![runto_main]} { - return 0 + return } # set all the registers integer portions to 1 @@ -139,7 +139,7 @@ gdb_expect_list "info vector" ".*$gdb_prompt $" { clean_restart gdb_load $binfile if {![runto_main]} { - return 0 + return } gdb_test "break vector_fun" \ diff --git a/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp b/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp index 10c77ef29489..7043fac5e568 100644 --- a/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp +++ b/gdb/testsuite/gdb.arch/powerpc-d128-regs.exp @@ -25,8 +25,8 @@ require {istarget "powerpc64*-*"} standard_testfile if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {quiet debug}] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } clean_restart $::testfile diff --git a/gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp b/gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp index 1f41f3aaaa3f..3899121f9341 100644 --- a/gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp +++ b/gdb/testsuite/gdb.arch/powerpc-prologue-frame.exp @@ -29,8 +29,8 @@ if {[gdb_compile \ clean_restart $testfile if {![runto bar]} { - untested "could not run to bar" - return -1 + untested "could not run to bar" + return } gdb_test "bt" \ diff --git a/gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp b/gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp index 56854c75394d..2bd631429c0a 100644 --- a/gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp +++ b/gdb/testsuite/gdb.arch/ppc64-atomic-inst.exp @@ -33,7 +33,7 @@ proc do_test { displaced } { global decimal hex if {![runto_main]} { - return -1 + return } gdb_test_no_output "set displaced-stepping $displaced" diff --git a/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.exp b/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.exp index db8c7582d0c3..7f7c9a01fc9c 100644 --- a/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.exp +++ b/gdb/testsuite/gdb.arch/ppc64-isa207-atomic-inst.exp @@ -38,7 +38,7 @@ proc do_test { displaced } { global gdb_prompt inferior_exited_re srcfile srcfile2 if {![runto_main]} { - return -1 + return } gdb_test_no_output "set displaced-stepping $displaced" @@ -49,7 +49,7 @@ proc do_test { displaced } { gdb_test_multiple "continue" "Continue until lbarx/stbcx start breakpoint" { -re "$inferior_exited_re with code 01.\[\r\n\]+$gdb_prompt $" { unsupported "POWER8/ISA 2.07 atomic instructions not supported." - return -1 + return } -re "Continuing.*Breakpoint $decimal.*$gdb_prompt $" { pass "continue until test_atomic_sequences function" diff --git a/gdb/testsuite/gdb.arch/vsx-regs.exp b/gdb/testsuite/gdb.arch/vsx-regs.exp index 2c31935135da..87f749f93b12 100644 --- a/gdb/testsuite/gdb.arch/vsx-regs.exp +++ b/gdb/testsuite/gdb.arch/vsx-regs.exp @@ -34,8 +34,8 @@ if {[test_compiler_info gcc*]} { } if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $compile_flags] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } gdb_start @@ -45,7 +45,7 @@ gdb_load ${binfile} # Run to `main' where we begin our tests. if {![runto_main]} { - return 0 + return } set endianness [get_endianness] @@ -181,7 +181,7 @@ for {set i 0} {$i < 32} {incr i 1} { # Test reading the core file. if {!$core_supported} { - return -1 + return } clean_restart diff --git a/gdb/testsuite/gdb.arch/vsx-vsr-float28.exp b/gdb/testsuite/gdb.arch/vsx-vsr-float28.exp index ad6050bd4c8c..436076f10038 100644 --- a/gdb/testsuite/gdb.arch/vsx-vsr-float28.exp +++ b/gdb/testsuite/gdb.arch/vsx-vsr-float28.exp @@ -33,8 +33,8 @@ if {[test_compiler_info gcc*]} { } if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $compile_flags] != "" } { - untested "failed to compile" - return -1 + untested "failed to compile" + return } gdb_start @@ -44,7 +44,7 @@ gdb_load ${binfile} # Run to `main' where we begin our tests. if {![runto_main]} { - return 0 + return } set endianness [get_endianness]