]> xenbits.xensource.com Git - people/dariof/osstest.git/commitdiff
Toolstack::xl: Support for ACPI fallback for shutdown
authorIan Campbell <ian.campbell@citrix.com>
Thu, 7 May 2015 09:07:04 +0000 (10:07 +0100)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 14 May 2015 10:56:19 +0000 (11:56 +0100)
HVM guests which do not include PV drivers will not shutdown after a
simple "xl shutdown". Add a runvar to indicate that the guest will
shutdown in response to an ACPI power event and apply this to the win7
and winxp test jobs.

Tested with:
    test-amd64-amd64-xl-qemuu-winxpsp3
    test-amd64-amd64-xl-qemuu-win7-amd64
    test-amd64-amd64-xl-qemuu-debianhvm-amd64
    test-amd64-amd64-xl

The first two correctly used the extra flag and the domains shutdown,
the other two correctly didn't use the extra flag and still shutdown.

Not currently implemented for libvirt, since we currently have no
libvirt tests I could try it with.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Osstest/Toolstack/xl.pm
make-flight

index 71aefd5698ee604cea963baa4724e41d9f7d8bd4..dd12ae1b0dd9d831e5af0ea449fb89adacf7a6c6 100644 (file)
@@ -55,7 +55,9 @@ sub shutdown_wait ($$$) {
     my ($self,$gho,$timeout) = @_;
     my $ho = $self->{Host};
     my $gn = $gho->{Name};
-    target_cmd_root($ho,"$self->{_Command} shutdown -w $gn", $timeout);
+    my $acpi_fallback = guest_var($gho,'acpi_shutdown','false') eq 'true'
+       ? "F" : "";
+    target_cmd_root($ho,"$self->{_Command} shutdown -w${acpi_fallback} $gn", $timeout);
 }
 
 sub migrate_check ($) {
index abe3e800da4ca3a818ab3c346940662d7cdb6c5a..cf0cfffcfc22f8e999e63bffb99ba2e3d7cd32b3 100755 (executable)
@@ -184,6 +184,7 @@ do_hvm_winxp_tests () {
             test-$xenarch$kern-$dom0arch-$toolstack$qemuu_suffix-winxpsp3$vcpus_suffix \
             test-win $toolstack $xenarch $dom0arch $qemuu_runvar \
             win_image=winxpsp3.iso $vcpus_runvars   \
+            win_acpi_shutdown=true \
             all_hostflags=$most_hostflags,hvm
 
   done
@@ -197,6 +198,7 @@ do_hvm_win7_x64_tests () {
   job_create_test test-$xenarch$kern-$dom0arch-xl$qemuu_suffix-win7-amd64 \
             test-win xl $xenarch $dom0arch $qemuu_runvar \
             win_image=win7-x64.iso \
+            win_acpi_shutdown=true \
             all_hostflags=$most_hostflags,hvm
 }