From patchwork Wed Apr 29 23:03:55 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thiago Jung Bauermann X-Patchwork-Id: 134196 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id C5DBA4BB3BE6 for ; Wed, 29 Apr 2026 23:05:24 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C5DBA4BB3BE6 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=JXk42/HB X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-vk1-xa2c.google.com (mail-vk1-xa2c.google.com [IPv6:2607:f8b0:4864:20::a2c]) by sourceware.org (Postfix) with ESMTPS id A804C4358A69 for ; Wed, 29 Apr 2026 23:04:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org A804C4358A69 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 A804C4358A69 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::a2c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777503890; cv=none; b=LkEbBo7yVJxJ/wpRB6hcttY1GcbJLtM7QJDHzysIEXp76C69nxsMUoc1sGT5Q1aPEAGKnI3OSqvzaPR3qOP8WdFGNycou/q5d9vA6zlwekHL+WuZQAM3CyMP1SHpUjgewjyX9QNF0Hb/oy1GhybnD/NarVH0QBs9zMXabSJxtCE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777503890; c=relaxed/simple; bh=g1seObBqvc0NYaOeN0jhgPBcMgmtHUNQunC1N+6VmLY=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=SX4kCIGbiilsNJKlTw1frc+FSIaIQ/GLTEZF6SeqKEjBd4qPlIQM9rtRXtKKLd+tqR2V4qx5+Azb9PliOlyeRGkcZdZ9/LQaBm7ZmFInSWZwkUnuo1CQJZNZAod7d1lnhk8y0uIQhBZTr0Rhi95LNLSpGa0UK3TcsErmTD7D/5E= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A804C4358A69 Received: by mail-vk1-xa2c.google.com with SMTP id 71dfb90a1353d-56db1b3626bso170921e0c.1 for ; Wed, 29 Apr 2026 16:04:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1777503890; x=1778108690; 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=9aaF9Y+/WHb6VVQLcfAOn3TegGAc3hYFS0bSI0q4dto=; b=JXk42/HBdVopia9ndsSu4FKbr8K3g6ihF35PJCNcxjrdMjJ0NBEBKcJ8yhNVdrU3aq aHOLffcpVF7PP1idYb1MEBVJCcb7jN/S7NZmbXrXoSutKiOmm4kTA+DYe2hkBUF6o0XK WpRt6RkDMX3q7vO9Zf83ORBqK5TBUZP8nWh15bGicAR8Bj/hSI0HEyiYtUR2ZCdOp/dM xDU52hRawCBul1SmIS+JMTPKZSFg9Ja1+zCgY1oxT1WrjMPiJCzIXgr9tV/o8rY4Bjpc Lrphwbz0rCffcJKSzsYaoJTvGYy7LNtjXpgcHI/vS+wLA0EI2oDcnnl1DZ7LvGGZ7GPu isHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777503890; x=1778108690; 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: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 2002:a05:6122:4f9a:b0:56f:7c7e:f33a with SMTP id 71dfb90a1353d-573c90a960fmr134327e0c.0.1777503890011; Wed, 29 Apr 2026 16:04:50 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8083:f04c:42e3:5943:38f6]) by smtp.gmail.com with ESMTPSA id 71dfb90a1353d-573b6e264aasm2022321e0c.17.2026.04.29.16.04.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Apr 2026 16:04:49 -0700 (PDT) From: Thiago Jung Bauermann To: gdb-patches@sourceware.org Subject: [PATCH v2 04/37] GDB: testsuite: x86, amd64, i386: Don't return value from top-level (manual) Date: Wed, 29 Apr 2026 20:03:55 -0300 Message-ID: <20260429230432.60487-5-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 X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on sourceware.org 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~patchwork=sourceware.org@sourceware.org This patch manually changes the "return -1" statements that weren't caught by the sed command. In amd64-shadow-stack-cmds.exp the return statements have extra indentation due to being inside a save_vars block. In i386-bp_permanent.exp this was caused by misaligned lines, which are now fixed. --- gdb/testsuite/gdb.arch/amd64-shadow-stack-cmds.exp | 8 ++++---- gdb/testsuite/gdb.arch/i386-bp_permanent.exp | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gdb/testsuite/gdb.arch/amd64-shadow-stack-cmds.exp b/gdb/testsuite/gdb.arch/amd64-shadow-stack-cmds.exp index e4daecb590dd..e67a0c2e4a1f 100644 --- a/gdb/testsuite/gdb.arch/amd64-shadow-stack-cmds.exp +++ b/gdb/testsuite/gdb.arch/amd64-shadow-stack-cmds.exp @@ -42,16 +42,16 @@ save_vars { ::env(GLIBC_TUNABLES) } { append_environment GLIBC_TUNABLES "glibc.cpu.hwcaps" "SHSTK" if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile} \ {debug additional_flags="-fcf-protection=return"}] } { - return -1 + return } clean_restart ${::testfile} if { ![runto_main] } { - return -1 + return } with_test_prefix "test inferior call and continue" { gdb_breakpoint [ gdb_get_line_number "break call1" ] gdb_continue_to_breakpoint "break call1" ".*break call1.*" @@ -83,11 +83,11 @@ save_vars { ::env(GLIBC_TUNABLES) } { gdb_continue_to_end } clean_restart ${::testfile} if { ![runto_main] } { - return -1 + return } set call1_line [ gdb_get_line_number "break call1" ] set call2_line [ gdb_get_line_number "break call2" ] @@ -120,11 +120,11 @@ save_vars { ::env(GLIBC_TUNABLES) } { gdb_continue_to_end } clean_restart ${::testfile} if { ![runto_main] } { - return -1 + return } with_test_prefix "test return from past frame" { gdb_breakpoint $call2_line gdb_continue_to_breakpoint "break call2" ".*break call2.*" diff --git a/gdb/testsuite/gdb.arch/i386-bp_permanent.exp b/gdb/testsuite/gdb.arch/i386-bp_permanent.exp index ef4d0370de89..9805f5626348 100644 --- a/gdb/testsuite/gdb.arch/i386-bp_permanent.exp +++ b/gdb/testsuite/gdb.arch/i386-bp_permanent.exp @@ -38,11 +38,11 @@ clean_restart $::testfile # # Run to `main' where we begin our tests. # if {![runto_main]} { - return -1 + return } set function "standard" set retcode [gdb_test_multiple "disassemble $function" "disassemble function '$function'" { @@ -51,12 +51,12 @@ set retcode [gdb_test_multiple "disassemble $function" "disassemble function '$f set address_after_bp $expect_out(3,string) } }] if {$retcode != 0} { - fail "disassemble failed, skipping entire test." - return -1 + fail "disassemble failed, skipping entire test." + return } gdb_breakpoint "*$address_bp" gdb_test "continue" "Breakpoint .*, $address_bp in $function.*" \