* lib/gdb.exp (default_gdb_start): When reporting a timeout during

gdb initialization, also report how long dejagnu waited.  Restore
	old timeout before doing error return.  Temporarily increase timeout
 	by 3 minutes to allow for slow startups over heavy NFS use.
This commit is contained in:
Fred Fish 1996-06-28 00:30:45 +00:00
parent a928fca19c
commit 302fcffb7e
2 changed files with 19 additions and 4 deletions

View File

@ -1,3 +1,10 @@
Thu Jun 27 10:54:58 1996 Fred Fish <fnf@cygnus.com>
* lib/gdb.exp (default_gdb_start): When reporting a timeout during
gdb initialization, also report how long dejagnu waited. Restore
old timeout before doing error return. Temporarily increase timeout
by 3 minutes to allow for slow startups over heavy NFS use.
Tue Jun 25 19:59:17 1996 Fred Fish <fnf@cygnus.com> Tue Jun 25 19:59:17 1996 Fred Fish <fnf@cygnus.com>
* lib/gdb.exp: Report timeout value for verbosity level 2. * lib/gdb.exp: Report timeout value for verbosity level 2.

View File

@ -604,6 +604,10 @@ oaded."
# #
# start gdb -- start gdb running, default procedure # start gdb -- start gdb running, default procedure
# #
# When running over NFS, particularly if running many simultaneous
# tests on different hosts all using the same server, things can
# get really slow. Give gdb at least 3 minutes to start up.
#
proc default_gdb_start { } { proc default_gdb_start { } {
global verbose global verbose
global GDB global GDB
@ -619,8 +623,8 @@ proc default_gdb_start { } {
} }
set oldtimeout $timeout set oldtimeout $timeout
set timeout [expr "$timeout + 60"] set timeout [expr "$timeout + 180"]
verbose "Timeout is now $timeout seconds" 2 verbose "Timeout increased to $timeout seconds" 2
eval "spawn $GDB -nw $GDBFLAGS" eval "spawn $GDB -nw $GDBFLAGS"
expect { expect {
-re ".*\r\n$prompt $" { -re ".*\r\n$prompt $" {
@ -628,15 +632,19 @@ proc default_gdb_start { } {
} }
-re "$prompt $" { -re "$prompt $" {
perror "GDB never initialized." perror "GDB never initialized."
set timeout $oldtimeout
verbose "Timeout restored to $timeout seconds" 2
return -1 return -1
} }
timeout { timeout {
perror "(timeout) GDB never initialized." perror "(timeout) GDB never initialized after $timeout seconds."
set timeout $oldtimeout
verbose "Timeout restored to $timeout seconds" 2
return -1 return -1
} }
} }
set timeout $oldtimeout set timeout $oldtimeout
verbose "Timeout is now $timeout seconds" 2 verbose "Timeout restored to $timeout seconds" 2
# force the height to "unlimited", so no pagers get used # force the height to "unlimited", so no pagers get used
send "set height 0\n" send "set height 0\n"
expect { expect {