From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15902 invoked by alias); 28 May 2013 03:36:14 -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 15865 invoked by uid 89); 28 May 2013 03:36:07 -0000 X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=ham version=3.3.1 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 28 May 2013 03:36:06 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1UhAhf-00067z-Je from Yao_Qi@mentor.com ; Mon, 27 May 2013 20:36:03 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Mon, 27 May 2013 20:36:03 -0700 Received: from qiyao.dyndns.org (147.34.91.1) by svr-orw-fem-04.mgc.mentorg.com (147.34.97.41) with Microsoft SMTP Server id 14.2.247.3; Mon, 27 May 2013 20:36:02 -0700 Message-ID: <51A4263B.1060707@codesourcery.com> Date: Tue, 28 May 2013 03:36:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130110 Thunderbird/17.0.2 MIME-Version: 1.0 To: Hui Zhu CC: Pedro Alves , Tom Tromey , , Keith Seitz Subject: Re: [RFC] PR 15075 dprintf interferes with "next" References: <1361192891-29341-1-git-send-email-yao@codesourcery.com> <8738wpd3qe.fsf@fleche.redhat.com> <5176C14B.6010603@redhat.com> <51774714.9060306@codesourcery.com> <51969A92.80003@redhat.com> <519CBE2B.7060007@redhat.com> In-Reply-To: Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-SW-Source: 2013-05/txt/msg00960.txt.bz2 On 05/28/2013 08:01 AM, Hui Zhu wrote: >>> +gdb_test_multiple $test $test { >>> >>+ -re "interrupt\r\n$gdb_prompt " { >>> >>+ pass $test >>> >>+ } >>> >>+} >>> >>+ >>> >>+set test "inferior stopped" >>> >>+gdb_test_multiple "" $test { >>> >>+ -re "\r\n\\\[.* \[0-9\]+\\\] #1 stopped\\\.\r\n" { >>> >>+ pass $test >>> >>+ } >>> >>+} >> > >> >This leaves the prompt in the expect buffer. I think >> >this is likely to confuse the following test that runs. >> > > After change this part to: > gdb_test_multiple "" $test { > -re "\r\n\\\[.* \[0-9\]+\\\] #1 stopped\\\.\r\n$gdb_prompt" { > pass $test > } > } > I got: > Running ../../../src/gdb/testsuite/gdb.base/dprintf-non-stop.exp ... > FAIL: gdb.base/dprintf-non-stop.exp: inferior stopped (timeout) > because the gdb_prompt has been consumed by the previous matching: gdb_test_multiple $test $test { -re "interrupt\r\n$gdb_prompt " { ^^^^^^^^^^^^ pass $test } } > +set test "interrupt" > +gdb_test_multiple $test $test { > + -re "interrupt\r\n$gdb_prompt " { > + pass $test > + } > +} > + > +set test "inferior stopped" > +gdb_test_multiple "" $test { > + -re "\r\n\\\[.* \[0-9\]+\\\] #1 stopped\\\.\r\n" { > + pass $test > + } > +} I raise a question here that no one asked before, why don't combine these two gdb_test_multiple into one? like: set test "interrupt inferior" gdb_test_multiple "interrupt" $test { -re "interrupt\r\n.*\\\[.* \[0-9\]+\\\] #1 stopped\\\." { pass $test } } -- Yao (齐尧)