From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id CIp/ADAr8WkitwEAWB0awg (envelope-from ) for ; Tue, 28 Apr 2026 17:48:32 -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=Qkx6luEA; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id E299E1E093; Tue, 28 Apr 2026 17:48:31 -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 EE44D1E093 for ; Tue, 28 Apr 2026 17:48:30 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 5E1B74BB8F71 for ; Tue, 28 Apr 2026 21:48:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5E1B74BB8F71 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=Qkx6luEA Received: from mail-yx1-xb12a.google.com (mail-yx1-xb12a.google.com [IPv6:2607:f8b0:4864:20::b12a]) by sourceware.org (Postfix) with ESMTPS id 747D34BA23D4 for ; Tue, 28 Apr 2026 21:48:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 747D34BA23D4 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 747D34BA23D4 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::b12a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777412885; cv=none; b=vKImaWrfpugrNWcgGCbvYIWfMOxok7ajWVgB0ALz3KqJGiDHaoxzjbyqyubD1Umd8E3k+VLRZ51ruAFrVVrsWo+Wat9bLUcryZz5VzaiYMgiQk7CZT+lSF1BLSELr2yE5yAPI/V/Xae2qQCJW1ue/PSrPNmvJnV8KprcdTdlOLo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777412885; c=relaxed/simple; bh=aGCOjfzqMYRZbuJx+l4BiWr+xZ6BsJ76XpT/aG62mzM=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=c7enuQWWuhniZneV4BT1k/JGG2l35fazwnMc37BY+dr91NdQV2DSxTjALC4pI8nwEiYhDy8zEdcN3gU0o92ukFBWdLbjowVxDK3Cu21a1SDktV4Z7gFm9uLdNHKMy+LViwVE4G4+3tEtuzxVdh90w5stZcmNoMWxCyMGUla46jk= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 747D34BA23D4 Received: by mail-yx1-xb12a.google.com with SMTP id 956f58d0204a3-6579254f996so2407075d50.1 for ; Tue, 28 Apr 2026 14:48:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1777412885; x=1778017685; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nBdBJyV1MPekBCqvTQeC72nupX1wl8CDGYK6Xrk9SRs=; b=Qkx6luEAuCJoAHk0GO0TARVw5dHVw0+01xAb1DKbIYzM91QVlqSkKMuNrOSRTp3Wmn FPWAb17jYRHWhPheWj/ZBh6PJR1CEmW1Vr1jkhIC8RzqoYW5OkSUmUEygultrR+XHbCG 7ZBVeLjgGXk/LOCJK+FzE1NDn+SVTFzgW0EP8y62+UHtFQ9/Wigy6/CjJ2vGFKSICre2 8xw6nmn1IOO64wW7KMbjZ1dU6lhPancQ3b5DrTmQ1npcJ3LQGuuCb/zK1LH83yxhsM3G Na2r5Oxdo9kCT3ELIOOdTxjDig5xQurwMjmO2Zke41xOQWuXLoJ10SyJDr08GQtoCx6w e1tw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1777412885; x=1778017685; h=content-transfer-encoding:mime-version:message-id:date:user-agent :references:in-reply-to:subject:cc:to:from:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=nBdBJyV1MPekBCqvTQeC72nupX1wl8CDGYK6Xrk9SRs=; b=gjJ9IpEwfSliHWRTzlzx+bCGjElT2T0xvpXG0s/wZJTVD1Jn90/HMRQmpipRcZ/zGu FCeKOJO7/AtTO3pXeAPewgIT89JhgnOE9RoNSozYS1q60rFJk9uS8CE5aytHOAmq/z3R QiWYuCr0fxwrzQTOS4eQvHLnjCoBNNVu3bRaQaVoXJrdxN1P7Nuh7ulNI7TnDm5MUGvZ Y/qu4fVrkSdNXZkRdFWdBy9KiXPcmknB2NAfocl9JJS7mDkIJrUVc0URwlhNCScIQxjq UqHc8lzdbhsQ0HOJ6FlSJfAz7gCmYOpFmj35QEDT3ICEmqAwxZBUJiLL08vWk+O0Oq5j Pjzg== X-Gm-Message-State: AOJu0YyYTy06pchtfVvHfWJNWV56zeJFJWtUE7XHCDFzSCQVYWAXBDmy bI49LeSdFsKi++S1+/31JTHJfwoyd9Na+xm3UUwAyxX0mFO/r+Fckut61C78iPbrszM= X-Gm-Gg: AeBDiescoTpNxoZ+9nGKlhFiVXYZ5fAB5MzufDsIApy6vf9vR+wC7gYILli+ll7URSp njMNsRItoVorXWQFgVt8OP98YSFAexv55lVi2yVbukzUcvOYX/z8OE4QpQz3CwxhK8cWsEDla11 YOAphhT99Nq1WwYfoCbtSpz7zsjvTp1GBNvWN7sEuLQzhwRPQESrv5lqjVT8006ioJuwfackNSe tpyA6byM6s/+obDL3ziY8pNFKhXjYLgkMuMCTH7yctZJSfSkoC/+C6HvIbbYBd+ghHmFSBegvpu y0/Dj6oquMp6J9H49s9aaZws52l5v5FreP+f2XPh7Yb+r982Jg9gf7/UXOS4aV+MWSAr0JgKzWG aStM78GeaFEcOp5mkcGHHFIjVkq5WafT+JmJMWZK0v1j0QLUSIX0if/3ZUijfmsT2+70xOFJPPz n1JNlBWidHOWdmQRaALkmBwJ04v10Tx0LlcnMbxetfGEfj X-Received: by 2002:a53:ac82:0:b0:64a:ce9a:ace2 with SMTP id 956f58d0204a3-65bfb7279a6mr1706388d50.56.1777412884650; Tue, 28 Apr 2026 14:48:04 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8083:f04c:42e3:5943:38f6]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-65bff71d4c1sm205362d50.14.2026.04.28.14.48.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 Apr 2026 14:48:04 -0700 (PDT) From: Thiago Jung Bauermann To: "Schimpe, Christina" Cc: "gdb-patches@sourceware.org" Subject: Re: [PATCH 04/36] GDB: testsuite: intel: Don't return -1 from top-level (manual) In-Reply-To: (Christina Schimpe's message of "Tue, 28 Apr 2026 16:39:04 +0000") References: <20260427063500.3847618-1-thiago.bauermann@linaro.org> <20260427063500.3847618-5-thiago.bauermann@linaro.org> User-Agent: mu4e 1.14.0; emacs 30.2 Date: Tue, 28 Apr 2026 18:48:01 -0300 Message-ID: <87ik9akb8u.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 Hello Christina, Thank you for your quick review! "Schimpe, Christina" writes: > Hi Thiago,=20 > > For this patch I have the same comment about the commit message for the "= intel" part. I agree with that comment. I'll adopt your suggestion for v2. >> diff --git a/gdb/testsuite/gdb.arch/amd64-shadow-stack-cmds.exp >> b/gdb/testsuite/gdb.arch/amd64-shadow-stack-cmds.exp >> index e4daecb590dd..266c658eae86 100644 >> --- a/gdb/testsuite/gdb.arch/amd64-shadow-stack-cmds.exp >> +++ b/gdb/testsuite/gdb.arch/amd64-shadow-stack-cmds.exp >> @@ -29,7 +29,7 @@ proc restart_and_run_infcall_call2 {} { >> global binfile >> clean_restart ${::testfile} >> if { ![runto_main] } { >> - return -1 >> + return >> } > > I believe for this specific proc the correct behaviour would be to examin= e the return > value and then terminate the test (with a return). > But the current behaviour is that the test continues in case run_to_main = fails. > Since this is a bug introduced by me, I think you could omit this from th= is patch. > I can take care of this separately. > > The same issue is in aarch64-gcs-return.exp.=F0=9F=98=8A Good point that makes sense. I'll leave these changes out from v2. Thanks for noticing it. >> set inside_infcall_str "The program being debugged stopped while in= a >> function called from GDB" >> gdb_breakpoint [ gdb_get_line_number "break call2" ] @@ -44,12 +44,= 12 >> @@ save_vars { ::env(GLIBC_TUNABLES) } { >>=20 >> if { [prepare_for_testing "failed to prepare" ${testfile} ${srcfile= } \ >> {debug additional_flags=3D"-fcf-protection=3Dreturn"}] } { >> - return -1 >> + return >> } >>=20 >> clean_restart ${::testfile} >> if { ![runto_main] } { >> - return -1 >> + return >> } >>=20 >> with_test_prefix "test inferior call and continue" { @@ -85,7 +85,7= @@ >> save_vars { ::env(GLIBC_TUNABLES) } { >>=20 >> clean_restart ${::testfile} >> if { ![runto_main] } { >> - return -1 >> + return >> } >>=20 >> set call1_line [ gdb_get_line_number "break call1" ] @@ -122,7 +122= ,7 >> @@ save_vars { ::env(GLIBC_TUNABLES) } { >>=20 >> clean_restart ${::testfile} >> if { ![runto_main] } { >> - return -1 >> + return >> } >>=20 >> with_test_prefix "test return from past frame" { diff --git >> a/gdb/testsuite/gdb.arch/core-file-pid0.exp b/gdb/testsuite/gdb.arch/cor= e- >> file-pid0.exp >> index 8f4f88bcdb6a..3f389a705480 100644 >> --- a/gdb/testsuite/gdb.arch/core-file-pid0.exp >> +++ b/gdb/testsuite/gdb.arch/core-file-pid0.exp >> @@ -28,7 +28,7 @@ if {[istarget "x86_64-*-linux*"]} { >> set cf_size 8757248 >> } else { >> unsupported "no pre-generated core file for this target" >> - return -1 >> + return >> } >>=20 >> # Decompress the core file. >> @@ -36,14 +36,14 @@ set corebz2file ${srcdir}/${subdir}/${cf_name} set >> corefile [decompress_bz2 $corebz2file] if { $corefile eq "" } { >> untested "failed to bunzip2 the core file" >> - return -1 >> + return >> } >>=20 >> # Check the size of the decompressed core file. Just for sanity. >> file stat ${corefile} corestat >> if { $corestat(size) !=3D ${cf_size} } { >> untested "uncompressed core file is the wrong size" >> - return -1 >> + return >> } >>=20 >> # Copy over the corefile if we are remote testing. >> 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 >> @@ -40,7 +40,7 @@ clean_restart $::testfile # >>=20 >> if {![runto_main]} { >> - return -1 >> + return >> } >>=20 >> set function "standard" >> @@ -53,8 +53,8 @@ set retcode [gdb_test_multiple "disassemble $function" >> "disassemble function '$f }] >>=20 >> if {$retcode !=3D 0} { >> - fail "disassemble failed, skipping entire test." >> - return -1 >> + fail "disassemble failed, skipping entire test." >> + return >> } >>=20 >> gdb_breakpoint "*$address_bp" > > I looked at a few more changes in this series and saw similar issues for = the proc return values. > I guess each return which is inside a proc must be examined individually = to find > out what the correct behaviour should be... what do you think? Ah, yes that makes sense. Thank you for catching that. I will make a v2 which only includes top-level return statements (including the ones within save_vars, with_test_prefix and such). That should be easier to review. I will also include the "return 0" fixes you mentioned in the other patch. --=20 Thiago