From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2894 invoked by alias); 21 May 2013 09:30:26 -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 2883 invoked by uid 89); 21 May 2013 09:30:26 -0000 X-Spam-SWARE-Status: No, score=-3.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,SPF_PASS autolearn=ham version=3.3.1 Received: from mail-ob0-f172.google.com (HELO mail-ob0-f172.google.com) (209.85.214.172) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 21 May 2013 09:29:56 +0000 Received: by mail-ob0-f172.google.com with SMTP id tb18so451387obb.31 for ; Tue, 21 May 2013 02:29:54 -0700 (PDT) X-Received: by 10.182.108.132 with SMTP id hk4mr899812obb.14.1369128594822; Tue, 21 May 2013 02:29:54 -0700 (PDT) MIME-Version: 1.0 Received: by 10.60.38.193 with HTTP; Tue, 21 May 2013 02:29:14 -0700 (PDT) In-Reply-To: <20130521081007.GA1071@host2.jankratochvil.net> References: <87ehdehnc9.fsf@fleche.redhat.com> <838v3masbd.fsf@gnu.org> <834ne6an8h.fsf@gnu.org> <83bo85wt9u.fsf@gnu.org> <20130521081007.GA1071@host2.jankratochvil.net> From: Hui Zhu Date: Tue, 21 May 2013 09:30:00 -0000 Message-ID: Subject: Re: [patch] Fix racy FAILs due to "read1" [Re: [PATCH] add -s option to make -break-insert support dprintf] To: Jan Kratochvil Cc: Eli Zaretskii , tromey@redhat.com, palves@redhat.com, hui_zhu@mentor.com, gdb-patches@sourceware.org, marc.khouzam@ericsson.com Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-05/txt/msg00764.txt.bz2 On Tue, May 21, 2013 at 4:10 PM, Jan Kratochvil wrote: > On Tue, 21 May 2013 06:24:16 +0200, Hui Zhu wrote: >> Checked in http://sourceware.org/ml/gdb-cvs/2013-05/msg00193.html > > It has random FAILs during normal run: > > +PASS: gdb.mi/mi-dprintf.exp: fprintf: mi 1st dprintf > +FAIL: gdb.mi/mi-dprintf.exp: fprintf: mi 1st dprintf stop (timeout) > +PASS: gdb.mi/mi-dprintf.exp: fprintf: mi 2nd dprintf > > and when I tested it with: > reproducer for races of expect incomplete reads > http://sourceware.org/bugzilla/show_bug.cgi?id=12649 > > it FAILs reproducibly, could you review the proposed fix? This patch fixed the issue in my part. Thanks, Hui > > > Thanks, > Jan > > > gdb/testsuite/ > 2013-05-21 Jan Kratochvil > > PR testsuite/12649 > * gdb.mi/mi-dprintf.exp (mi_continue_dprintf): Fix expect strings for > racy matches. > > diff --git a/gdb/testsuite/gdb.mi/mi-dprintf.exp b/gdb/testsuite/gdb.mi/mi-dprintf.exp > index 457f332..ea8b3a8 100644 > --- a/gdb/testsuite/gdb.mi/mi-dprintf.exp > +++ b/gdb/testsuite/gdb.mi/mi-dprintf.exp > @@ -68,7 +68,7 @@ proc mi_continue_dprintf {args} { > mi_run_cmd > set msg "mi 1st dprintf" > gdb_expect { > - -re ".*At foo entry.*arg=1234, g=1234.*" { > + -re ".*At foo entry.*arg=1234, g=1234" { > pass $msg > } > -re ".*$mi_gdb_prompt$" { > @@ -83,7 +83,7 @@ proc mi_continue_dprintf {args} { > set msg "mi 2nd dprintf" > mi_send_resuming_command "exec-continue" "$msg continue" > gdb_expect { > - -re ".*At foo entry.*arg=1235, g=2222.*" { > + -re ".*At foo entry.*arg=1235, g=2222.*$mi_gdb_prompt$" { > pass $msg > } > -re ".*$mi_gdb_prompt$" {