* lib/remote.exp (standard_reboot): Return 1 instead of an empty string.
authorAnton Kolesov <anton.kolesov@synopsys.com>
Wed, 30 Oct 2013 19:35:30 +0000 (06:35 +1100)
committerBen Elliston <bje@gnu.org>
Wed, 30 Oct 2013 19:35:30 +0000 (06:35 +1100)
(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 <bje@gnu.org>
ChangeLog
doc/dejagnu.texi
doc/ref.xml
lib/remote.exp

index a8ab512..b3c4e2d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-10-31  Anton Kolesov  <anton.kolesov@synopsys.com>
+
+       * 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  <jose.marchesi@oracle.com>
 
        * baseboards/unix.exp: Add gdb settings to not use hardware
index 9e6c606..bd82d44 100644 (file)
@@ -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
 
index 18ae3bc..0c0f1f6 100644 (file)
        <sect4 id="remotereboot" xreflabel="remote_reboot procedure">
          <title>Remote_reboot Procedure</title>
 
-         <para></para>
+         <para>Return value of this function depends on actual implementation
+             of reboot that will be used, in practice it is expected that
+             <function>remote_reboot</function> returns <emphasis>1</emphasis>
+             on success and <emphasis>0</emphasis> on failure.</para>
 
        <funcsynopsis role="tcl">
           <funcprototype>
        <sect4 id="standardreboot" xreflabel="standard_reboot procedure">
          <title>Standard_reboot Procedure</title>
 
-         <para></para>
+         <para>It looks like that this procedure is never called, instead
+             <function>${board}_reboot</function> defined in
+             <filename>base-config.exp</filename> will be used because it has
+             higher priority and <filename>base-config.exp</filename> is
+             always imported by <command>runtest</command>.</para>
 
        <funcsynopsis role="tcl">
           <funcprototype>
index 5cfe43a..ed176ad 100644 (file)
@@ -344,7 +344,10 @@ proc remote_raw_binary { host } {
 }
 
 \f
-
+# 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,