From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19890 invoked by alias); 24 May 2013 07:32: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 19880 invoked by uid 89); 24 May 2013 07:32:58 -0000 X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,KAM_TIME,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL autolearn=no 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; Fri, 24 May 2013 07:32:58 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1UfmUg-0004d7-Lo from Luis_Gustavo@mentor.com ; Fri, 24 May 2013 00:32:54 -0700 Received: from NA1-MAIL.mgc.mentorg.com ([147.34.98.181]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 24 May 2013 00:32:54 -0700 Received: from [172.30.64.161] ([172.30.64.161]) by NA1-MAIL.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 24 May 2013 00:32:53 -0700 Message-ID: <519F17A0.2040607@codesourcery.com> Date: Fri, 24 May 2013 07:32:00 -0000 From: Luis Machado Reply-To: lgustavo@codesourcery.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 MIME-Version: 1.0 To: Edjunior Barbosa Machado CC: gdb-patches@sourceware.org Subject: Re: [PATCH] Fix wp-replication.exp for targets that provide only 1 hw watchpoint References: <1369365909-14746-1-git-send-email-emachado@linux.vnet.ibm.com> In-Reply-To: <1369365909-14746-1-git-send-email-emachado@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2013-05/txt/msg00909.txt.bz2 Hi, On 05/24/2013 05:25 AM, Edjunior Barbosa Machado wrote: > (sorry, my previous message got truncated. Resending...) > > Hi, > > current wp-replication.exp testcase counts 2 hw watchpoints even when the target > provides only 1 hw watch, resulting in several unexpected errors. Successfully > tested on x86 (with 4 hw watchpoints available) and ppc64 server (with 1 hw > watch), this patch intends to fix this issue. Ok? I wonder why it is counting one more watchpoint. Is it not matching the output in the exit block here? gdb_test_multiple "continue" "watchpoint created successfully" { -re ".*Breakpoint 2, empty_cycle \\(\\).*$gdb_prompt $" { incr hwatch_count } -re ".*Could not insert hardware watchpoint.*$gdb_prompt $" { set done 1 break } } > diff --git a/gdb/testsuite/gdb.threads/wp-replication.exp b/gdb/testsuite/gdb.threads/wp-replication.exp > index 8927a43..f73b763 100644 > --- a/gdb/testsuite/gdb.threads/wp-replication.exp > +++ b/gdb/testsuite/gdb.threads/wp-replication.exp > @@ -78,6 +78,10 @@ while { $done == 0 } { > } > } > > + if { $done == 1 } { > + break > + } > + > gdb_test_multiple "continue" "watchpoint created successfully" { > -re ".*Breakpoint 2, empty_cycle \\(\\).*$gdb_prompt $" { > incr hwatch_count > The additional if block seems to accomplish what the upcoming gdb_test_multiple block does. If it is really a matching problem, it seems we can fix it in that block instead of a special-case conditional. Thanks, Luis