[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH OSSTEST v5 13/14] TestSupport: replace power_cycle_timeout with power_cycle_sleep
Which does the actual sleep and logs that it is doing so. Otherwise on a machine which has a longish PowerCycleTime I keep wondering why osstest has hung... Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx> --- Osstest/TestSupport.pm | 10 ++++++---- ts-host-install | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 5ac66e5..8d070ab 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -66,7 +66,7 @@ BEGIN { selecthost get_hostflags get_host_property get_host_native_linux_console - power_state power_cycle power_cycle_time + power_state power_cycle power_cycle_sleep serial_fetch_logs propname_massage @@ -712,9 +712,11 @@ sub power_cycle_host_setup ($) { $ho->{PowerMethobjs} = $methobjs; } -sub power_cycle_time ($) { +sub power_cycle_sleep ($) { my ($ho) = @_; - return get_host_property($ho, 'power-cycle-time', 5); + my $to = get_host_property($ho, 'power-cycle-time', 5); + logm("power-cycle: waiting ${to}s"); + sleep($to); } sub power_cycle ($) { @@ -724,7 +726,7 @@ sub power_cycle ($) { " possibly shared with other jobs\n" if $ho->{SharedMaybeOthers}; power_state($ho, 0); - sleep(power_cycle_time($ho)); + power_cycle_sleep($ho); power_state($ho, 1); } diff --git a/ts-host-install b/ts-host-install index 30f6465..ae1d228 100755 --- a/ts-host-install +++ b/ts-host-install @@ -63,7 +63,7 @@ d-i netcfg/get_ipaddress string $ho->{Ip} END setup_pxeboot_firstboot($ps_url); - sleep(power_cycle_time($ho)); + power_cycle_sleep($ho); my $logtailer= Osstest::Logtailer->new($c{WebspaceLog}); power_state($ho, 1); -- 2.1.4 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |