All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH OSSTEST] Toolstack::xl: Support for ACPI fallback for shutdown
@ 2015-05-07  9:07 Ian Campbell
  2015-05-07 10:11 ` Ian Campbell
  2015-05-12 15:02 ` Ian Jackson
  0 siblings, 2 replies; 10+ messages in thread
From: Ian Campbell @ 2015-05-07  9:07 UTC (permalink / raw)
  To: ian.jackson; +Cc: Ian Campbell, xen-devel

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>
---
 Osstest/Toolstack/xl.pm | 4 +++-
 make-flight             | 2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/Osstest/Toolstack/xl.pm b/Osstest/Toolstack/xl.pm
index 71aefd5..dd12ae1 100644
--- a/Osstest/Toolstack/xl.pm
+++ b/Osstest/Toolstack/xl.pm
@@ -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 ($) {
diff --git a/make-flight b/make-flight
index 70c1900..202c68d 100755
--- a/make-flight
+++ b/make-flight
@@ -188,6 +188,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
@@ -201,6 +202,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
 }
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-05-14 18:05 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-07  9:07 [PATCH OSSTEST] Toolstack::xl: Support for ACPI fallback for shutdown Ian Campbell
2015-05-07 10:11 ` Ian Campbell
2015-05-12 15:03   ` Ian Jackson
2015-05-12 15:19     ` Ian Campbell
2015-05-12 15:34       ` Ian Campbell
2015-05-12 20:36         ` Jim Fehlig
2015-05-13  8:35           ` Ian Campbell
2015-05-13 17:52             ` Jim Fehlig
2015-05-14 18:05         ` Ian Jackson
2015-05-12 15:02 ` Ian Jackson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.