From patchwork Fri Jan 8 14:29:49 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 7986891 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 750DEBEEED for ; Fri, 8 Jan 2016 14:33:09 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ACF4620142 for ; Fri, 8 Jan 2016 14:33:08 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DD3052020F for ; Fri, 8 Jan 2016 14:33:07 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aHY3P-0004nQ-01; Fri, 08 Jan 2016 14:30:11 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aHY3M-0004mE-IZ for xen-devel@lists.xen.org; Fri, 08 Jan 2016 14:30:08 +0000 Received: from [193.109.254.147] by server-14.bemta-14.messagelabs.com id A6/38-07165-FE7CF865; Fri, 08 Jan 2016 14:30:07 +0000 X-Env-Sender: prvs=80839a509=Ian.Campbell@citrix.com X-Msg-Ref: server-2.tower-27.messagelabs.com!1452263405!13575267!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 3425 invoked from network); 8 Jan 2016 14:30:07 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-2.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 8 Jan 2016 14:30:07 -0000 X-IronPort-AV: E=Sophos;i="5.20,538,1444694400"; d="scan'208";a="323696125" From: Ian Campbell To: , Date: Fri, 8 Jan 2016 14:29:49 +0000 Message-ID: <1452263399-14094-2-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 2.6.1 In-Reply-To: <1452263368.29416.39.camel@citrix.com> References: <1452263368.29416.39.camel@citrix.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Ian Campbell Subject: [Xen-devel] [PATCH RFC OSSTEST v1 02/12] target_var: Support fallback to all_(guest|host)_$vn X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Having to set {ident}_foo for all idents used in a job (e.g host vs src_host+dst_host) in make-flight would be a little fiddly. Instead follow the lead of all_hostflags and consult all_host_$vn. I have no immediate use for all_guest_$vn, but support it for consistency. Signed-off-by: Ian Campbell Acked-by: Ian Jackson --- Osstest/TestSupport.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index a43feec..baff4f8 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -2091,7 +2091,10 @@ sub target_var_prefix ($) { sub target_var ($$) { my ($ho,$vn) = @_; - return $r{ target_var_prefix($ho). $vn }; + my $pfx = target_var_prefix($ho); + my $allthing = exists $ho->{Guest} ? "guest" : "host"; + return $r{ $pfx. $vn } // + $r{ "all_${allthing}_${vn}" }; } sub target_kernkind_check ($) {