From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 122806 invoked by alias); 10 Feb 2020 22:14:31 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 122797 invoked by uid 89); 10 Feb 2020 22:14:30 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-wm1-f54.google.com Received: from mail-wm1-f54.google.com (HELO mail-wm1-f54.google.com) (209.85.128.54) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 10 Feb 2020 22:14:28 +0000 Received: by mail-wm1-f54.google.com with SMTP id b17so1094429wmb.0 for ; Mon, 10 Feb 2020 14:14:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:content-transfer-encoding; bh=SEULs0REIXCY5giSU2CD9bPJPQkPhv1ESy/iASLERDA=; b=Lg0LIlRlxEf58f3/1QzwYdCjEhdlpDEw9k5vRqZVdHwXHXZ+iXgwpeh7DMmJFbPhEL U9eKP0d8cndefCPqTQl4eVlgz71b63CVlcT1vMjz0olbRCXJHeoS9L6ZUHxvoRlnSL/Q e3af8AG8v2RjOjRr+WxZes3T9/fPrepHlPTIHC7uYBUxonyfjqjWJBdC0jEivsYpd8Pv YGW65gkrWu2yBsPhNXPrxw8p1l5vd4AdfdBlnOZLixl3c1euuTaEcXZJITpuFyhxtCEc 4pmSfYqi3oGEIPwiN+B5iUpd7O2afc9UEL7JxW47xBGHMNtYWY3ek/Eqj2gycjpa6OKC 7Vqw== Return-Path: Received: from [172.29.6.113] (26.124.146.82.ipv4.evonet.be. [82.146.124.26]) by smtp.gmail.com with ESMTPSA id f1sm2315913wro.85.2020.02.10.14.14.25 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 10 Feb 2020 14:14:25 -0800 (PST) Subject: Re: [PING][PATCH][gdb/testsuite] Fix UNRESOLVED in gdb.server/server-kill-python.exp To: Tom de Vries , gdb-patches@sourceware.org References: <20200210122802.GA19962@delia> From: Luis Machado Message-ID: <7ee6712a-8ce4-098a-c9f9-a9f241ce3673@linaro.org> Date: Mon, 10 Feb 2020 22:14:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200210122802.GA19962@delia> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00300.txt.bz2 On 2/10/20 9:28 AM, Tom de Vries wrote: > Hi, > > [ Ping and ml resubmission of gerrit review item > https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/760 . ] > > The test-case gdb.server/server-kill-python.exp runs fine by itself: > ... > Running src/gdb/testsuite/gdb.server/server-kill-python.exp ... > > === gdb Summary === > > nr of expected passes 3 > ... > > But if we run f.i. gdb.server/file-transfer.exp before it, we get instead: > ... > Running src/gdb/testsuite/gdb.server/server-kill-python.exp ... > ERROR: GDB process no longer exists > > === gdb Summary === > > nr of expected passes 13 > nr of unresolved testcases 1 > ... > > We can see the origin of the problem here: > ... > spawn gdbserver --once localhost:2347 \ > build/gdb/testsuite/outputs/gdb.server/file-transfer/file-transfer \ > build/gdb/testsuite/outputs/gdb.server/server-kill-python/server-kill-python^M > Process build/gdb/testsuite/outputs/gdb.server/file-transfer/file-transfer > \ created; pid = 9464^M > Listening on port 2347^M > ... > > The spawn of the gdbserver for the server-kill-python test-case gets as > executable argument the file-transfer binary. > > This is caused by proc gdbserver_spawn attempting to load the exec file in > $file_last_loaded. This is something that is meant to load the same exec in > the gdbserver that was earlier loaded into gdb. > > In this test-case however, nothing has been loaded into gdb by the test-case, > and consequently we load the file that was loaded into gdb in the previous > test-case. > > Fix this by unsetting $file_last_loaded in gdb_init. > > Build and reg-tested on x86_64-linux. > > OK for trunk? > > Thanks, > - Tom > > [gdb/testsuite] Fix UNRESOLVED in gdb.server/server-kill-python.exp > > gdb/testsuite/ChangeLog: > > 2020-01-31 Tom de Vries > > PR testsuite/25488 > * lib/gdb.exp (gdb_init): Unset $file_last_loaded. > > --- > gdb/testsuite/lib/gdb.exp | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp > index 2d230b791e..0a1080c34a 100644 > --- a/gdb/testsuite/lib/gdb.exp > +++ b/gdb/testsuite/lib/gdb.exp > @@ -5053,6 +5053,10 @@ proc gdb_init { test_file_name } { > set gdbserver_reconnect_p 1 > unset gdbserver_reconnect_p > > + # Clear $last_loaded_file > + global last_loaded_file > + unset -nocomplain last_loaded_file > + > # Reset GDB number of instances > global gdb_instances > set gdb_instances 0 > Thanks for fixing this. I ran into this a few times. The patch LGTM.