From patchwork Wed Feb 4 13:59:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 4910 Received: (qmail 26641 invoked by alias); 4 Feb 2015 13:59:18 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 26632 invoked by uid 89); 4 Feb 2015 13:59:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 04 Feb 2015 13:59:16 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id t14DxCIW009215 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 4 Feb 2015 08:59:12 -0500 Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t14Dx9pu002169; Wed, 4 Feb 2015 08:59:11 -0500 Message-ID: <54D225AD.2050401@redhat.com> Date: Wed, 04 Feb 2015 14:59:09 +0100 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Sergio Durigan Junior , GDB Patches CC: Mark Wielaard Subject: Re: [PATCH] Implement ${board}_{exec, spawn} for native-extended-gdbserver References: <1423005658-31405-1-git-send-email-sergiodj@redhat.com> <54D21931.8040806@redhat.com> In-Reply-To: <54D21931.8040806@redhat.com> On 02/04/2015 02:05 PM, Pedro Alves wrote: > On 02/04/2015 12:20 AM, Sergio Durigan Junior wrote: >> -# By default, dejagnu makes the board remote unless the board name >> -# matches localhost. Force it to be NOT remote. >> -global board >> -global board_info >> -set board_info($board,isremote) 0 > > I don't think we can/should remove this. That'll make > "is_remote" checks all over the testsuite return true, > and thus skip tests that weren't skipped before. E.g., > solib-display.exp. I've confirmed this. > I think we need to instead do here what ${board}_spawn > is already doing. That is, remove any target variant > specifications from $board, like: > > --- a/gdb/testsuite/boards/native-extended-gdbserver.exp > +++ b/gdb/testsuite/boards/native-extended-gdbserver.exp > @@ -27,7 +27,9 @@ load_board_description "gdbserver-base" > # matches localhost. Force it to be NOT remote. > global board > global board_info > -set board_info($board,isremote) 0 > +# Remove any target variant specifications from the name. > +set baseboard [lindex [split $board "/"] 0] > +set board_info($baseboard,isremote) 0 > > I'm testing that. It works. I've pushed the patch below now, to unblock the builder. More could/should be done though. A number of boards do "set_board_info isremote 0", so should be failing in the same way. Sounds like it'd be good to have a shared file all those boards would source, and we'd move native-extended-gdbserver.exp's version there. (TBC, I'm not planning on doing that myself.) --- From 42d9e5288b6576b56f3f803901433b88ee863bc6 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Wed, 4 Feb 2015 14:53:24 +0100 Subject: [PATCH] Fix '--target_board=native-extended-gdbserver/-m32' Running the testsuite with the native-extended-gdbserver.exp board and passing a variant spec, like make check RUNTESTFLAGS="--target_board=native-extended-gdbserver/-m32" results in dejagnu trying to open a rsh connection to "native-extended-gdbserver", which of course is wrong. The point of this board is running things locally. The issue is that the native-extended-gdbserver board does not clear the "isremote" flag properly. Reported by Sergio at: https://sourceware.org/ml/gdb-patches/2015-02/msg00067.html testsuite/ 2015-02-04 Pedro Alves * boards/native-extended-gdbserver.exp: Remove any target variant specifications from the board name before clearing the isremote flag from board_info. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/boards/native-extended-gdbserver.exp | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 2657987..fcc16cb 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2015-02-04 Pedro Alves + + * boards/native-extended-gdbserver.exp: Remove any target variant + specifications from the board name before clearing the isremote + flag from board_info. + 2015-01-31 Doug Evans * gdb.base/maint.exp : Update expected output. diff --git a/gdb/testsuite/boards/native-extended-gdbserver.exp b/gdb/testsuite/boards/native-extended-gdbserver.exp index 57503db..8d299ef 100644 --- a/gdb/testsuite/boards/native-extended-gdbserver.exp +++ b/gdb/testsuite/boards/native-extended-gdbserver.exp @@ -27,7 +27,9 @@ load_board_description "gdbserver-base" # matches localhost. Force it to be NOT remote. global board global board_info -set board_info($board,isremote) 0 +# Remove any target variant specifications from the name. +set baseboard [lindex [split $board "/"] 0] +set board_info($baseboard,isremote) 0 set_board_info sockethost "localhost:"