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: [RFA] gdb.threads/*.exp: send_gdb vs. gdb_test


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


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