This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [RFA]: minor change to gdb_test dejagnu proc


Well, I guess we can treat any test that actually wants the test program
to terminate as a special case.

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]