From patchwork Tue Jun 17 15:26:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 32070 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f200.google.com (mail-ie0-f200.google.com [209.85.223.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 42241206A0 for ; Tue, 17 Jun 2014 15:28:18 +0000 (UTC) Received: by mail-ie0-f200.google.com with SMTP id tr6sf42638807ieb.11 for ; Tue, 17 Jun 2014 08:28:17 -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=Bax565qw9E18o6Mi66bb84RMktVuKKY56GgzeUPunWc=; b=Xr/sx7LLhGHThjbFm3KkmeEsDLgvmy3Jgz+ENqoT1IyLp46PtOsKCkIdS9JyWqgOhI kgcpp+kS/eO0OvXj2TkWMo2/P88Pz6+GT24m5BN8TUGIAR/d00+n5iowwb9cIqEUP//t 7DyyN/vcQMRm7O53yXSO3q1LSi/5QNdvF1GoY6uwRs5vdzzCaoJvBwLy/3i3/mMSc1Sj pJsFKzUOxcNgN4FI49tnlIVdbmso28xwS2JtqFQBW1QPg2PDs16T2fv0elprGju+Ge8U 3VnqzkdDmS46+WF7tjYwqfMILV4ka+Pa5tQGZnubo+WZniVKCHojNJXTwKRW6k8FFRnO v/pQ== X-Gm-Message-State: ALoCoQnOBcSLcFc3I6VYImf7e0SkNK6GKBkeSzZUcBMOnbTAZIlbC3P+79+uUCPR6BbGu0CpWh7t X-Received: by 10.43.173.71 with SMTP id ob7mr2717430icc.19.1403018897769; Tue, 17 Jun 2014 08:28:17 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.51.132 with SMTP id u4ls4911103qga.36.gmail; Tue, 17 Jun 2014 08:28:17 -0700 (PDT) X-Received: by 10.221.64.20 with SMTP id xg20mr22300269vcb.3.1403018897662; Tue, 17 Jun 2014 08:28:17 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id fh10si5609524vcb.48.2014.06.17.08.28.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Jun 2014 08:28:17 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id hy4so6481843vcb.20 for ; Tue, 17 Jun 2014 08:28:17 -0700 (PDT) X-Received: by 10.58.169.115 with SMTP id ad19mr2834396vec.15.1403018897566; Tue, 17 Jun 2014 08:28:17 -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 vs6csp218000vcb; Tue, 17 Jun 2014 08:28:17 -0700 (PDT) X-Received: by 10.224.74.196 with SMTP id v4mr14308976qaj.104.1403018897128; Tue, 17 Jun 2014 08:28:17 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id g10si17302025qay.130.2014.06.17.08.28.16 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 17 Jun 2014 08:28:17 -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 1WwvHn-0006LN-Ei; Tue, 17 Jun 2014 15:26:59 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WwvHk-0006Fq-Vf for xen-devel@lists.xen.org; Tue, 17 Jun 2014 15:26:57 +0000 Received: from [193.109.254.147:17150] by server-16.bemta-14.messagelabs.com id 14/DB-16986-04E50A35; Tue, 17 Jun 2014 15:26:56 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-9.tower-27.messagelabs.com!1403018812!11869034!2 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 5481 invoked from network); 17 Jun 2014 15:26:55 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-9.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 17 Jun 2014 15:26:55 -0000 X-IronPort-AV: E=Sophos;i="5.01,494,1400025600"; d="scan'208";a="144521867" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 17 Jun 2014 15:26:51 +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-7z; Tue, 17 Jun 2014 16:26:50 +0100 From: Ian Campbell To: Date: Tue, 17 Jun 2014 16:26:48 +0100 Message-ID: <1403018809-25509-8-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 8/9] Toolstack: Refactor consolecmd handling 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.220.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 | 2 ++ Osstest/Toolstack/xl.pm | 5 +++++ ts-logs-capture | 2 +- 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/Osstest/Toolstack/libvirt.pm b/Osstest/Toolstack/libvirt.pm index 2dffd09..886e41b 100644 --- a/Osstest/Toolstack/libvirt.pm +++ b/Osstest/Toolstack/libvirt.pm @@ -55,4 +55,9 @@ sub migrate_check ($) { die "libvirt migration not supported yet." } +sub consolecmd ($$) { + my ($self,$gn) = @_; + return "virsh console $gn"; +} + 1; diff --git a/Osstest/Toolstack/xend.pm b/Osstest/Toolstack/xend.pm index 934f1a5..b77b4eb 100644 --- a/Osstest/Toolstack/xend.pm +++ b/Osstest/Toolstack/xend.pm @@ -33,8 +33,10 @@ sub new { }, $class; } +# Defer to xl driver for most things sub destroy { return Osstest::Toolstack::xl::destroy(@_); } sub create { return Osstest::Toolstack::xl::create(@_); } +sub consolecmd { return Osstest::Toolstack::xl::consolecmd(@_); } sub migrate_check ($) { my ($self) = @_; diff --git a/Osstest/Toolstack/xl.pm b/Osstest/Toolstack/xl.pm index 1c97a9d..9f4f8d1 100644 --- a/Osstest/Toolstack/xl.pm +++ b/Osstest/Toolstack/xl.pm @@ -51,4 +51,9 @@ sub migrate_check ($) { return $rc; } +sub consolecmd ($$) { + my ($self,$gn) = @_; + return $self->{_Command}." console $gho->{Name}"; +} + 1; diff --git a/ts-logs-capture b/ts-logs-capture index 9df5485..5a3b4c4 100755 --- a/ts-logs-capture +++ b/ts-logs-capture @@ -192,7 +192,7 @@ sub fetch_logs_guest ($) { logm("cannot find domid: $@"); return; } - my $consolecmd= toolstack($ho)->{Command}." console $gho->{Name}"; + my $consolecmd= toolstack($ho)->consolecmd($gho->{Name}); try_cmd_output_save("sleep 1 | $consolecmd | cat", "guest-$gho->{Name}-console");