This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] gdb.threads/*.exp: send_gdb vs. gdb_test
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Michael Snyder <msnyder at vmware dot com>, Joel Brobecker <brobecker at adacore dot com>
- Date: Tue, 1 Jun 2010 23:48:51 +0100
- Subject: Re: [RFA] gdb.threads/*.exp: send_gdb vs. gdb_test
- References: <4BFDBBFB.8030503@vmware.com> <20100601214837.GS3019@adacore.com> <4C058858.1070707@vmware.com>
On Tuesday 01 June 2010 23:23:20, Michael Snyder wrote:
> >> - send_gdb "continue\n"
> >> - gdb_expect {
> >> - -re "Continuing.*common_routine.*at.*$srcfile.*$gdb_prompt $" {}
> >> + gdb_test_multiple "continue" "continue until common routine run 15 times" {
> >> + -re "Continuing.*common_routine.*at.*$srcfile.*$gdb_prompt $" {
> >> + }
> >> default {
> >> fail "continue until common routine run 15 times"
> >> return 0
> >
> > Shouldn't we delete the "default" & "timeout" sections in this case?
>
> I left them in because they do a "return", which wouldn't happen
> if they were removed.
Then, as I explained in other reviews, you should really move the
return statement outside of gdb_test_multiple, because as is, the
"fail"s caught by gdb_test_multiple's internals won't cause a return.
--
Pedro Alves