From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id VORaGEfnJmXSNSsAWB0awg (envelope-from ) for ; Wed, 11 Oct 2023 14:19:51 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1697048391; bh=K9qu8v3zu+OnEZkTPVObuANgExx87+R0Gp4w6n0Y1qo=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=uH5KiddVjRD6OiLH9OSnpREvvRy6By4waZNiZQ4K35H5ZxrgyhMmf+KZcV5vQ95P0 GHR1isOmzryUmXY+iwzHRQJPJyZwUbzkX7TT/Ym45hB+IcGDu6a2oz/baDoW2iFx8i aDtmhl5PhNJFuAO1cJNvARzlCC+p303pArUjsk3Y= Received: by simark.ca (Postfix, from userid 112) id 5628B1E0C1; Wed, 11 Oct 2023 14:19:51 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=ZkO852be; dkim-atps=neutral Received: from server2.sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (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 2938A1E091 for ; Wed, 11 Oct 2023 14:19:49 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A0DB13858C30 for ; Wed, 11 Oct 2023 18:19:48 +0000 (GMT) Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 49B3B3858D1E for ; Wed, 11 Oct 2023 18:19:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 49B3B3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1697048366; bh=K9qu8v3zu+OnEZkTPVObuANgExx87+R0Gp4w6n0Y1qo=; h=Date:Subject:To:References:From:In-Reply-To:From; b=ZkO852befYjW+XXCWFUS+Q8yLp3pGjmHdCWg3VrKTUYB5MUXn6gbBDx62010alLb9 TuUwgoJTu0bgXuyVk/Rap8pbqPuuGu+V2Q2LTeQm6UGo+6BSV2i60Bo95xjfbug73/ fbCfraGbuU/RVFltcN2pvz6rEGPMYP6Am/bpqoC4= Received: from [172.16.0.192] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 6392B1E091; Wed, 11 Oct 2023 14:19:26 -0400 (EDT) Message-ID: <69137e71-b2d6-4505-a563-599c6eeead91@simark.ca> Date: Wed, 11 Oct 2023 14:19:26 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Fix test suite failure in file-then-restart.exp Content-Language: fr To: Tom Tromey , gdb-patches@sourceware.org References: <20231011162142.2725265-1-tromey@adacore.com> From: Simon Marchi In-Reply-To: <20231011162142.2725265-1-tromey@adacore.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.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+public-inbox=simark.ca@sourceware.org On 10/11/23 12:21, Tom Tromey wrote: > Simon pointed out that the new file-then-restart.exp test fails with > the extended-remote target board. > > The problem is that the test suite doesn't use gdb_file_cmd -- which > handles things like "set remote exec-file". This patch changes > gdb_file_cmd to make the "kill" command optional, and then switches > the test case to use it. > > Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30933 Thanks, I will give the patch a try. > diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp > index 0a908e0af0f..63885860795 100644 > --- a/gdb/testsuite/lib/gdb.exp > +++ b/gdb/testsuite/lib/gdb.exp > @@ -2146,6 +2146,9 @@ proc default_gdb_exit {} { > # Load a file into the debugger. > # The return value is 0 for success, -1 for failure. > # > +# ARG is the file name. > +# KILL_FLAG, if given, indicates whether a "kill" command should be used. > +# > # This procedure also set the global variable GDB_FILE_CMD_DEBUG_INFO > # to one of these values: > # > @@ -2165,7 +2168,7 @@ proc default_gdb_exit {} { > # TODO: gdb.base/sepdebug.exp and gdb.stabs/weird.exp might be able to use > # this if they can get more information set. > > -proc gdb_file_cmd { arg } { > +proc gdb_file_cmd { arg {kill_flag 1} } { > global gdb_prompt > global GDB > global last_loaded_file > @@ -2194,15 +2197,17 @@ proc gdb_file_cmd { arg } { > # The file command used to kill the remote target. For the benefit > # of the testsuite, preserve this behavior. Mark as optional so it doesn't > # get written to the stdin log. Wow, I didn't know about (or forgot) this behavior of gdb_file_cmd. This seems like a relic of the past. I wonder how important that kill is, if we can get rid of it. I would expect gdb_file_cmd to more or less just issue the "file" command. Simon