Need help adding a test in commands.exp
Joel Brobecker
brobecker@gnat.com
Wed Jul 31 12:10:00 GMT 2002
> The particular problem here is:
>
> > + send_gdb "run 1\n"
> > + gdb_expect {
> > + -re ".*factorial command-list executed.*1.*Program exited normally.*" {
> > + pass "run factorial until breakpoint"
> > + }
> > + -re "" { fail "run factorial until breakpoint (no output)" }
> > + timeout { fail "(timeout) run factorial until breakpoint" }
> > + }
>
> "" matches immediately, before the output has been produced. You
> should explicitly match $gdb_prompt (which requires declaring it
> global).
>
> There's some other problems here; you can't just send a "run" in the
> testsuite, and you can't require that the program accept arguments.
> Look for gdb_continue (I think) and a flag in the board description
> which describes whether argument passing works.
In case other dejagnu/expect newbies hit the problem:
Daniel's comment regarding ``send_gdb "run 1\n"'' was very pertinent.
I changed this line into ``gdb_run_cmd'' and that fixed the last FAIL.
Thanks again Daniel.
I shall create a PR and send a patch shortly.
--
Joel
More information about the Gdb-patches
mailing list