From patchwork Tue Sep 6 13:09:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Liu X-Patchwork-Id: 9316823 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 BC606601C0 for ; Tue, 6 Sep 2016 13:18:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B03F728D0B for ; Tue, 6 Sep 2016 13:18:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A4FA728D17; Tue, 6 Sep 2016 13:18:58 +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 0F9B928D12 for ; Tue, 6 Sep 2016 13:18:55 +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 1bhGF5-0008LD-63; Tue, 06 Sep 2016 13:16:47 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bhGF4-0008Jb-1X for xen-devel@lists.xenproject.org; Tue, 06 Sep 2016 13:16:46 +0000 Received: from [85.158.137.68] by server-1.bemta-3.messagelabs.com id 33/C2-17152-DB1CEC75; Tue, 06 Sep 2016 13:16:45 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprNIsWRWlGSWpSXmKPExsXitHSDve6eg+f CDT50Wlt83zKZyYHR4/CHKywBjFGsmXlJ+RUJrBmdVzazF/TxVfyeIdLAeIW7i5GTQ0LAX+LU 1HVMIDabgLLEz85eNhBbREBPounAc0YQm1nATqL50QcWEFtYwEyiZ8cusHoWARWJaQ/ns4LYv AJOEjPWXGGBmCkncf74T2YQmxMofu/aIrAaIQFHiUO73zNC2AoSHdOPMUH0CkqcnPmEBWKXhM TBFy+AejmA5nBL/O22n8DINwtJ1SwkVQsYmVYxahSnFpWlFukaGeklFWWmZ5TkJmbm6BoaGOv lphYXJ6an5iQmFesl5+duYgQGVD0DA+MOxqkn/A4xSnIwKYnyqgWeCxfiS8pPqcxILM6ILyrN SS0+xCjDwaEkwZt2ACgnWJSanlqRlpkDDG2YtAQHj5IIbwNImre4IDG3ODMdInWKUZfj2Nwba 5mEWPLy81KlxHn1QYoEQIoySvPgRsDi7BKjrJQwLyMDA4MQT0FqUW5mCar8K0ZxDkYlYd6JIF N4MvNK4Da9AjqCCeiIdbtPgxxRkoiQkmpgZM+V+GF55FlVx0S+nx+M66UtM9eatu5Z6am8caP nvzkrJBf4HKjTPBjPf+fO4dapbxcvN2wPrf6eMevoG7bMtW1Ld62/o+fXJyS0Oy7C6Fri/Gu7 Qu/kvC06Pu/FwerurO/CZSxefrGvv1cZzd/NxTb/vcXuDaJbNlQwv5H2us0hz7iv0kNzlRJLc UaioRZzUXEiAEnDCLyuAgAA X-Env-Sender: prvs=05013ac0f=wei.liu2@citrix.com X-Msg-Ref: server-4.tower-31.messagelabs.com!1473167798!9023681!4 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 48104 invoked from network); 6 Sep 2016 13:16:44 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-4.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 6 Sep 2016 13:16:44 -0000 X-IronPort-AV: E=Sophos;i="5.30,291,1470700800"; d="scan'208";a="384566004" From: Wei Liu To: Xen-devel Date: Tue, 6 Sep 2016 14:09:36 +0100 Message-ID: <1473167380-957-22-git-send-email-wei.liu2@citrix.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1473167380-957-1-git-send-email-wei.liu2@citrix.com> References: <1473167380-957-1-git-send-email-wei.liu2@citrix.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: ian.jackson@eu.citrix.com, Wei Liu Subject: [Xen-devel] [OSSTEST PATCH v3 21/25] 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 Acked-by: Ian Jackson --- v3: use logm to log result 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 | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 ts-xtf-fep diff --git a/ts-xtf-fep b/ts-xtf-fep new file mode 100755 index 0000000..6f0037a --- /dev/null +++ b/ts-xtf-fep @@ -0,0 +1,41 @@ +#!/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; +} + +our $fep_result = fep_test(); + +logm("HVM FEP test returned $fep_result"); + +exit $fep_result;