Message ID | 20200210122802.GA19962@delia |
---|---|
State | New, archived |
Headers |
Received: (qmail 52529 invoked by alias); 10 Feb 2020 12:28:10 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <gdb-patches.sourceware.org> List-Unsubscribe: <mailto:gdb-patches-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:gdb-patches-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 52516 invoked by uid 89); 10 Feb 2020 12:28:09 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-25.2 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_PASS autolearn=ham version=3.3.1 spammy=sk:server-, gnutoolchaingerritosciio, gnutoolchain-gerrit.osci.io, UD:gnutoolchain-gerrit.osci.io X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 10 Feb 2020 12:28:08 +0000 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 27FCCAB87 for <gdb-patches@sourceware.org>; Mon, 10 Feb 2020 12:28:06 +0000 (UTC) Date: Mon, 10 Feb 2020 13:28:04 +0100 From: Tom de Vries <tdevries@suse.de> To: gdb-patches@sourceware.org Subject: [PING][PATCH][gdb/testsuite] Fix UNRESOLVED in gdb.server/server-kill-python.exp Message-ID: <20200210122802.GA19962@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-IsSubscribed: yes |
Commit Message
Tom de Vries
Feb. 10, 2020, 12:28 p.m. UTC
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 <tdevries@suse.de> PR testsuite/25488 * lib/gdb.exp (gdb_init): Unset $file_last_loaded. --- gdb/testsuite/lib/gdb.exp | 4 ++++ 1 file changed, 4 insertions(+)
Comments
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 <tdevries@suse.de> > > 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.
>>>>> "Luis" == Luis Machado <luis.machado@linaro.org> writes: >> + # Clear $last_loaded_file >> + global last_loaded_file >> + unset -nocomplain last_loaded_file Luis> Thanks for fixing this. I ran into this a few times. Luis> The patch LGTM. Looks good to me as well. Thank you. Tom
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