From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10870 invoked by alias); 21 May 2013 08:10:25 -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 10857 invoked by uid 89); 21 May 2013 08:10:24 -0000 X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Tue, 21 May 2013 08:10:24 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id r4L8AH5R011631 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 21 May 2013 04:10:17 -0400 Received: from host2.jankratochvil.net (ovpn-116-16.ams2.redhat.com [10.36.116.16]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id r4L8A8i5022739 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Tue, 21 May 2013 04:10:11 -0400 Date: Tue, 21 May 2013 08:10:00 -0000 From: Jan Kratochvil To: Hui Zhu Cc: Eli Zaretskii , tromey@redhat.com, palves@redhat.com, hui_zhu@mentor.com, gdb-patches@sourceware.org, marc.khouzam@ericsson.com Subject: [patch] Fix racy FAILs due to "read1" [Re: [PATCH] add -s option to make -break-insert support dprintf] Message-ID: <20130521081007.GA1071@host2.jankratochvil.net> References: <87ehdehnc9.fsf@fleche.redhat.com> <838v3masbd.fsf@gnu.org> <834ne6an8h.fsf@gnu.org> <83bo85wt9u.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2013-05/txt/msg00760.txt.bz2 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? 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$" {