Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Manoj Iyer <manjo@austin.ibm.com>
To: gdb-patches@sources.redhat.com
Subject: Re: [RFC] new GDB server testcase
Date: Thu, 05 May 2005 16:23:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.58.0505051116020.30511@lazy> (raw)
In-Reply-To: <20050504220703.GB4822@nevyn.them.org>


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
>


  reply	other threads:[~2005-05-05 16:23 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-04 14:27 Manoj Iyer
2005-05-04 14:43 ` Daniel Jacobowitz
2005-05-04 18:39   ` Manoj Iyer
2005-05-04 18:46     ` Daniel Jacobowitz
2005-05-04 21:59       ` Manoj Iyer
2005-05-04 22:07         ` Daniel Jacobowitz
2005-05-05 16:23           ` Manoj Iyer [this message]
2005-05-05 16:27             ` Daniel Jacobowitz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0505051116020.30511@lazy \
    --to=manjo@austin.ibm.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox