[rfa] gdb.base/volatile.exp / varargs.exp: replace send_gdb with gdb_test
Pedro Alves
pedro@codesourcery.com
Thu May 20 16:31:00 GMT 2010
On Thursday 20 May 2010 16:50:10, Joel Brobecker wrote:
> > +gdb_test "set print sevenbit-strings" ""
> > +gdb_test "set print address off" ""
> > +gdb_test "set width 0" ""
>
> You actually don't need to specify the second argument if it's empty,
> but I think it's good practice to do so, just to show that we do indeed
> expect the command to produce no output. The fact that we cannot
> currently verify that is a bit unfortunate, but at least the above
> expresses it at the testsuite level...
>
You can anchor the output with gdb_test_multiple. This, for example,
checks that a command produces no output other than the prompt:
set cmd "..."
set msg "..."
set cmd_regex [string_to_regexp $cmd]
gdb_test_multiple $cmd $msg {
-re "^$cmd_regex\r\n$gdb_prompt $" {
pass $msg
}
}
something like this is used in several places in the
testsuite. we could perhaps add a wrapper in gdb.exp.
--
Pedro Alves
More information about the Gdb-patches
mailing list