Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] gdb/testsuite/sim: Remove redundant setting of timeout
@ 2018-12-04 11:33 Andrew Burgess
  2018-12-04 15:43 ` Simon Marchi
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Burgess @ 2018-12-04 11:33 UTC (permalink / raw)
  To: gdb-patches; +Cc: Andrew Burgess

In the config/sim.exp file two functions are defined.  Both of these
functions define local timeout variables and then call gdb_expect,
which (through a call to get_largest_timeout) will find the local
definition of timeout.

However, both of these functions set the local timeout to some
arbitrary value and print a log message for this "new" timeout just
before returning.

As in both cases, the timeout is a local variable, this final setting
of the timeout has no effect and can be removed.

gdb/testsuite/ChangeLog:

	* config/sim.exp (gdb_target_sim): Remove redundant adjustment of
	local timeout variable before return.
	(gdb_load): Likewise.
---
 gdb/testsuite/ChangeLog      | 6 ++++++
 gdb/testsuite/config/sim.exp | 4 ----
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/gdb/testsuite/config/sim.exp b/gdb/testsuite/config/sim.exp
index d9072febc6a..47146c6662e 100644
--- a/gdb/testsuite/config/sim.exp
+++ b/gdb/testsuite/config/sim.exp
@@ -37,8 +37,6 @@ proc gdb_target_sim { } {
 	    return -1
 	}
     }
-    set timeout 10
-    verbose "Timeout is now $timeout seconds" 2
     return 0
 }
 
@@ -67,8 +65,6 @@ proc gdb_load { arg } {
 	    if $verbose>1 then {
 		send_user "Loaded $arg into $GDB\n"
 	    }
-	    set timeout 30
-	    verbose "Timeout is now $timeout seconds" 2
 	    return 0
 	}
 	-re "$gdb_prompt $"     {
-- 
2.14.5


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-12-04 23:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-04 11:33 [PATCH] gdb/testsuite/sim: Remove redundant setting of timeout Andrew Burgess
2018-12-04 15:43 ` Simon Marchi
2018-12-04 15:54   ` Pedro Alves
2018-12-04 16:08     ` Simon Marchi
2018-12-04 16:11       ` Pedro Alves
2018-12-04 16:15         ` Simon Marchi
2018-12-04 16:33           ` Pedro Alves
2018-12-04 21:34             ` Andrew Burgess
2018-12-04 23:03               ` Pedro Alves

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox