From: Marek Polacek <mpolacek@redhat.com>
To: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [RFC] gdb.cp/static-print-quit.exp: fix racy tests (PR testsuite/12649)
Date: Thu, 05 May 2011 18:12:00 -0000 [thread overview]
Message-ID: <4DC2E877.6080808@redhat.com> (raw)
In-Reply-To: <4DC2E674.1060608@redhat.com>
I should have add a diff as well, here it is:
diff --git a/gdb/testsuite/gdb.cp/static-print-quit.exp b/gdb/testsuite/gdb.cp/static-print-quit.exp
index b6e34aa..4bede4e 100644
--- a/gdb/testsuite/gdb.cp/static-print-quit.exp
+++ b/gdb/testsuite/gdb.cp/static-print-quit.exp
@@ -31,13 +31,27 @@ gdb_test_no_output "set width 80"
gdb_test_no_output "set height 2"
set test "print c"
+set seen_return 0
gdb_test_multiple $test $test {
- -re " = \{loooooooooooooooooooooooooooooooooooooooooooooong = 0, static field = \{\r\n---Type <return> to continue, or q <return> to quit---$" {
- pass $test
+ "<return>" {
+ incr seen_return
+ exp_continue
+ }
+ -re "\\$\[0-9\]+ = \{loooooooooooooooooooooooooooooooooooooooooooooong = 0, static field = \{\r\n---Type " {
+ incr seen_return
+ exp_continue
+ }
+ -re " to continue, or q " {
+ incr seen_return
+ exp_continue
}
-re " to quit---$" {
- fail $test
- return -1
+ if { $seen_return >= 2 } {
+ pass $test
+ } else {
+ fail $test
+ return -1
+ }
}
}
next prev parent reply other threads:[~2011-05-05 18:12 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-05 18:03 Marek Polacek
2011-05-05 18:12 ` Marek Polacek [this message]
2011-05-06 2:15 ` Jan Kratochvil
2011-05-06 8:58 ` Marek Polacek
2011-05-06 11:09 ` Pierre Muller
2011-05-06 11:15 ` Marek Polacek
2011-05-06 13:41 ` Jan Kratochvil
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=4DC2E877.6080808@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