This is the mail archive of the gdb-patches@sourceware.org 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: [PATCH] gdb/testsuite/sim: Remove redundant setting of timeout


On 12/04/2018 04:15 PM, Simon Marchi wrote:
> On 2018-12-04 11:11, Pedro Alves wrote:
>> On 12/04/2018 04:08 PM, Simon Marchi wrote:
>>> That's very confusing, to say the least.
>>
>> Don't shoot the messenger.  :-)
> 
> Hehe, of course.
> 
> In light of this information, I think Andrew's patch is fine.  Do you?
Sort of.  At least with the removing the tail "set timeout" part,
I agree it's not doing anything.

As for the verbose call, we print "Timeout is now ..." messages
in a lot of places, and if you're looking at the log, I think
seeing a "Timeout is now ..." indication without seeing it changed
again reads like the timeout was never restored...

That's a preexisting problem, of course, since currently
we give the impression that we actually changed the timeout
at the end of the function but we actually didn't...

Still, IMHO, one of these would be a better change:

 a) - remove the initial verbose call too, or,
 b) - add "global timeout" at the start of the function, and restore
      the on-entry value on exit.  That way both "Timeout is now ..."
      messages will be truthful.  This is what e.g.,
      testsuiteconfig/sid.exp does.

In either case, there will be no imbalance in the verbose output.

Thanks,
Pedro Alves


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