This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] gdb.mi/mi-basics.exp: fix racy tests (PR testsuite/12649)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]