From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58712 invoked by alias); 22 May 2018 22:30:46 -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 58457 invoked by uid 89); 22 May 2018 22:30:23 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-25.4 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=junior, Junior X-HELO: mx1.redhat.com Received: from mx3-rdu2.redhat.com (HELO mx1.redhat.com) (66.187.233.73) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Tue, 22 May 2018 22:30:22 +0000 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id CC356857A3; Tue, 22 May 2018 22:30:06 +0000 (UTC) Received: from [127.0.0.1] (ovpn04.gateway.prod.ext.ams2.redhat.com [10.39.146.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 30FB62024CC1; Tue, 22 May 2018 22:30:06 +0000 (UTC) Subject: [pushed] Fix gdb.base/remote.exp with native-extended-gdbserver board (Re: [PATCH 08/10] Handle "show remote memory-write-packet-size" when not connected) To: Sergio Durigan Junior References: <20180516141830.16859-1-palves@redhat.com> <20180516141830.16859-9-palves@redhat.com> <28ff1dac-fa38-6e19-fd0e-b4aed7e1832f@ericsson.com> <871se31i4e.fsf@redhat.com> Cc: Simon Marchi , gdb-patches@sourceware.org From: Pedro Alves Message-ID: Date: Tue, 22 May 2018 23:26:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <871se31i4e.fsf@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2018-05/txt/msg00571.txt.bz2 On 05/22/2018 10:43 PM, Sergio Durigan Junior wrote: > On Monday, May 21 2018, Pedro Alves wrote: > > I'm seeing a few failures on Debian-s390x-native-extended-gdbserver-m64: > ... > show remote memory-write-packet-size > The memory-write-packet-size is 0 (default). Packets are limited to 16383 bytes. > (gdb) FAIL: gdb.base/remote.exp: write-packet default > ... > Ah, I forgot testing with extended-remote. I've pushed in the fix below. Thanks! >From 035522c0228be33b2124ada2f178187e7e53aa6c Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Tue, 22 May 2018 23:26:46 +0100 Subject: [PATCH] Fix gdb.base/remote.exp with native-extended-gdbserver board This fixes gdb.base/remote.exp regressions caused by the previous commit to the testcase, when tested with --target_board=native-extended-gdbserver. For example: ... show remote memory-write-packet-size The memory-write-packet-size is 0 (default). Packets are limited to 16383 bytes. (gdb) FAIL: gdb.base/remote.exp: write-packet default ... With that board, GDB connects to GDBserver at gdb_start time, so GDB is showing the actual remote/gdbserver packet size limits. Fix it using the usual "disconnect" pattern. While at it, there's no need to start GDB before compiling the testcase. gdb/testsuite/ChangeLog: 2018-05-22 Pedro Alves * gdb.base/remote.exp: Only gdb_start after compiling the testcase. Issue "disconnect" before testing "set remote" command defaults. Issue clean_restart before running to main. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.base/remote.exp | 9 +++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 25df82b4e7..24955f6530 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2018-05-22 Pedro Alves + + * gdb.base/remote.exp: Only gdb_start after compiling the + testcase. Issue "disconnect" before testing "set remote" command + defaults. Issue clean_restart before running to main. + 2018-05-22 Pedro Alves * gdb.base/remote.exp: Adjust expected output of "show remote diff --git a/gdb/testsuite/gdb.base/remote.exp b/gdb/testsuite/gdb.base/remote.exp index ba34441af2..edcfac824f 100644 --- a/gdb/testsuite/gdb.base/remote.exp +++ b/gdb/testsuite/gdb.base/remote.exp @@ -21,14 +21,17 @@ if {[target_info gdb_protocol] != "remote" standard_testfile .c -gdb_start - set result [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] if {$result != "" } then { untested "failed to compile" return -1 } +gdb_start + +# Make sure we're disconnected, in case we're testing with an +# extended-remote board, therefore already connected. +gdb_test "disconnect" ".*" # # Part ONE: Check the down load commands @@ -126,6 +129,8 @@ proc gdb_load_timed {executable class writesize} { pass $test } +clean_restart $binfile + # These download tests won't actually download anything on !is_remote # target boards, but we run them anyway because it's simpler, and # harmless. -- 2.14.3