From patchwork Fri Oct 13 10:22:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 23531 Received: (qmail 116128 invoked by alias); 13 Oct 2017 10:22:54 -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 115409 invoked by uid 89); 13 Oct 2017 10:22:53 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= 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 ESMTP; Fri, 13 Oct 2017 10:22:52 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 327EF267FB for ; Fri, 13 Oct 2017 10:22:51 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 327EF267FB Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves@redhat.com Received: from cascais.lan (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id A026717CF3 for ; Fri, 13 Oct 2017 10:22:50 +0000 (UTC) From: Pedro Alves To: gdb-patches@sourceware.org Subject: [pushed] Fix is_remote check in gdb.base/remote.exp Date: Fri, 13 Oct 2017 11:22:49 +0100 Message-Id: <1507890169-32230-1-git-send-email-palves@redhat.com> 1. Otherwise, when the native-gdbserver board stops setting is_remote, this test would stop running there. 2. Makes the test run with --target_board=native-extended-gdbserver too. gdb/testsuite/ChangeLog: 2017-10-13 Pedro Alves * gdb.base/remote.exp: Check gdb_protocol instead of is_remote. (top level): Add comment. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.base/remote.exp | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 51d788b..117ab9b 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2017-10-13 Pedro Alves + * gdb.base/remote.exp: Check gdb_protocol instead of is_remote. + (top level): Add comment. + +2017-10-13 Pedro Alves + * gdb.base/remote.exp (top level): Fix comment typo and add missing return. diff --git a/gdb/testsuite/gdb.base/remote.exp b/gdb/testsuite/gdb.base/remote.exp index db6fc00..2f3ede1 100644 --- a/gdb/testsuite/gdb.base/remote.exp +++ b/gdb/testsuite/gdb.base/remote.exp @@ -13,10 +13,9 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . - - -# test only on a remote target board -if {! [is_remote target]} { +# Test only on boards that actually use the remote protocol. +if {[target_info gdb_protocol] != "remote" + && [target_info gdb_protocol] != "extended-remote"} { return } @@ -103,6 +102,10 @@ proc gdb_load_timed {executable class writesize} { pass $test } +# These download tests won't actually download anything on !is_remote +# target boards, but we run them anyway because it's simpler, and +# harmless. + # Typically about 400-1 bytes can be downloaded gdb_load_timed $binfile "limit" 398 gdb_load_timed $binfile "limit" 400