Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Marek Polacek <mpolacek@redhat.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: [PATCH] gdb.mi/mi2-console.exp: fix racy test (PR testsuite/12649)
Date: Wed, 22 Jun 2011 11:26:00 -0000	[thread overview]
Message-ID: <4E01D159.1030602@redhat.com> (raw)

Use mi_gdb_test in place of gdb_test_multiple.  Note, that I had to 
add "()?" around the first \r\n.  The reason is that mi_gdb_test
appends \r\n itself, but the "*running,thread-id=all" part is not mandatory.

Tested with both read{,1}.  OK to apply?

2011-06-22  Marek Polacek  <mpolacek@redhat.com>

        * gdb.mi/mi2-console.exp: Replace gdb_test_multiple with mi_gdb_test.

--- gdb/gdb/testsuite/gdb.mi/mi2-console.exp.mp 2011-06-22 12:58:23.697574353 +0200
+++ gdb/gdb/testsuite/gdb.mi/mi2-console.exp    2011-06-22 13:16:48.577665717 +0200
@@ -48,11 +48,8 @@ if  { [gdb_compile "${srcdir}/${subdir}/
 mi_run_to_main
 
 # Next over the hello() call which will produce lots of output
-gdb_test_multiple "220-exec-next" "Started step over hello" {
-    -re "220\\^running\r\n(\\*running,thread-id=\"all\"\r\n)?$mi_gdb_prompt" {
-       pass "Started step over hello"
-    }
-}
+mi_gdb_test "220-exec-next" "220\\^running(\r\n)?(\\*running,thread-id=\"all\")?" \
+       "Started step over hello"
 
 if { ![target_info exists gdb,noinferiorio] } { 
     gdb_expect {
 


             reply	other threads:[~2011-06-22 11:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-22 11:26 Marek Polacek [this message]
2011-06-22 19:39 ` Tom Tromey
2011-06-23  9:41   ` Marek Polacek

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=4E01D159.1030602@redhat.com \
    --to=mpolacek@redhat.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