From patchwork Mon Aug 8 09:22:42 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9267565 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0C10D6075A for ; Mon, 8 Aug 2016 09:49:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F00B725D9E for ; Mon, 8 Aug 2016 09:49:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E487827BA5; Mon, 8 Aug 2016 09:49:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 6CBC825D9E for ; Mon, 8 Aug 2016 09:49:49 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bWh9P-00073j-Nv; Mon, 08 Aug 2016 09:47:15 +0000 Received: from mail6.bemta6.messagelabs.com ([85.158.143.247]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bWh9O-00073Q-Kb for xen-devel@lists.xenproject.org; Mon, 08 Aug 2016 09:47:14 +0000 Received: from [85.158.143.35] by server-7.bemta-6.messagelabs.com id 08/0F-15404-22558A75; Mon, 08 Aug 2016 09:47:14 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprLIsWRWlGSWpSXmKPExsXitHSDva5i6Ip wg/9LVC2+b5nM5MDocfjDFZYAxijWzLyk/IoE1oxpe3ewFUzmrdi27wVrA+Nbri5GTg4JAX+J tROuMoHYbALKEj87e9lAbBEBPYmmA88ZQWxmATuJ5kcfWEBsYQEriV/dl9lBbBYBFYnLNzaxg ti8As4S3+5uZ4GYKSdx/vhPZhCbEyi+8kQ/WL2QgJNE681XrBC2gkTH9GNMEL2CEidnPmGB2C UhcfDFC2aIOdwSt09PZZ7AyDcLSdksJGULGJlWMWoUpxaVpRbpGhnqJRVlpmeU5CZm5ugaGpj p5aYWFyemp+YkJhXrJefnbmIEBhUDEOxg/LMs4BCjJAeTkiivlNKKcCG+pPyUyozE4oz4otKc 1OJDjDIcHEoSvFeDgXKCRanpqRVpmTnA8IZJS3DwKInw3gBJ8xYXJOYWZ6ZDpE4x6nIcm3tjL ZMQS15+XqqUOG8vSJEASFFGaR7cCFisXWKUlRLmZQQ6SoinILUoN7MEVf4VozgHo5Iw732QKT yZeSVwm14BHcEEdESSKtgRJYkIKakGxlQnyxMPNfrWcgvaJxy16tzw+pfqlCcS7+dZyFRvXzY 71bBWObegbouFEOOq6DVeXjtY/qVdVlK45zCZ9QKj5G7FqRE2k5l23d575xzfFOlnMqExf2Z2 VufM/t4dEy2z7eU3i3Ibnakfz+acOXv7M7tpwdWUE9m3o2R35OkvlvIQ//xB+XxbjhJLcUaio RZzUXEiANPhjvGwAgAA X-Env-Sender: prvs=0213cfc1d=wei.liu2@citrix.com X-Msg-Ref: server-13.tower-21.messagelabs.com!1470649632!27593366!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 8.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 13802 invoked from network); 8 Aug 2016 09:47:13 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-13.tower-21.messagelabs.com with RC4-SHA encrypted SMTP; 8 Aug 2016 09:47:13 -0000 X-IronPort-AV: E=Sophos;i="5.28,489,1464652800"; d="scan'208";a="378195327" From: Wei Liu To: Xen-devel Date: Mon, 8 Aug 2016 10:22:42 +0100 Message-ID: <1470648166-3412-11-git-send-email-wei.liu2@citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1470648166-3412-1-git-send-email-wei.liu2@citrix.com> References: <1470648166-3412-1-git-send-email-wei.liu2@citrix.com> MIME-Version: 1.0 X-DLP: MIA2 Cc: ian.jackson@eu.citrix.com, Wei Liu Subject: [Xen-devel] [OSSTEST PATCH RFC v2 10/14] Introduce ts-xtf-fep X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Test the availability of FEP during runtime. Signed-off-by: Wei Liu --- v2: 1. use target_cmd_output_root to get output 2. die if the output is not in expected format 3. use fep test result as exit code of the script 4. remove the use of xtfdir runvar --- ts-xtf-fep | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 ts-xtf-fep diff --git a/ts-xtf-fep b/ts-xtf-fep new file mode 100755 index 0000000..c5222e0 --- /dev/null +++ b/ts-xtf-fep @@ -0,0 +1,37 @@ +#!/usr/bin/perl -w +# This is part of "osstest", an automated testing framework for Xen. +# Copyright (C) 2016 Citrix Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +use strict qw(vars); +use Osstest; +use POSIX; +use Osstest::TestSupport; + +tsreadconfig(); + +our $ho = selecthost('host'); + +sub fep_test () { + my $output = target_cmd_output_root($ho, <&2; echo \$? +END + + $output =~ m/^(\d+)$/ or die "$output ?"; + + return $1; +} + +exit fep_test();