From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 106326 invoked by alias); 28 Oct 2018 17:43:24 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 106312 invoked by uid 89); 28 Oct 2018 17:43:23 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=spending, ssh, harness, if X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sun, 28 Oct 2018 17:43:21 +0000 Received: from svr-orw-mbx-03.mgc.mentorg.com ([147.34.90.203]) by relay1.mentorg.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-SHA384:256) id 1gGp5p-0002Xl-5N from Sandra_Loosemore@mentor.com ; Sun, 28 Oct 2018 10:43:17 -0700 Received: from [127.0.0.1] (147.34.91.1) by svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) with Microsoft SMTP Server (TLS) id 15.0.1320.4; Sun, 28 Oct 2018 10:43:14 -0700 Subject: Re: remote host testing expectations re multiple simultaneous connections To: Simon Marchi CC: References: <30184147-e912-0713-d561-8131e7f629aa@codesourcery.com> From: Sandra Loosemore Message-ID: <993f1ebe-d055-d1a1-879a-5cd2d8c8fd35@codesourcery.com> Date: Sun, 28 Oct 2018 17:43:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2018-10/txt/msg00057.txt.bz2 On 10/28/2018 11:04 AM, Simon Marchi wrote: > On 2018-10-26 15:21, Sandra Loosemore wrote: >> I've noticed that there are several gdb.mi tests that start GDB before >> building the test program, like this bit of code from mi-cli.exp: >> >> gdb_exit >> if [mi_gdb_start] { >>     continue >> } >> >> standard_testfile basics.c >> >> if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" >> executable {debug}] != "" } { >>      untested "failed to compile" >>      return -1 >> } >> >> mi_gdb_test "-interpreter-exec" \ >>   {\^error,msg="-interpreter-exec: Usage: -interpreter-exec interp >> command"} \ >>   "-interpreter-exec with no arguments" >> >> E.g. there's an implicit expectation that when testing on a remote >> host, it can start GDB and leave it running and waiting to accept GDB >> commands while running some other shell commands to build the test >> program on a different channel to the same remote host.  Is this a >> reasonable expectation that is documented somewhere?  Or are the test >> cases that are structured like this just broken?  :-S  If the latter I >> will submit a patch to fix them. > > I haven't tried remote host testing in a long time, but I would expect > the framework to be able to run multiple things concurrently.  Just like > for remote target testing, we are able to spawn multiple programs, spawn > gdbserver, and attach to them. > > What happens currently when you try it? Our local remote-host DejaGnu test support (for testing on Windows host, actually) maintains some global state about the spawned GDB connection that is getting clobbered by opening another connection to the same host to run shell commands, resulting in GDB getting killed (so all these tests fail). I've been struggling to find exactly what is going wrong, but wanted to make sure that this is actually a test harness bug and not broken testcases before spending any more time on it. It does seem like requiring support for multiple simultaneous connections to either a host or target would preclude testing on anything where all you have is a single serial connection to talk to it, and not (say) multiple ssh connections. -Sandra