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]
Other format: [Raw text]

Re: [RFA] Fix testsuite gdb.base/bang.exp to work with remote targets


On Mon, Feb 02, 2004 at 02:16:53PM -0700, Fred Fish wrote:
> On Monday 02 February 2004 14:01, Daniel Jacobowitz wrote:
> > I would prefer this.  It also handles gdbserver correctly (restart the
> > server, continue).
> 
> OK, here is a revised patch.  Note this also preserves the previous
> behavior, discussed on gdb-patches for other proposed changes to
> bang.exp, where nothing is allowed after the "Program exited
> normally." message.

Thanks - I meant to mention that in my last message but forgot.  Please
check this in.

> 
> -Fred
> 
> 2004-02-02  Fred Fish  <fnf@redhat.com>
> 
> 	* gdb.base/bang.exp: Use gdb_run_cmd so this tests works with
> 	remote targets.  Update copyright years.
> 
> Index: gdb.base/bang.exp
> ===================================================================
> RCS file: /cvs/src/src/gdb/testsuite/gdb.base/bang.exp,v
> retrieving revision 1.1
> diff -c -p -r1.1 bang.exp
> *** gdb.base/bang.exp	24 Jun 2003 22:04:06 -0000	1.1
> --- gdb.base/bang.exp	2 Feb 2004 21:11:55 -0000
> ***************
> *** 1,4 ****
> ! # Copyright 2003 Free Software Foundation, Inc.
>   
>   # This program is free software; you can redistribute it and/or modify
>   # it under the terms of the GNU General Public License as published by
> --- 1,4 ----
> ! # Copyright 2003, 2004 Free Software Foundation, Inc.
>   
>   # This program is free software; you can redistribute it and/or modify
>   # it under the terms of the GNU General Public License as published by
> *************** gdb_reinitialize_dir $srcdir/$subdir
> *** 35,41 ****
>   gdb_load ${binfile}
>   
>   # Verify that we can run the program and that it terminates normally.
> - gdb_test "run" \
> -          ".*Program exited normally\." \
> -          "run program"
>   
> --- 35,47 ----
>   gdb_load ${binfile}
>   
>   # Verify that we can run the program and that it terminates normally.
>   
> + gdb_run_cmd
> + gdb_expect {
> +     -re ".*Program exited normally\.\r\n$gdb_prompt $" {
> +         pass "run program"
> +     }
> +     timeout {
> + 	fail "run program (timeout)"
> +     }
> + }
> 
> 
> 

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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