From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18584 invoked by alias); 7 Oct 2012 12:16:38 -0000 Received: (qmail 18574 invoked by uid 22791); 7 Oct 2012 12:16:37 -0000 X-SWARE-Spam-Status: No, hits=-4.5 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 07 Oct 2012 12:16:32 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1TKpmY-0003FU-DS from Yao_Qi@mentor.com ; Sun, 07 Oct 2012 05:16:30 -0700 Received: from SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Sun, 7 Oct 2012 05:16:30 -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.1.289.1; Sun, 7 Oct 2012 05:16:29 -0700 Message-ID: <50717295.20802@codesourcery.com> Date: Sun, 07 Oct 2012 12:16:00 -0000 From: Yao Qi User-Agent: Mozilla/5.0 (X11; Linux i686; rv:15.0) Gecko/20120911 Thunderbird/15.0.1 MIME-Version: 1.0 To: Jan Kratochvil CC: Subject: Re: New gdb.mi/mi-breakpoint-changed.exp racy results [Re: [PATCH] Test case on breakpoint-related notifications] References: <1348552864-30499-1-git-send-email-yao@codesourcery.com> <20120930090736.GA25208@host2.jankratochvil.net> In-Reply-To: <20120930090736.GA25208@host2.jankratochvil.net> Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2012-10/txt/msg00118.txt.bz2 On 09/30/2012 05:07 PM, Jan Kratochvil wrote: > I do not have it reproducible, even PR 12649 'read1' does not work for it. > It looks like: > > =library-loaded,id="/lib/libc.so.6",target-name="/lib/libc.so.6",host-name="/lib/libc.so.6",symbols-loaded="0",thread-group="i1"^M > -=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xf7fd8502",func="pendfunc1",file="gdb/testsuite/gdb.mi/pendshr1.c",fullname="/unsafegdb/testsuite/gdb.mi/pendshr1.c",line="21",times="0",original-location="pendfunc1"}PASS: gdb.mi/mi-breakpoint-changed.exp: pending resolved: breakpoint on pendfunc1 resolved > -^M > +=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xf7fd8502",func="pendfunc1",file="gdb/testsuite/gdb.mi/pendshr1.c",fullname="/unsafegdb/testsuite/gdb.mi/pendshr1.c",line="21",times="0",original-location="pendfunc1"}^M > =breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xf7fd8502",func="pendfunc1",file="gdb/testsuite/gdb.mi/pendshr1.c",fullname="/unsafegdb/testsuite/gdb.mi/pendshr1.c",line="21",times="1",original-location="pendfunc1"}^M I can't reproduce it either on my system. However, it looks like fail is caused by some trail ".*" in patterns, because trail ".*" is ambiguous on how many characters will be matched. The patch below should fix the fail. -- Yao gdb/testsuite: 2012-10-07 Yao Qi * gdb.mi/mi-breakpoint-changed.exp (test_pending_resolved): Remove trail '.*' on matching patterns. --- gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp b/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp index c3abd74..773f588 100644 --- a/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp +++ b/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp @@ -163,11 +163,11 @@ proc test_pending_resolved { } { with_test_prefix "pending resolved" { set test "breakpoint on pendfunc1 resolved" gdb_expect { - -re ".*=breakpoint-modified,bkpt=\{number=\"1\".*addr=\"${hex}\".*,times=\"0\".*" { + -re ".*=breakpoint-modified,bkpt=\{number=\"1\".*addr=\"${hex}\".*,times=\"0\"" { pass $test exp_continue } - -re ".*=breakpoint-modified,bkpt=\{number=\"1\".*addr=\"${hex}\".*,times=\"1\".*" { + -re ".*=breakpoint-modified,bkpt=\{number=\"1\".*addr=\"${hex}\".*,times=\"1\"" { pass "$test: hit_count is updated" } -re ".*${mi_gdb_prompt}$" { @@ -219,7 +219,7 @@ proc test_pending_resolved { } { with_test_prefix "pending resolved" { mi_send_resuming_command "exec-continue" "continuing to exit" set test "breakpoint on pendfunc3 pending again" gdb_expect { - -re ".*=breakpoint-modified,bkpt=\{number=\"3\".*addr=\"\".*" { + -re ".*=breakpoint-modified,bkpt=\{number=\"3\".*addr=\"\"" { pass $test } -re ".*${mi_gdb_prompt}$" { -- 1.7.7.6