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/15992] testsuite: Fix check for reboot_target return value


Hi Anton,

Thanks for taking a deeper look.

(please don't top post)

On 10/21/2013 05:24 PM, Anton Kolesov wrote:

> Pedro Alves wrote:
>> On 10/21/2013 01:06 PM, Anton Kolesov wrote:
>>> In config/monitor.exp there are conditions like this:
>>>
>>> if { ![reboot_target] }
>>>
>>> However reboot_target returns an empty string on success
>>
>> For the archives (and to help review), can you show where that
>> is documented, or how did you come to that conclusion?

> On my second look at this problem it seems more complicated than before.
> 
> "reboot_target" is defined in target.exp and invokes "remote_reboot" defined in
> remote.exp. This in turns invokes "call_remote". Dejagnu documentation (8.3.2) says
> any of remote procs return -1 on error and spawn id on success. However code of
> call_remote clearly has occasions of returning an empty string (though none of them is
> executed for "reboot" procedure). standard_reboot which should be the last fallback
> for a reboot call just returns an empty string. ${board}_reboot in base-config.exp
> returns either 0 or 1. Apparently my initial observation of problem with
> reboots was caused by our own ${board}_reboot implementation, which returns an
> empty string. But now I'm wondering what should be considered here as a reference
> implementation: standard_reboot or ${board}_reboot from base-config.exp.

I'd guess the latter, as it seems runtest.exp always loads
base-config.exp from runtest.exp:setup_target_hook.  When
would standard_reboot ever be called?  I'd suggest sending
a query to the dejagnu list.

-- 
Pedro Alves


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