Re: [PATCH] gdb/testsuite/sim: Remove redundant setting of timeout

Simon Marchi
2018-12-04T15:43:44Z

On 2018-12-04 06:33, Andrew Burgess wrote:
> 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.

Hi Andrew,

Can you verify whether the remaining "set timeout" in those functions
have any effect at all? As you said, they are just local variables, so
I don't expect them to influence the behavior of gdb_expect. Either we
need "global timeout", or we pass the timeout directly as an argument to
gdb_expect (the latter sounds better).

Simon