From 11ba195b8b6d4d3c57449f41ef12a8cf54f612b9 Mon Sep 17 00:00:00 2001 From: Anton Kolesov Date: Thu, 31 Oct 2013 06:35:30 +1100 Subject: [PATCH] * lib/remote.exp (standard_reboot): Return 1 instead of an empty string. (remote_reboot): Add comment explaining return value of this procedure. * doc/ref.xml (remote_reboot, standard_reboot): Document procedures. * doc/dejagnu.texi: Regenerate. Signed-off-by: Ben Elliston --- ChangeLog | 7 +++++++ doc/dejagnu.texi | 9 +++++++++ doc/ref.xml | 11 +++++++++-- lib/remote.exp | 11 +++++++++-- 4 files changed, 34 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index a8ab512..b3c4e2d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2013-10-31 Anton Kolesov + + * lib/remote.exp (standard_reboot): Return 1 instead of an empty string. + (remote_reboot): Add comment explaining return value of this procedure. + * doc/ref.xml (remote_reboot, standard_reboot): Document procedures. + * doc/dejagnu.texi: Regenerate. + 2013-10-05 Jose E. Marchesi * baseboards/unix.exp: Add gdb settings to not use hardware diff --git a/doc/dejagnu.texi b/doc/dejagnu.texi index 9e6c606..bd82d44 100644 --- a/doc/dejagnu.texi +++ b/doc/dejagnu.texi @@ -4830,6 +4830,10 @@ the @code{target_info} array. @node remote_reboot procedure, remote_send procedure, remote_raw_wait procedure, Procedures For Remote Communication @subsubsection Remote_reboot Procedure +Return value of this function depends on actual implementation +of reboot that will be used, in practice it is expected that +@code{remote_reboot} returns @emph{1} +on success and @emph{0} on failure. @quotation @@ -5035,6 +5039,11 @@ the @code{target_info} array. @node standard_reboot procedure, standard_send procedure, standard_load procedure, Procedures For Remote Communication @subsubsection Standard_reboot Procedure +It looks like that this procedure is never called, instead +@code{$@{board@}_reboot} defined in +@file{base-config.exp} will be used because it has +higher priority and @file{base-config.exp} is +always imported by @code{runtest}. @quotation diff --git a/doc/ref.xml b/doc/ref.xml index 18ae3bc..0c0f1f6 100644 --- a/doc/ref.xml +++ b/doc/ref.xml @@ -1725,7 +1725,10 @@ Remote_reboot Procedure - + Return value of this function depends on actual implementation + of reboot that will be used, in practice it is expected that + remote_reboot returns 1 + on success and 0 on failure. @@ -2013,7 +2016,11 @@ Standard_reboot Procedure - + It looks like that this procedure is never called, instead + ${board}_reboot defined in + base-config.exp will be used because it has + higher priority and base-config.exp is + always imported by runtest. diff --git a/lib/remote.exp b/lib/remote.exp index 5cfe43a..ed176ad 100644 --- a/lib/remote.exp +++ b/lib/remote.exp @@ -344,7 +344,10 @@ proc remote_raw_binary { host } { } - +# Return value of this function depends on actual implementation of reboot that +# will be used, in practice it is expected that remote_reboot returns 1 on +# success and 0 on failure. +# proc remote_reboot { host } { clone_output "\nRebooting ${host}\n" # FIXME: don't close the host connection, or all the remote @@ -360,8 +363,12 @@ proc remote_reboot { host } { return $status } +# It looks like that this proc is never called, instead ${board}_reboot defined +# in base-config.exp will be used because it has higher priority and +# base-config.exp is always imported by runtest. +# proc standard_reboot { host } { - return "" + return 1 } # # Download file FILE to DEST. If the optional DESTFILE is specified, -- 2.7.4