From: Ian Campbell Subject: [PATCH OSSTEST v4 02/25] TestSupport: allow caller of prepareguest_part_xencfg to specify viftype Date: Thu, 2 Apr 2015 10:16:16 +0100 Message-ID: <1427966199-5064-2-git-send-email-ian.campbell@citrix.com> References: <1427966183.4037.17.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1427966183.4037.17.camel@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: ian.jackson@eu.citrix.com Cc: Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org Signed-off-by: Ian Campbell -- v3: Use CamelCase for xopts, use the correct condition --- Osstest/TestSupport.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Osstest/TestSupport.pm b/Osstest/TestSupport.pm index c4adc48..490e16d 100644 --- a/Osstest/TestSupport.pm +++ b/Osstest/TestSupport.pm @@ -1533,12 +1533,13 @@ sub prepareguest_part_xencfg ($$$$$) { my $onpoweroff= $xopts->{OnPowerOff} || 'destroy'; my $oncrash= $xopts->{OnCrash} || 'preserve'; my $vcpus= guest_var($gho, 'vcpus', $xopts->{DefVcpus} || 2); + my $viftype= $xopts->{VifType} ? "type=$xopts->{VifType}," : ""; my $xoptcfg= $xopts->{ExtraConfig}; $xoptcfg='' unless defined $xoptcfg; my $xencfg= <{Ether}' ] +vif = [ '${viftype}mac=$gho->{Ether}' ] # on_poweroff = '$onpoweroff' on_reboot = '$onreboot' @@ -1633,6 +1634,7 @@ END $cfg .= "bios='$bios'\n"; } + $xopts{VifType} ||= "ioemu"; my $cfgpath= prepareguest_part_xencfg($ho, $gho, $ram_mb, \%xopts, $cfg); target_cmd_root($ho, <{Guest}.vncpw -- 2.1.4