[RFC] gdb.cp/static-print-quit.exp: fix racy tests (PR testsuite/12649)

Marek Polacek mpolacek@redhat.com
Fri May 6 08:58:00 GMT 2011


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	



More information about the Gdb-patches mailing list