[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH OSSTEST v2 05/15] TestSupport: Add helper to wait for a guest to shutdown



Ian Campbell writes ("[PATCH OSSTEST v2 05/15] TestSupport: Add helper to wait 
for a guest to shutdown"):
> Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
...
> @@ -1249,6 +1250,17 @@ sub guest_await_reboot ($$$) {
>          return undef if $st eq 'sr';
>          fail("guest unexpectedly shutdown; state is '$st'")
>              if $st =~ m/^s/ || $st eq '';
> +        return "guest state is \"$st\"";
> +    });
> +}
> +
> +sub guest_await_shutdown ($$$) {
> +    my ($ho,$gho, $timeout) = @_;
> +    poll_loop($timeout, 30, "await shutdown request from $gho->{Guest}", sub 
> {
> +        my $st= guest_get_state($ho,$gho);
> +        return undef if $st eq 's';
> +        fail("guest unexpectedly shutdown; state is '$st'")
> +            if $st =~ m/^s/ || $st eq '';

This function is practically identical to guest_await_reboot.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.