Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Fernando Nasser <fnasser@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>
Cc: Andrew Cagney <ac131313@cygnus.com>,
	fnasser@cygnus.com, gdb-patches@sources.redhat.com
Subject: Re: [rfa/testsuite/mi] Recognize a few incorrect outputs
Date: Mon, 01 Oct 2001 07:28:00 -0000	[thread overview]
Message-ID: <3BB87C49.667FB858@redhat.com> (raw)
In-Reply-To: <20010928185435.A24623@nevyn.them.org>

The patch is fine.

Just to answer your previous question regarding Andrew's suggestion:

The text that identify the tests must be the same on both fail and pass.
However, a <reason> for the fail is allowed between parenthesis at the
end of ther string.  The test comparison scripts are supposed to ignore
that part for test identification purposes.

The most used example of the aboce is the string "(timeout)".

Thanks for the patch. And thanks Andrew for the help with this one.

Regards,
Fernando


Daniel Jacobowitz wrote:
> 
> On Fri, Sep 28, 2001 at 04:34:03PM -0400, Andrew Cagney wrote:
> > > <gripe>
> > > A lot of GDB tests seem to be written with only pass and timeout
> > > alternatives, or only with overly-specialized fails.  The hypocrite-alert
> > > readers of this message will note that I'm guilty of the same thing; this is
> > > Just Enough to make them catch a few errors I could think of, not enough to
> > > recognize completely wrong output.  Someday, someone more motivated than I
> > > should clean this up.
> > > </gripe>
> >
> > For the MI, this is a pretty obvious fix.  I've been doing the same
> > thing my self (when I noticed it).  One suggestion, can you make that
> > fail expression less strict so that it picks.  Something like:
> >
> >       <correct-output> (gdb) <more-output> (gdb)
> >               pass
> >
> >       .* (gdb) .* (gdb)
> >               fail
> >
> >       timeout
> >               fail
> >
> > alternatively (hmm, better?), keep the expression as you have it but add
> > a comment in paren vis:
> >
> >       fail "continue to incr_a (compiler bug info is wrong)"
> 
> Is this about what you had in mind?
> 
> --
> Daniel Jacobowitz                           Carnegie Mellon University
> MontaVista Software                         Debian GNU/Linux Developer
> 
> 2001-09-28  Daniel Jacobowitz  <drow@mvista.com>
> 
>         * gdb.mi/mi-var-display.exp (continue to incr_a):  Recognize
>         some incorrect output instead of timing out.
>         * gdb.mi/mi-var-display.exp (continue to incr_a):  Likewise.
> 
> Index: gdb.mi/mi-var-display.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-var-display.exp,v
> retrieving revision 1.5
> diff -u -r1.5 mi-var-display.exp
> --- mi-var-display.exp  2001/08/19 01:23:43     1.5
> +++ mi-var-display.exp  2001/09/28 22:52:37
> @@ -591,6 +591,12 @@
>      -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"2\.*\"\}\\\],file=\".*var-cmd.c\",line=\"85\"\}\r\n$mi_gdb_prompt$" {
>         pass "continue to incr_a"
>      }
> +    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\\\[\{name=\"a\",value=\"\.*\"\}\\\],file=\".*var-cmd.c\",line=\"8\[345\]\"\}\r\n$mi_gdb_prompt$" {
> +       fail "continue to incr_a (compiler debug info incorrect)"
> +    }
> +    -re "\\^running\r\n${mi_gdb_prompt}.*\r\n$mi_gdb_prompt$" {
> +       fail "continue to incr_a (unknown output)"
> +    }
>      timeout {
>         fail "continue to incr_a (timeout)"
>      }
> Index: gdb.mi/mi0-var-display.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi0-var-display.exp,v
> retrieving revision 1.4
> diff -u -r1.4 mi0-var-display.exp
> --- mi0-var-display.exp 2001/08/19 01:23:43     1.4
> +++ mi0-var-display.exp 2001/09/28 22:52:37
> @@ -591,6 +591,12 @@
>      -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\{\{name=\"a\",value=\"2\.*\"\}\},file=\".*var-cmd.c\",line=\"85\"\}\r\n$mi_gdb_prompt$" {
>         pass "continue to incr_a"
>      }
> +    -re "\\^running\r\n${mi_gdb_prompt}\\*stopped,reason=\"breakpoint-hit\",bkptno=\"3\",thread-id=\"\[01\]\",frame=\{addr=\"$hex\",func=\"incr_a\",args=\{\{name=\"a\",value=\".*\"\}\},file=\".*var-cmd.c\",line=\"8\[345\]\"\}\r\n$mi_gdb_prompt$" {
> +       fail "continue to incr_a (compiler debug info incorrect)"
> +    }
> +    -re "\\^running\r\n${mi_gdb_prompt}.*\r\n$mi_gdb_prompt$" {
> +       fail "continue to incr_a (unknown output)"
> +    }
>      timeout {
>         fail "continue to incr_a (timeout)"
>      }

-- 
Fernando Nasser
Red Hat Canada Ltd.                     E-Mail:  fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario   M4P 2C9


  parent reply	other threads:[~2001-10-01  7:28 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-28 12:15 Daniel Jacobowitz
     [not found] ` <3BB4DEBB.1020906@cygnus.com>
2001-09-28 13:38   ` Daniel Jacobowitz
2001-09-28 15:54   ` Daniel Jacobowitz
2001-09-28 16:29     ` Andrew Cagney
2001-10-01  7:28     ` Fernando Nasser [this message]
2001-10-01 13:30       ` 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=3BB87C49.667FB858@redhat.com \
    --to=fnasser@redhat.com \
    --cc=ac131313@cygnus.com \
    --cc=drow@mvista.com \
    --cc=fnasser@cygnus.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