From nobody Mon Feb 9 17:24:48 2026 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1556707804; cv=none; d=zoho.com; s=zohoarc; b=CcgwgDHgKE6Qdv90AjpXr6EatJHq+jyjg57tkmehflGjfSLKCKo5xGhDMg/fJMrUHTmyAv4FJTlI+9QFYqtXojm/JY2TYSVONBewYbw6xiOR7mWKus+jZEPT83pu+ulH2+CTKzYN0GLVbY0om47QTWe5gTeq+VfIpkI1oWbpFmY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1556707804; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To:ARC-Authentication-Results; bh=FqwYcqk+5tay8D9IN0Lr31YbB+KzRXsdimGWh68BXkM=; b=XLmYmYqQ5WfAJNJYbvnAkUzoHDTEr6rbA7F671aGCwcP2/ho7MNcyyX2u52cFeJkJPKzRM3E8PVaLGP7U/6S3dbngfeqeLwLAFpQeZf1gmb/8XAP8erdqHsLZAf5S5yIsf5WoaVkHnRt4aE+gr0san+60R82xZII+5TTImRLIgw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1556707804804104.2085560612253; Wed, 1 May 2019 03:50:04 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hLmn9-0005U0-3u; Wed, 01 May 2019 10:48:47 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hLmn8-0005Tv-Fx for xen-devel@lists.xenproject.org; Wed, 01 May 2019 10:48:46 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id b06460bc-6bfe-11e9-99d1-c720d7ab12f0; Wed, 01 May 2019 10:48:44 +0000 (UTC) X-Inumbo-ID: b06460bc-6bfe-11e9-99d1-c720d7ab12f0 X-IronPort-AV: E=Sophos;i="5.60,417,1549929600"; d="scan'208";a="84837291" From: Ian Jackson To: Date: Wed, 1 May 2019 11:48:25 +0100 Message-ID: <20190501104839.21621-2-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190501104839.21621-1-ian.jackson@eu.citrix.com> References: <20190501104839.21621-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH v2 01/15] TestSupport: target_var: Refactor to allow for another host case X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Ian Jackson Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Make an explicit list of the prefixes and a loop to walk over them. No functional change. Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 8e20244d..f357434f 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -2485,10 +2485,18 @@ sub target_var_prefix ($) { =20 sub target_var ($$) { my ($ho,$vn) =3D @_; - my $pfx =3D target_var_prefix($ho); - my $allthing =3D exists $ho->{Guest} ? "guest" : "host"; - return $r{ $pfx. $vn } // - $r{ "all_${allthing}_${vn}" }; + my @prefixes; + push @prefixes, target_var_prefix($ho); + if (exists $ho->{Guest}) { + push @prefixes, 'all_guest_'; + } else { + push @prefixes, 'all_host_'; + } + foreach my $prefix (@prefixes) { + my $v =3D $r{ $prefix.$vn }; + return $v if defined $v; + } + return undef; } =20 sub target_kernkind_check ($) { --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel