[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gdb-patches
Subject:    [patch/testsuite] sigstep.exp: exp_continue -continue_timer
From:       mec.gnu () mindspring ! com (Michael Chastain)
Date:       2004-08-31 4:17:00
Message-ID: 4133FBF3.nailGUJ11HSLW () mindspring ! com
[Download RAW message or body]

[Unusual hour for me to post, sigh]

This patch changes "exp_continue" to "exp_continue -continue_timer".
"-continue_timer" means that the existing timer on "expect" continues
to run, rather than reset.  So if there is an exp_continue loop,
the test script will bust out after the normal timeout rather than
going into an infinite loop.

This actually happens with sigstep.exp on the drow intercu branch.
More generally, I think it's a good idea to do this for most of our
calls to "exp_continue".

This is the first use of "-continue_timer" in the test suite so
it might run into a land mine.  I tested with both the stock
released versions of tcl+expect+dejagnu and the sourceware version
of tcl+expect+dejagnu, which has an "expect" from 1998-06-15.

Tested on:

  native i686-pc-linux-gnu, red hat 8.0,
  gdb 6.2, gdb HEAD, gdb drow_intercu-20040221-branch.
  various compilers and debug formats
  tcl 8.4.6 + expect 5.41 + dejagnu 1.4.4

  native i686-pc-linux-gnu, red hat 8.0,
  gdb 6.2, gdb HEAD, gdb drow_intercu-20040221-branch.
  various compilers and debug formats
  sourceware tcl+expect+dejagnu

  native hppa2.0w-hp-hpux11.11
  hp ansi c B.11.11.28706.gp
  tcl 8.4.6 + expect 5.41 + dejagnu 1.4.4

I'll give this 48 hours for comments and then commit it.  Then I'll
give it at last a week for field testing before I add any more
"-continue_timer".

===

2004-08-30  Michael Chastain  <mec.gnu@mindspring.com>

	* gdb.base/sigstep.exp (advance): Use "-continue_timer" option
	of "exp_continue".
	(advancei): Likewise.

Index: gdb.base/sigstep.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/sigstep.exp,v
retrieving revision 1.6
diff -c -3 -p -r1.6 sigstep.exp
*** gdb.base/sigstep.exp	30 Aug 2004 16:59:45 -0000	1.6
--- gdb.base/sigstep.exp	30 Aug 2004 18:18:32 -0000
*************** proc advance { i } {
*** 81,91 ****
      gdb_test_multiple "$i" "${test}" {
  	-re "done = 1;.*${gdb_prompt} $" {
  	    send_gdb "$i\n"
! 	    exp_continue
  	}
  	-re "\} .. handler .*${gdb_prompt} $" {
  	    send_gdb "$i\n"
! 	    exp_continue
  	}
  	-re "Program exited normally.*${gdb_prompt} $" {
  	    setup_kfail powerpc-*-*bsd* gdb/1639
--- 81,91 ----
      gdb_test_multiple "$i" "${test}" {
  	-re "done = 1;.*${gdb_prompt} $" {
  	    send_gdb "$i\n"
! 	    exp_continue -continue_timer
  	}
  	-re "\} .. handler .*${gdb_prompt} $" {
  	    send_gdb "$i\n"
! 	    exp_continue -continue_timer
  	}
  	-re "Program exited normally.*${gdb_prompt} $" {
  	    setup_kfail powerpc-*-*bsd* gdb/1639
*************** proc advancei { i } {
*** 123,133 ****
          }
  	-re "done = 1;.*${gdb_prompt} $" {
  	    send_gdb "$i\n"
! 	    exp_continue
  	}
  	-re "\} .. handler .*${gdb_prompt} $" {
  	    send_gdb "$i\n"
! 	    exp_continue
  	}
  	-re "signal handler called.*${gdb_prompt} $" {
  	    pass "$test"
--- 123,133 ----
          }
  	-re "done = 1;.*${gdb_prompt} $" {
  	    send_gdb "$i\n"
! 	    exp_continue -continue_timer
  	}
  	-re "\} .. handler .*${gdb_prompt} $" {
  	    send_gdb "$i\n"
! 	    exp_continue -continue_timer
  	}
  	-re "signal handler called.*${gdb_prompt} $" {
  	    pass "$test"
*************** proc advancei { i } {
*** 141,147 ****
  	}
  	-re "Make handler return now.*y or n. $" {
  	    send_gdb "y\n"
! 	    exp_continue
  	}
      }
  
--- 141,147 ----
  	}
  	-re "Make handler return now.*y or n. $" {
  	    send_gdb "y\n"
! 	    exp_continue -continue_timer
  	}
      }
  
*************** proc advancei { i } {
*** 152,165 ****
  	}
  	-re "signal handler called.*${gdb_prompt} $" {
  	    send_gdb "$i\n"
! 	    exp_continue
  	}
  	-re "return .*${gdb_prompt} $" {
  	    fail "$test (stepped)"
  	}
  	-re "Make .*frame return now.*y or n. $" {
  	    send_gdb "y\n"
! 	    exp_continue
  	}
  	-re "Program exited normally.*${gdb_prompt} $" {
  	    kfail gdb/1639 "$test (program exited)"
--- 152,165 ----
  	}
  	-re "signal handler called.*${gdb_prompt} $" {
  	    send_gdb "$i\n"
! 	    exp_continue -continue_timer
  	}
  	-re "return .*${gdb_prompt} $" {
  	    fail "$test (stepped)"
  	}
  	-re "Make .*frame return now.*y or n. $" {
  	    send_gdb "y\n"
! 	    exp_continue -continue_timer
  	}
  	-re "Program exited normally.*${gdb_prompt} $" {
  	    kfail gdb/1639 "$test (program exited)"


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic