* mi-break.exp intermitent failure
@ 2008-06-11 13:39 Pedro Alves
2008-06-11 14:07 ` Vladimir Prus
0 siblings, 1 reply; 3+ messages in thread
From: Pedro Alves @ 2008-06-11 13:39 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 1810 bytes --]
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
[-- Attachment #2: mi-break.exp.diff --]
[-- Type: text/x-diff, Size: 1262 bytes --]
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$" {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mi-break.exp intermitent failure
2008-06-11 13:39 mi-break.exp intermitent failure Pedro Alves
@ 2008-06-11 14:07 ` Vladimir Prus
2008-06-11 17:11 ` Pedro Alves
0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Prus @ 2008-06-11 14:07 UTC (permalink / raw)
To: gdb-patches
[-- Attachment #1: Type: text/plain, Size: 961 bytes --]
Pedro Alves wrote:
> 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
Thanks for reporting; somehow I never run into this.
As I've told on IRC, the test should be using mi_expect_stop; I've no idea
why I did not covert it when I've introduced mi_expect_stop but I've
checked in the following patch. Can you check that no unexpected
failures happen for you now.
Incidentally, mi-async.exp is the only file that has direct checks for *stopped,
but those will die very soon now.
Thanks,
Volodya
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: commit.diff --]
[-- Type: text/x-diff; name="commit.diff", Size: 1674 bytes --]
Index: gdb/testsuite/ChangeLog
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/ChangeLog,v
retrieving revision 1.1661
diff -u -p -r1.1661 ChangeLog
--- gdb/testsuite/ChangeLog 10 Jun 2008 10:23:54 -0000 1.1661
+++ gdb/testsuite/ChangeLog 11 Jun 2008 13:34:48 -0000
@@ -1,5 +1,9 @@
2008-06-10 Vladimir Prus <vladimir@codesourcery.com>
+ * gdb.mi/mi-break.exp (test_ignore_count): Use mi_expect_stop.
+
+2008-06-10 Vladimir Prus <vladimir@codesourcery.com>
+
* gdb.mi/mi-console.exp: Adjust.
* gdb.mi/mi-syn-frame.exp: Adjust.
* gdb.mi/mi2-console.exp: Adjust.
Index: gdb/testsuite/gdb.mi/mi-break.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-break.exp,v
retrieving revision 1.18
diff -u -p -r1.18 mi-break.exp
--- gdb/testsuite/gdb.mi/mi-break.exp 10 Jun 2008 09:35:08 -0000 1.18
+++ gdb/testsuite/gdb.mi/mi-break.exp 11 Jun 2008 13:34:48 -0000
@@ -158,17 +158,8 @@ proc test_ignore_count {} {
mi_run_cmd
- gdb_expect {
- -re ".*\\*stopped.*func=\"callme\".*args=\\\[\{name=\"i\",value=\"2\"\}\\\].*\r\n($mi_gdb_prompt)?$" {
- pass "run to breakpoint with ignore count"
- }
- -re ".*$mi_gdb_prompt$" {
- fail "run to breakpoint with ignore count"
- }
- timeout {
- fail "run to breakpoint with ignore count (timeout)"
- }
- }
+ mi_expect_stop "breakpoint-hit" "callme" "\{name=\"i\",value=\"2\"\}" ".*basics.c" "51" \
+ {"" "disp=\"keep\"" } "run to breakpoint with ignore count"
}
proc test_error {} {
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: mi-break.exp intermitent failure
2008-06-11 14:07 ` Vladimir Prus
@ 2008-06-11 17:11 ` Pedro Alves
0 siblings, 0 replies; 3+ messages in thread
From: Pedro Alves @ 2008-06-11 17:11 UTC (permalink / raw)
To: gdb-patches; +Cc: Vladimir Prus
A Wednesday 11 June 2008 14:38:56, Vladimir Prus wrote:
> As I've told on IRC, the test should be using mi_expect_stop; I've no idea
> why I did not covert it when I've introduced mi_expect_stop but I've
> checked in the following patch. Can you check that no unexpected
> failures happen for you now.
All perfect. Thanks!
--
Pedro Alves
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-06-11 13:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-11 13:39 mi-break.exp intermitent failure Pedro Alves
2008-06-11 14:07 ` Vladimir Prus
2008-06-11 17:11 ` Pedro Alves
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox