From patchwork Tue Jun 17 15:26:27 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 32062 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f71.google.com (mail-oa0-f71.google.com [209.85.219.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 69273206A0 for ; Tue, 17 Jun 2014 15:27:46 +0000 (UTC) Received: by mail-oa0-f71.google.com with SMTP id n16sf42304719oag.10 for ; Tue, 17 Jun 2014 08:27:46 -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=SL8DO5mTdMYP0hLsuGyzCBRLRqgAG2NyZMyd4prrZTIfN/tPXXCAIfvG/+2wswEQ+O opXwb4fUpxdVodellMX4hrd0UjZkWRxIH+c3beWhv14RFlncKsepYTNF0wEjdGsn7tYw 4zpzhZ10fxQ2NBf/EGaui7yEi1XbXy7xe55vQRl6pwh//Ke0tCvVZ26V8S7xPzGku0gr PN7/um0G8OCWWHEt4bcVR8umb++7joWeddruQEjNxvdRpUHD3LsMqgdoouxaA6X15Gl4 FPr+6PIchWYAPNojVNT7SnyvX73D4b57gABiVCY0sdGvudXaZX1kIYrn1sVZbuJU9ys1 mvGw== X-Gm-Message-State: ALoCoQn8v7otvSYhzzxhteG+QaPQegFsw9SlZjJuYyzrsOoZaMik7gXmYr7rod4BzPiALXK1oUoS X-Received: by 10.42.36.10 with SMTP id s10mr545401icd.5.1403018866013; Tue, 17 Jun 2014 08:27:46 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.32.203 with SMTP id h69ls5156511qgh.56.gmail; Tue, 17 Jun 2014 08:27:45 -0700 (PDT) X-Received: by 10.221.44.73 with SMTP id uf9mr22757882vcb.9.1403018865899; Tue, 17 Jun 2014 08:27:45 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id fu13si5588947vdb.105.2014.06.17.08.27.45 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Jun 2014 08:27:45 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 as permitted sender) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id db12so7704048veb.35 for ; Tue, 17 Jun 2014 08:27:45 -0700 (PDT) X-Received: by 10.220.89.4 with SMTP id c4mr1001956vcm.53.1403018865811; Tue, 17 Jun 2014 08:27:45 -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 vs6csp217960vcb; Tue, 17 Jun 2014 08:27:45 -0700 (PDT) X-Received: by 10.58.128.229 with SMTP id nr5mr604174veb.76.1403018865535; Tue, 17 Jun 2014 08:27:45 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id t3si5613414vcx.5.2014.06.17.08.27.44 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 17 Jun 2014 08:27:45 -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 1WwvHQ-0005v7-4e; Tue, 17 Jun 2014 15:26:36 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WwvHN-0005ql-Ag for xen-devel@lists.xen.org; Tue, 17 Jun 2014 15:26:33 +0000 Received: from [193.109.254.147:8847] by server-16.bemta-14.messagelabs.com id 24/1B-16986-82E50A35; Tue, 17 Jun 2014 15:26:32 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-12.tower-27.messagelabs.com!1403018788!11897229!4 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 19922 invoked from network); 17 Jun 2014 15:26:31 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-12.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 17 Jun 2014 15:26:31 -0000 X-IronPort-AV: E=Sophos;i="5.01,494,1400025600"; d="scan'208";a="144521698" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 17 Jun 2014 15:26:29 +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:28 -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 1WwvHH-00010a-NU; Tue, 17 Jun 2014 16:26:27 +0100 From: Ian Campbell To: Date: Tue, 17 Jun 2014 16:26:27 +0100 Message-ID: <1403018787-25442-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.176 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}; }