From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11200 invoked by alias); 14 Oct 2015 15:37:59 -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 11177 invoked by uid 89); 14 Oct 2015 15:37:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 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, 14 Oct 2015 15:37:58 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 38CF1C0BFD2F for ; Wed, 14 Oct 2015 15:28:17 +0000 (UTC) Received: from brno.lan (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9EFS6Di016846 for ; Wed, 14 Oct 2015 11:28:16 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 09/18] Make dprintf-non-stop.exp cope with remote testing Date: Wed, 14 Oct 2015 15:37:00 -0000 Message-Id: <1444836486-25679-10-git-send-email-palves@redhat.com> In-Reply-To: <1444836486-25679-1-git-send-email-palves@redhat.com> References: <1444836486-25679-1-git-send-email-palves@redhat.com> X-SW-Source: 2015-10/txt/msg00229.txt.bz2 Testing with the extended-remote board with "maint set target-non-stop on" shows a dprintf-non-stop.exp regression. The issue is simply that the test is expecting output that is only valid for the native target: native: [process 8676] #1 stopped. remote: [Thread 8900.8900] #1 stopped. In order to expose this without "maint set target-non-stop on", this restarts gdb with non-stop mode already enabled. gdb/testsuite/ChangeLog: 2015-10-14 Pedro Alves * gdb.base/dprintf-non-stop.exp: Use build_executable instead of prepare_for_testing. Start gdb with "set non-stop on" appended to GDBFLAGS. Lax expected stop output. --- gdb/testsuite/gdb.base/dprintf-non-stop.exp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.base/dprintf-non-stop.exp b/gdb/testsuite/gdb.base/dprintf-non-stop.exp index 4e3e5bc..5b878aa 100644 --- a/gdb/testsuite/gdb.base/dprintf-non-stop.exp +++ b/gdb/testsuite/gdb.base/dprintf-non-stop.exp @@ -20,13 +20,17 @@ if [is_remote target] then { } standard_testfile +set executable ${testfile} -if [prepare_for_testing "failed to prepare for dprintf with non-stop" \ +if [build_executable "failed to prepare for dprintf with non-stop" \ ${testfile} ${srcfile} {debug}] { return -1 } -gdb_test_no_output "set non-stop on" +save_vars { GDBFLAGS } { + append GDBFLAGS " -ex \"set non-stop on\"" + clean_restart ${executable} +} if ![runto main] { fail "Can't run to main" @@ -60,7 +64,7 @@ gdb_test_multiple $test $test { set test "inferior stopped" gdb_test_multiple "" $test { - -re "\r\n\\\[.* \[0-9\]+\\\] #1 stopped\\\.\r\n" { + -re "\r\n\\\[.*\\\] #1 stopped\\\.\r\n" { pass $test } } -- 1.9.3