From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11944 invoked by alias); 11 Jun 2008 11:59:28 -0000 Received: (qmail 11932 invoked by uid 22791); 11 Jun 2008 11:59:27 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 11 Jun 2008 11:59:09 +0000 Received: (qmail 16840 invoked from network); 11 Jun 2008 11:59:07 -0000 Received: from unknown (HELO orlando.local) (pedro@127.0.0.2) by mail.codesourcery.com with ESMTPA; 11 Jun 2008 11:59:07 -0000 From: Pedro Alves To: gdb-patches@sourceware.org Subject: mi-break.exp intermitent failure Date: Wed, 11 Jun 2008 13:39:00 -0000 User-Agent: KMail/1.9.9 MIME-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_R47TIKh33mYpV/i" Message-Id: <200806111259.13949.pedro@codesourcery.com> 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: 2008-06/txt/msg00220.txt.bz2 --Boundary-00=_R47TIKh33mYpV/i Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 1810 Hi, I'm getting these intermitent FAILures in mi-break.exp (and a couple more in chain reaction) in sync mode, due to previous pattern considering the gdb prompt optional, hence sometimes consuming the *stopped line, and leaving the (gdb) unconsumed. Running ../../../src/gdb/testsuite/gdb.mi/mi-break.exp ... FAIL: gdb.mi/mi-break.exp: breakpoint at nonexistent function FAIL: gdb.mi/mi-break.exp: create varobj for function call FAIL: gdb.mi/mi-break.exp: update varobj for function call 220-exec-run 220^running (gdb) =thread-created,id="1" *running,thread-id="1" Hello, World!callme *stopped,reason="breakpoint-hit",disp="keep",bkptno="5",thread-id="1",frame={addr="0x08048441",func="callme",args=[{name="i",value="2"}],file="../../../src/gdb/testsuite/gdb.mi/basics.c",fullname="/home/pedro/gdb/nonstop_head/src/gdb/testsuite/gdb.mi/basics.c",line="51"} PASS: gdb.mi/mi-break.exp: run to breakpoint with ignore count -break-insert function_that_does_not_exist (gdb) FAIL: gdb.mi/mi-break.exp: breakpoint at nonexistent function -var-create V * return_1() ^error,msg="Function \"function_that_does_not_exist\" not defined." vs 220-exec-run 220^running (gdb) =thread-created,id="1" *running,thread-id="1" Hello, World!callme *stopped,reason="breakpoint-hit",disp="keep",bkptno="5",thread-id="1",frame={addr="0x08048441",func="callme",args=[{name="i",value="2"}],file="../../../src/gdb/testsuite/gdb.mi/basics.c",fullname="/home/pedro/gdb/nonstop_head/src/gdb/testsuite/gdb.mi/basics.c",line="51"} (gdb) PASS: gdb.mi/mi-break.exp: run to breakpoint with ignore count -break-insert function_that_does_not_exist ^error,msg="Function \"function_that_does_not_exist\" not defined." (gdb) PASS: gdb.mi/mi-break.exp: breakpoint at nonexistent function The attached fixes it for me. -- Pedro Alves --Boundary-00=_R47TIKh33mYpV/i Content-Type: text/x-diff; charset="utf-8"; name="mi-break.exp.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="mi-break.exp.diff" Content-length: 1262 2008-06-11 Pedro Alves * gdb.mi/mi-break.exp (test_ignore_count): Condition expecting the prompt based on async mode. --- gdb/testsuite/gdb.mi/mi-break.exp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) Index: src/gdb/testsuite/gdb.mi/mi-break.exp =================================================================== --- src.orig/gdb/testsuite/gdb.mi/mi-break.exp 2008-06-11 12:27:48.000000000 +0100 +++ src/gdb/testsuite/gdb.mi/mi-break.exp 2008-06-11 12:55:37.000000000 +0100 @@ -151,6 +151,13 @@ proc test_rbreak_creation_and_listing {} proc test_ignore_count {} { global mi_gdb_prompt + global async + + if {$async} { + set prompt_re "" + } else { + set prompt_re "$mi_gdb_prompt" + } mi_gdb_test "-break-insert -i 1 callme" \ "\\^done.*ignore=\"1\".*" \ @@ -159,7 +166,7 @@ proc test_ignore_count {} { mi_run_cmd gdb_expect { - -re ".*\\*stopped.*func=\"callme\".*args=\\\[\{name=\"i\",value=\"2\"\}\\\].*\r\n($mi_gdb_prompt)?$" { + -re ".*\\*stopped.*func=\"callme\".*args=\\\[\{name=\"i\",value=\"2\"\}\\\].*\r\n$prompt_re$" { pass "run to breakpoint with ignore count" } -re ".*$mi_gdb_prompt$" { --Boundary-00=_R47TIKh33mYpV/i--