This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
mi-break.exp intermitent failure
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Date: Wed, 11 Jun 2008 12:59:13 +0100
- Subject: mi-break.exp intermitent failure
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
2008-06-11 Pedro Alves <pedro@codesourcery.com>
* 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$" {