From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: [PATCH OSSTEST] Toolstack::xl: Support for ACPI fallback for shutdown Date: Thu, 7 May 2015 10:07:04 +0100 Message-ID: <1430989624-21654-1-git-send-email-ian.campbell@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: ian.jackson@eu.citrix.com Cc: Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org 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 --- 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