From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.polymtl.ca (smtp.polymtl.ca [132.207.4.11]) by sourceware.org (Postfix) with ESMTPS id 8BB393857806 for ; Wed, 16 Mar 2022 13:24:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8BB393857806 Received: from simark.ca (simark.ca [158.69.221.121]) (authenticated bits=0) by smtp.polymtl.ca (8.14.7/8.14.7) with ESMTP id 22GDOKgN030224 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 16 Mar 2022 09:24:25 -0400 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp.polymtl.ca 22GDOKgN030224 Received: from [10.0.0.11] (192-222-157-6.qc.cable.ebox.net [192.222.157.6]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 0545F1EDF0; Wed, 16 Mar 2022 09:24:19 -0400 (EDT) Message-ID: <0f9491bf-ef50-7743-1ae4-fd12c48f198c@polymtl.ca> Date: Wed, 16 Mar 2022 09:24:19 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.6.1 Subject: Re: [PATCH 1/3] gdb: testsuite: leave can_spawn_for_attach alone Content-Language: en-US To: Tiezhu Yang , gdb-patches@sourceware.org References: <1647424709-23680-1-git-send-email-yangtiezhu@loongson.cn> <1647424709-23680-2-git-send-email-yangtiezhu@loongson.cn> From: Simon Marchi In-Reply-To: <1647424709-23680-2-git-send-email-yangtiezhu@loongson.cn> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Poly-FromMTA: (simark.ca [158.69.221.121]) at Wed, 16 Mar 2022 13:24:20 +0000 X-Spam-Status: No, score=-3038.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, NICE_REPLY_A, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Mar 2022 13:24:35 -0000 On 2022-03-16 05:58, Tiezhu Yang wrote: > As Pedro Alves said, caching procs should not issue pass/fail [1], > this commit removes gdb_test_multiple in can_spawn_for_attach. > > [1] https://sourceware.org/pipermail/gdb-patches/2022-March/186311.html > > Signed-off-by: Tiezhu Yang > --- > gdb/testsuite/lib/gdb.exp | 48 +++++++---------------------------------------- > 1 file changed, 7 insertions(+), 41 deletions(-) > > diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp > index a35d08a..8fafcc0 100644 > --- a/gdb/testsuite/lib/gdb.exp > +++ b/gdb/testsuite/lib/gdb.exp > @@ -5081,7 +5081,7 @@ proc gdb_exit { } { > # Return true if we can spawn a program on the target and attach to > # it. > > -gdb_caching_proc can_spawn_for_attach { > +proc can_spawn_for_attach { } { > # We use exp_pid to get the inferior's pid, assuming that gives > # back the pid of the program. On remote boards, that would give > # us instead the PID of e.g., the ssh client, etc. > @@ -5098,46 +5098,6 @@ gdb_caching_proc can_spawn_for_attach { > return 0 > } If we don't want can_spawn_for_attach to emit test results, we should also remove the "unsupported" calls. If you'd like to still get a trace about why a test run doesn't support spawning for attach, you can replace those with "verbose -log ...", instead of removing them. Maybe change the subject to "remove attach test from can_spawn_for_attach", that would be more precise than "leave can_spawn_for_attach alone". With those changed, this patch LGTM, it essentially reverts to the original state. Simon