]> xenbits.xensource.com Git - osstest.git/commitdiff
power: ssh: Fix handling of $delay
authorIan Jackson <ian.jackson@eu.citrix.com>
Fri, 25 Jan 2019 12:08:41 +0000 (12:08 +0000)
committerIan Jackson <ian.jackson@eu.citrix.com>
Fri, 25 Jan 2019 14:36:08 +0000 (14:36 +0000)
The script fragment contains a reference to $delay which is a perl
variable, not a variable in the script fragment.  We therefore need to
not ''-quote the script.

Without this, the ssh method will often fail spuriously: the exiting
parent (which will signal success back to the osstest controller)
races with the attempt to reboot.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Osstest/PDU/ssh.pm

index ac1eb9197225c93feb533918d15fde464cdf3d83..cfcf8f8562ef2f46ce4a39e2c90e82f925d084a1 100644 (file)
@@ -47,7 +47,7 @@ sub pdu_power_state {
 
     my $delay = 5;
 
-    target_cmd_root($mo->{Host}, <<'END', 60);
+    target_cmd_root($mo->{Host}, <<END, 60);
  set -e
  type reboot
  exec >>/var/log/osstest-reboot.log