This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] gdb.mi/mi-basics.exp: fix racy tests (PR testsuite/12649)
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Marek Polacek <mpolacek at redhat dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Wed, 11 May 2011 20:40:53 +0200
- Subject: Re: [PATCH] gdb.mi/mi-basics.exp: fix racy tests (PR testsuite/12649)
- References: <4DC42016.5060801@redhat.com>
Hi Marek,
On Fri, 06 May 2011 18:21:42 +0200, Marek Polacek wrote:
> Next, in `test_path_specification' I've only replaced `gdb_test_multiple' with
> `send_gdb'+`gdb_expect'. I cannot use `mi_gdb_test' here because with this the
> `$expect_out(1,string);' didn't work (unknown variable).
It works with:
global expect_out
mi_gdb_test "-environment-path" "\\\^done,path=\"(.*)\"" "environment-path"
set orig_path $expect_out(3,string)
If not clear the index 1 and 2 is used by mi_gdb_test 2 indexes:
-re "^($string_regex\[\r\n\]+)?($pattern\[\r\n\]+$mi_gdb_prompt\[ \]*)" {
> 2011-05-06 Marek Polacek <mpolacek@redhat.com>
>
> * gdb.mi/mi-basics.exp: Fix races. Honour the
> `test_exec_and_symbol_mi_operatons' return value.
> (test_mi_interpreter_selection): Use mi_gdb_test instead of
> gdb_test_multiple.
> (test_exec_and_symbol_mi_operatons): Likewise.
> (test_path_specification): Use send_gdb+gdb_expect instead of
> gdb_test_multiple.
OK with that change, sorry for the delay.
Thanks,
Jan