From nobody Tue Feb 10 03:44:41 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=1555605209; cv=none; d=zoho.com; s=zohoarc; b=nBUAAYievRCT9sF/ene7sOsD2L5ulLviMjX/1COBLzkRtfdxSZKsNMIjFXZYNUM28iKDD9JfrbNM6/McKthrfuIql6Ko/vr/rHl7uYQ3B6eDWZRGY5nfMfhEuoeZa3q5vzlSn+1XLFjybhfFXei89lFCjMedpC2RM1Ynag5wKLI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1555605209; 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=UwMwBFn1klPe7BWpw7ajMh87gFxjC6RsnKSH7LonLEo=; b=HEVHmlazrUrmuYUzmJnnzHjMRtXXCzaIjbnp/X+UtcFBYCHUNfrYHKP6aqrKbEbdWed+lAvAAnFHwyeg6nfUbPpmJqvxxExdAT7MZr1si0O2CQ0Aw3+DN3VMfV7sTP7JiGthwz7/7e1VaY9yH/RoWrsARJrzRcSf0TLdJssbp1k= 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 1555605209930913.1733344610899; Thu, 18 Apr 2019 09:33:29 -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 1hH9xH-0001zF-Kg; Thu, 18 Apr 2019 16:32:07 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hH9xG-0001z1-HH for xen-devel@lists.xenproject.org; Thu, 18 Apr 2019 16:32:06 +0000 Received: from SMTP03.CITRIX.COM (unknown [162.221.156.55]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 802a5459-61f7-11e9-92d7-bc764e045a96; Thu, 18 Apr 2019 16:32:05 +0000 (UTC) X-Inumbo-ID: 802a5459-61f7-11e9-92d7-bc764e045a96 X-IronPort-AV: E=Sophos;i="5.60,366,1549929600"; d="scan'208";a="83913760" From: Ian Jackson To: Date: Thu, 18 Apr 2019 17:31:39 +0100 Message-ID: <20190418163158.11408-3-ian.jackson@eu.citrix.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20190418163158.11408-1-ian.jackson@eu.citrix.com> References: <20190418163158.11408-1-ian.jackson@eu.citrix.com> MIME-Version: 1.0 Subject: [Xen-devel] [OSSTEST PATCH 02/21] selecthost: Honour new $none_ok optional parameter 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" No functional change with existing callers. Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index ec867e4f..38c17d60 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -1125,9 +1125,9 @@ sub power_state ($$;$) { =20 #---------- host selection and properties ---------- =20 -sub selecthost ($); -sub selecthost ($) { - my ($ident) =3D @_; +sub selecthost ($;$); +sub selecthost ($;$) { + my ($ident, $none_ok) =3D @_; # must be run outside transaction =20 # $ident is @@ -1154,7 +1154,10 @@ sub selecthost ($) { $r{$ident}=3D $name; } else { $name=3D $r{$ident}; - die "no specified $ident" unless defined $name; + if (!defined $name) { + return undef if $none_ok; + die "no specified $ident"; + } } =20 my $ho=3D { --=20 2.11.0 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel