This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] [gdb/15992] testsuite: Fix check for reboot_target return value
- From: Pedro Alves <palves at redhat dot com>
- To: Anton Kolesov <Anton dot Kolesov at synopsys dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, Jeremy Bennett <Jeremy dot bennett at embecosm dot com>
- Date: Mon, 21 Oct 2013 19:20:55 +0100
- Subject: Re: [PATCH] [gdb/15992] testsuite: Fix check for reboot_target return value
- Authentication-results: sourceware.org; auth=none
- References: <1382357174-10439-1-git-send-email-Anton dot Kolesov at synopsys dot com> <52653E04 dot 4030608 at redhat dot com> <39A54937CC95F24AA2F794E2D2B66B1356BD9C03 at de02wembxa dot internal dot synopsys dot com>
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