Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@codesourcery.com>
To: gdb-patches@sourceware.org
Subject: mi-break.exp intermitent failure
Date: Wed, 11 Jun 2008 13:39:00 -0000	[thread overview]
Message-ID: <200806111259.13949.pedro@codesourcery.com> (raw)

[-- 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$" {

             reply	other threads:[~2008-06-11 11:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-11 13:39 Pedro Alves [this message]
2008-06-11 14:07 ` Vladimir Prus
2008-06-11 17:11   ` Pedro Alves

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200806111259.13949.pedro@codesourcery.com \
    --to=pedro@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox