From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42421 invoked by alias); 28 Jun 2016 20:19:27 -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 42384 invoked by uid 89); 28 Jun 2016 20:19:26 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: usplmg20.ericsson.net Received: from usplmg20.ericsson.net (HELO usplmg20.ericsson.net) (198.24.6.45) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Tue, 28 Jun 2016 20:19:25 +0000 Received: from EUSAAHC008.ericsson.se (Unknown_Domain [147.117.188.96]) by usplmg20.ericsson.net (Symantec Mail Security) with SMTP id 3E.36.09012.B81D2775; Tue, 28 Jun 2016 21:35:40 +0200 (CEST) Received: from [142.133.110.144] (147.117.188.8) by smtp-am.internal.ericsson.com (147.117.188.98) with Microsoft SMTP Server id 14.3.294.0; Tue, 28 Jun 2016 16:19:22 -0400 Subject: Re: [PATCH v3 31/34] Add testing infrastruture bits for running with MI on a separate UI To: Pedro Alves , References: <1462538104-19109-1-git-send-email-palves@redhat.com> <1462538104-19109-32-git-send-email-palves@redhat.com> From: Simon Marchi Message-ID: <5772DBCA.4090802@ericsson.com> Date: Tue, 28 Jun 2016 20:19:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <1462538104-19109-32-git-send-email-palves@redhat.com> Content-Type: text/plain; charset="windows-1252" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2016-06/txt/msg00473.txt.bz2 On 16-05-06 08:35 AM, Pedro Alves wrote: > With this, a specific test may can start GDB with MI on a separate UI > by using: > > mi_gdb_start separate-mi-tty > > In addition, it's also possible to run the whole testsuite with MI on > a separate tty, with: > > make check RUNTESTFLAGS="FORCE_SEPARATE_MI_TTY=1" > > gdb_main_spawn_id and mi_spawn_id are added so that tests may expect > output from either channel. > > While at it, inferior_spawn_id was not being cleared when gdb exits, > unlike the other spawn ids, thus a test that starts gdb more than once > would end up using a stale spawn id. Hi Pedro, I think this commit breaks MI tests with native-gdbserver: $ make check RUNTESTFLAGS="--target_board=native-gdbserver mi-var-child.exp" ... Running /home/emaisin/build/binutils-gdb/gdb/testsuite/../../../../src/binutils-gdb/gdb/testsuite/gdb.mi/mi-var-child.exp ... can't unset "inferior_spawn_id": no such variable while executing "unset inferior_spawn_id" (procedure "close_gdbserver" line 20) invoked from within "close_gdbserver" ... I added a few traces to understand what's happening, and it seems that inferior_spawn_id is being unset at two places: >>> gdbserver-support.exp:gdb_exit called >>> gdb.exp:default_gdb_exit called >>> mi-support.exp:default_mi_gdb_start called *** set inferior_spawn_id to gdb_spawn_id exp8 in mi-support.exp:default_mi_gdb_start >>> gdbserver-support.exp:gdbserver_start called *** set server_spawn_id in gdbserver-support.exp:gdbserver_start *** set inferior_spawn_id to server_spawn_id exp9 in gdbserver-support.exp.exp:gdbserver_start >>> gdbserver-support.exp:gdbserver_start called *** set server_spawn_id in gdbserver-support.exp:gdbserver_start *** set inferior_spawn_id to server_spawn_id exp10 in gdbserver-support.exp.exp:gdbserver_start >>> mi-support.exp:mi_uncatched_gdb_exit called *** unset inferior_spawn_id in mi-support.exp:mi_uncatched_gdb_exit >>> gdbserver-support.exp:gdb_exit called *** unset server_spawn_id in gdbserver-support.exp:close_gdbserver *** unset inferior_spawn_id in gdbserver-support.exp:close_gdbserver <--- This is the one that breaks. The easy way would be to add a "info exists" check before unsetting it, but I don't know if that would only hide a real problem. Simon