This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFC] gdb.cp/static-print-quit.exp: fix racy tests (PR testsuite/12649)
- From: Marek Polacek <mpolacek at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Fri, 06 May 2011 10:58:21 +0200
- Subject: Re: [RFC] gdb.cp/static-print-quit.exp: fix racy tests (PR testsuite/12649)
- References: <20110506021511.GA30222@host1.jankratochvil.net>
On 05/06/2011 04:15 AM, Jan Kratochvil wrote:
> exp_continue/variables make it complicated, I would prefer splitting it to
> multiple consecutive test cases.
Yep, splitting the case was apparently the right thing to do. What a shame
that this didn't occurred to me before. Thanks.
> BTW you do not need to match exactly "<return>" as is in lib/gdb.exp - it is
> enough to match any string ending with "<return>".
OK, I wish I knew this before :-).
> FYI the diff could not be applied as it has <tab>s converted to spaces.
Right, sorry.
> Any comments? I will check it in otherwise.
I tested your patch and all seems fine. Maybe just, I think here:
> +set test "print c - q <return>"
> +gdb_test_multiple "" $test {
> + -re " to continue, or q <return>" {
and here:
> +set test "print c - to quit"
> +gdb_test_multiple "" $test {
> -re " to quit---$" {
the `-re' are in fact not needed since we don't use any regexps in the
string. However, they certainly do no harm so no need to remove them.
Thanks again, Jan.
Marek