From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30052 invoked by alias); 23 May 2013 14:03:46 -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 30042 invoked by uid 89); 23 May 2013 14:03:46 -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; Thu, 23 May 2013 14:03:45 +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 r4NE3cZY013698 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 23 May 2013 10:03:38 -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 r4NE3WBD020820 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 23 May 2013 10:03:35 -0400 Date: Thu, 23 May 2013 14:03: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 #2 due to "read1" [Re: [PATCH] add -s option to make -break-insert support dprintf] Message-ID: <20130523140332.GA11729@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/msg00875.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 I got another racy FAIL today: FAIL: gdb.mi/mi-dprintf.exp: mi info dprintf second time I found I forgot to run the "read1" reproducer with gdbserver yesterday, which revealed more races. I will check it in today. Regards, Jan gdb/testsuite/ 2013-05-23 Jan Kratochvil PR testsuite/12649 * gdb.mi/mi-dprintf.exp (mi_continue_dprintf) (mi 2nd dprintf): Replace $mi_gdb_prompt expectation by mi_expect_stop. (mi 1st dprintf, agent, mi 2nd dprintf, agent) (mi info dprintf second time): Replace them by mi_send_resuming_command and mi_expect_stop. diff --git a/gdb/testsuite/gdb.mi/mi-dprintf.exp b/gdb/testsuite/gdb.mi/mi-dprintf.exp index ea8b3a8..3509963 100644 --- a/gdb/testsuite/gdb.mi/mi-dprintf.exp +++ b/gdb/testsuite/gdb.mi/mi-dprintf.exp @@ -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.*$mi_gdb_prompt$" { + -re ".*At foo entry.*arg=1235, g=2222" { pass $msg } -re ".*$mi_gdb_prompt$" { @@ -93,6 +93,7 @@ proc mi_continue_dprintf {args} { fail $msg } } + mi_expect_stop ".*" ".*" ".*" ".*" ".*" "" "$msg 2nd stop" } } @@ -135,11 +136,28 @@ gdb_expect { if $target_can_dprintf { mi_run_cmd - mi_gdb_test "continue" ".*breakpoint-hit.*func=\"foo\".*" "mi 1st dprintf, agent" + mi_expect_stop ".*" ".*" ".*" ".*" ".*" "" "mi expect stop" - mi_gdb_test "continue" ".*breakpoint-hit.*func=\"foo\".*" "mi 2nd dprintf, agent" + mi_send_resuming_command "exec-continue" "mi 1st dprintf continue, agent" + mi_expect_stop ".*" "foo" ".*" ".*" ".*" "" "mi 1st dprintf, agent" - mi_gdb_test "6-break-info" ".*modified.*" "mi info dprintf second time" + mi_send_resuming_command "exec-continue" "mi 2nd dprintf continue, agent" + + # The =breakpoint-modified text is a part of the "-exec-continue" output. + set msg "mi info dprintf second time" + gdb_expect { + -re "=breakpoint-modified," { + pass $msg + } + -re ".*$mi_gdb_prompt$" { + fail "$msg" + } + timeout { + fail "$msg" + } + } + + mi_expect_stop ".*" "foo" ".*" ".*" ".*" "" "mi 2nd dprintf, agent" } mi_gdb_test "set dprintf-style foobar" ".*error.*" "mi set dprintf style to an unrecognized type"