From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Jackson Subject: [OSSTEST PATCH 09/13] prepareguest: Tolerate $mb=undef Date: Fri, 16 May 2014 19:01:36 +0100 Message-ID: <1400263300-22903-10-git-send-email-ian.jackson@eu.citrix.com> References: <1400263300-22903-1-git-send-email-ian.jackson@eu.citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WlMSW-0002Aj-JW for xen-devel@lists.xenproject.org; Fri, 16 May 2014 18:02:16 +0000 In-Reply-To: <1400263300-22903-1-git-send-email-ian.jackson@eu.citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Ian Jackson , Ian Campbell List-Id: xen-devel@lists.xenproject.org Allow callers to pass undef for $mb, to indicate that there is no need for prepareguest to do anything about storage. No functional change for any of the existing callers. Signed-off-by: Ian Jackson --- Osstest/TestSupport.pm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index 386008f..a576b87 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -1383,16 +1383,21 @@ sub prepareguest ($$$$$$) { } store_runvar("${gn}_hostname", $hostname); - store_runvar("${gn}_disk_lv", $r{"${gn}_hostname"}.'-disk'); store_runvar("${gn}_tcpcheckport", $tcpcheckport); store_runvar("${gn}_boot_timeout", $boot_timeout); + if (defined $mb) { + store_runvar("${gn}_disk_lv", $r{"${gn}_hostname"}.'-disk'); + } + my $gho= selectguest($gn, $ho); store_runvar("${gn}_domname", $gho->{Name}); - store_runvar("${gn}_vg", ''); - if (!length $r{"${gn}_vg"}) { - store_runvar("${gn}_vg", target_choose_vg($ho, $mb)); + if (defined $mb) { + store_runvar("${gn}_vg", ''); + if (!length $r{"${gn}_vg"}) { + store_runvar("${gn}_vg", target_choose_vg($ho, $mb)); + } } guest_find_lv($gho); -- 1.7.10.4