Re: [RFC] new GDB server testcase

Manoj Iyer
2005-05-05T16:23:26Z

When I have an output in a test as this:

(gdb)
step
function4 () at gdb.server/server.c:24
24 int x = 1;
(gdb)

What should I test for in the gdb_test command?

gdb_test "step" "function4 \(\) at .*$srcfile:\[0-9\]+."

or

gdb_test "step" ".*.\[0-9\].*int x \= 1\;

Its not working for me in either case currently, unless I use a ".*" at
the end, which I am trying to avoid (as per daniel's suggestion).

-----
manjo
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Cogito ergo sum +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

On Wed, 4 May 2005, Daniel Jacobowitz wrote:

> On Wed, May 04, 2005 at 04:57:02PM -0500, Manoj Iyer wrote:
> > Daniel,
> >
> >
> > > > +gdb_test "step" "function4.*at .*$srcfile:\[0-9\]+.*"
> > > > +
> > > > +gdb_test "step 3" ".*${decimal}.*y = x.* y;.*"
> > >
> > > That's a lot of wildcards. Can't you put a marker comment on the lines
> > > you want to reach?
> > >
> >
> > I want to test vanilla step and step with value separately, this is why I
> > did what I did. Also, I referred some of the existing testcases and
> > followed the style of doing things there. Anyways here is the patch with
> > most of the mods.
>
> ".*${decimal}.*y = x.* y;.*" is line noise. I would prefer something like:
>
> gdb_test "step 3" "/\* marker for second step \*/\[\r\n\]+"
>
> A trailing .* is to be avoided when possible; it means that warnings or
> error messages could appear after the step and still pass. They can
> already appear before the step, which is an unfortunate problem with
> the way GDB's tests are written.
>
> >
> > 2005-05-05 Manoj Iyer <manjo@austin.ibm.com>
> >
> > * gdb.server/server-run.exp: Added new testcases
> > * gdb.server/server.c: Added nested function call for backtrace
> > testing.
> >
> > Common subdirectories: ./new/src/gdb/testsuite/gdb.server/CVS and ./old/src/gdb/testsuite/gdb.server/CVS
> > diff ./new/src/gdb/testsuite/gdb.server/server-run.exp ./old/src/gdb/testsuite/gdb.server/server-run.exp
> > 41d40
> > < # test setting a breakpoint
> > 43,65c42
> > <
>
> Bad diff, please do read diffs before you mail them.
>
>
> --
> Daniel Jacobowitz
> CodeSourcery, LLC
>