This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA]: minor change to gdb_test dejagnu proc
- To: Fernando Nasser <fnasser at cygnus dot com>
- Subject: Re: [RFA]: minor change to gdb_test dejagnu proc
- From: Michael Snyder <msnyder at redhat dot com>
- Date: Wed, 18 Oct 2000 12:23:29 -0700
- CC: Michael Snyder <msnyder at cygnus dot com>, fnasser at redhat dot com, gdb-patches at sourceware dot cygnus dot com
- Organization: Red Hat, Inc.
- References: <200010172202.PAA16765@cleaver.cygnus.com> <39EDF632.93668B2C@cygnus.com>
Fernando Nasser wrote:
>
> Well, I guess we can treat any test that actually wants the test program
> to terminate as a special case.
Again, this will NOT issue a fail in such a case.
It will only issue a fail if it would have issued
a fail without this change.
>
> Please go ahead.
>
> Fernando
>
> Michael Snyder wrote:
> >
> > Fernando,
> >
> > This is the change that you commented on earlier. It does NOT
> > cause any new tests to fail -- it only adds more info about
> > WHY the test failed. I happened to notice that gdb_test would
> > do this if a test failed due to ABNORMAL termination -- and
> > I thought it would be helpful if it also identified failures
> > due to NORMAL termination.
> >
> > 2000-10-17 Michael Snyder <msnyder@cleaver.cygnus.com>
> >
> > * lib/gdb.exp (gdb_test): Add case to identify failures due to
> > "program exited normally". No new fails -- just more info.
> >
> > Index: lib/gdb.exp
> > ===================================================================
> > RCS file: /cvs/cvsfiles/devo/gdb/testsuite/lib/gdb.exp,v
> > retrieving revision 1.157
> > diff -c -3 -p -r1.157 gdb.exp
> > *** gdb.exp 2000/10/17 19:37:37 1.157
> > --- gdb.exp 2000/10/17 21:59:32
> > *************** proc gdb_test { args } {
> > *** 502,507 ****
> > --- 502,516 ----
> > fail "$errmsg"
> > return -1
> > }
> > + -re "Program exited normally.*$gdb_prompt $" {
> > + if ![string match "" $message] then {
> > + set errmsg "$message: the program exited normally"
> > + } else {
> > + set errmsg "$command: the program exited normally"
> > + }
> > + fail "$errmsg"
> > + return -1
> > + }
> > -re "The program is not being run.*$gdb_prompt $" {
> > if ![string match "" $message] then {
> > set errmsg "$message: the program is no longer running"
>
> --
> Fernando Nasser
> Red Hat Canada Ltd. E-Mail: fnasser@cygnus.com
> 2323 Yonge Street, Suite #300
> Toronto, Ontario M4P 2C9