From patchwork Tue Jun 17 15:26:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 32067 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8EAA4206A0 for ; Tue, 17 Jun 2014 15:28:07 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id j17sf42409272oag.8 for ; Tue, 17 Jun 2014 08:28:07 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=Kk4f4ktDe6FseAdMYx2vl6w7YOK+YKO6ktz6mKOH8d8=; b=MCgikovktuy40CWxEuw/jNznfVUMdDayfUP5RX1LKTzsj8uoXz0jHuKlGlqe95/zuU d2aQoVJe1XOTwrZxXD8REF01bUHtlKZbGMWtzBvP5MTTuVHqGS3YYkHp+gF9h3/u+cea LsNCulUebbnuOYkerIMLytHcXWr1d1MLl81+00dv11tVj+51ABKfJVXSguk7yBWuFKOc jpb1wntMrCtez9UeZnVxFb3a4HSBQZZAgPKMouiZwYkqaU00rUr8RmW0zg2SjtMPRh7l R+pzG3fflQ3rFcD9jZd1hwP6Qus/8iCTci1oEUwtXVmCxqHyUL0STHGYKjEZwACiPeVH IIsA== X-Gm-Message-State: ALoCoQmacb/QAGShVoCTwTpb2nU/7r0u5kO5NSa5gALKglMjEUfXAjuHMHZVVCYV5BJXC7u6WyFc X-Received: by 10.42.194.207 with SMTP id dz15mr390379icb.10.1403018887129; Tue, 17 Jun 2014 08:28:07 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.89.203 with SMTP id v69ls4808974qgd.6.gmail; Tue, 17 Jun 2014 08:28:07 -0700 (PDT) X-Received: by 10.52.236.163 with SMTP id uv3mr810826vdc.85.1403018887015; Tue, 17 Jun 2014 08:28:07 -0700 (PDT) Received: from mail-ve0-f175.google.com (mail-ve0-f175.google.com [209.85.128.175]) by mx.google.com with ESMTPS id r6si5608002vcy.51.2014.06.17.08.28.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Jun 2014 08:28:07 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.175 as permitted sender) client-ip=209.85.128.175; Received: by mail-ve0-f175.google.com with SMTP id jx11so5023696veb.34 for ; Tue, 17 Jun 2014 08:28:06 -0700 (PDT) X-Received: by 10.52.246.42 with SMTP id xt10mr18606796vdc.5.1403018886917; Tue, 17 Jun 2014 08:28:06 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp217987vcb; Tue, 17 Jun 2014 08:28:06 -0700 (PDT) X-Received: by 10.220.81.194 with SMTP id y2mr9083448vck.29.1403018886611; Tue, 17 Jun 2014 08:28:06 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id gu7si5599546vdc.22.2014.06.17.08.28.06 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 17 Jun 2014 08:28:06 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WwvHo-0006NJ-9W; Tue, 17 Jun 2014 15:27:00 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WwvHl-0006Gk-GS for xen-devel@lists.xen.org; Tue, 17 Jun 2014 15:26:57 +0000 Received: from [193.109.254.147:17234] by server-11.bemta-14.messagelabs.com id 79/C2-09902-04E50A35; Tue, 17 Jun 2014 15:26:56 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-15.tower-27.messagelabs.com!1403018810!11891033!5 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 5046 invoked from network); 17 Jun 2014 15:26:56 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-15.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 17 Jun 2014 15:26:56 -0000 X-IronPort-AV: E=Sophos;i="5.01,494,1400025600"; d="scan'208";a="144521868" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 17 Jun 2014 15:26:52 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.3.181.6; Tue, 17 Jun 2014 11:26:50 -0400 Received: from kazak.uk.xensource.com ([10.80.2.80] helo=kazak.uk.xensource.com.) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1WwvHe-00010t-8N; Tue, 17 Jun 2014 16:26:50 +0100 From: Ian Campbell To: Date: Tue, 17 Jun 2014 16:26:49 +0100 Message-ID: <1403018809-25509-9-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1403018758.25074.5.camel@kazak.uk.xensource.com> References: <1403018758.25074.5.camel@kazak.uk.xensource.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: Ian Campbell , xen-devel@lists.xen.org Subject: [Xen-devel] [PATCH RFC OSSTEST 9/9] Toolstack: refactor shutdown support X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: Signed-off-by: Ian Campbell --- Osstest/Toolstack/libvirt.pm | 5 +++++ Osstest/Toolstack/xend.pm | 1 + Osstest/Toolstack/xl.pm | 6 ++++++ ts-guest-stop | 5 +---- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm index 886e41b..0452df7 100644 --- a/Osstest/Toolstack/libvirt.pm +++ b/Osstest/Toolstack/libvirt.pm @@ -60,4 +60,9 @@ sub consolecmd ($$) { return "virsh console $gn"; } +sub shutdown_wait ($$) { + my ($self,$gn) = @_; + die "libvirt shutdown wait not implemented yet." +} + 1; diff --git a/Osstest/Toolstack/xend.pm b/Osstest/Toolstack/xend.pm index b77b4eb..f6841c9 100644 --- a/Osstest/Toolstack/xend.pm +++ b/Osstest/Toolstack/xend.pm @@ -37,6 +37,7 @@ sub new { sub destroy { return Osstest::Toolstack::xl::destroy(@_); } sub create { return Osstest::Toolstack::xl::create(@_); } sub consolecmd { return Osstest::Toolstack::xl::consolecmd(@_); } +sub shutdown_wait { return Osstest::Toolstack::xl::consolecmd(@_); } sub migrate_check ($) { my ($self) = @_; diff --git a/Osstest/Toolstack/xl.pm b/Osstest/Toolstack/xl.pm index 9f4f8d1..ce38444 100644 --- a/Osstest/Toolstack/xl.pm +++ b/Osstest/Toolstack/xl.pm @@ -56,4 +56,10 @@ sub consolecmd ($$) { return $self->{_Command}." console $gho->{Name}"; } +sub shutdown_wait ($$) { + my ($self,$gn) = @_; + my $ho = $self->{Host}; + target_cmd_root($ho,"$self->{_Command} shutdown -w $gn", 200); +} + 1; diff --git a/ts-guest-stop b/ts-guest-stop index 0e3a863..bd9c946 100755 --- a/ts-guest-stop +++ b/ts-guest-stop @@ -26,10 +26,7 @@ our ($ho,$gho) = ts_get_host_guest(@ARGV); sub stop () { guest_checkrunning($ho, $gho) or die "$gho->{Name} not running"; - target_cmd_root($ho, - toolstack($ho)->{Command} - ." shutdown -w " - .$gho->{Name}, 200); + toolstack($ho)->shutdown_wait($gho->{Name}); guest_checkrunning($ho, $gho) and die $gho->{Name}; }