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 Pedro,

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.

--
Anton Kolesov


> -----Original Message-----
> From: Pedro Alves [mailto:palves@redhat.com]
> Sent: 21 October 2013 18:45
> To: Anton Kolesov
> Cc: gdb-patches@sourceware.org; Jeremy Bennett
> Subject: Re: [PATCH] [gdb/15992] testsuite: Fix check for reboot_target
> return value
> 
> Hi,
> 
> 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?
> 
> Thanks,
> --
> Pedro Alves


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