[PATCH v1 2/4] bhyve: add virBhyveDriverCreateXMLConf

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add virBhyveDriverCreateXMLConf, a simple wrapper around
virDomainXMLOptionNew that makes it easier to pass bhyveConnPtr
as a private data for parser. It will be used later for device
address allocation at parsing time.

Update consumers to use it instead of direct calls to
virDomainXMLOptionNew.

As we now have proper callbacks connected for the tests, update
test files accordingly to include the automatically generated
PCI root controller.
---
 src/bhyve/bhyve_domain.c                                         | 9 +++++++++
 src/bhyve/bhyve_domain.h                                         | 2 ++
 src/bhyve/bhyve_driver.c                                         | 4 +---
 tests/bhyvexml2argvtest.c                                        | 3 ++-
 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-acpiapic.xml           | 1 +
 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-base.xml               | 1 +
 .../bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder.xml  | 1 +
 .../bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder1.xml | 1 +
 .../bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder2.xml | 1 +
 .../bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder3.xml | 1 +
 .../bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder4.xml | 1 +
 .../bhyvexml2xmlout-bhyveload-explicitargs.xml                   | 1 +
 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-console.xml            | 1 +
 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-custom-loader.xml      | 1 +
 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-cdrom-grub.xml    | 1 +
 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-cdrom.xml         | 1 +
 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-virtio.xml        | 1 +
 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-bootorder.xml     | 1 +
 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-bootorder2.xml    | 1 +
 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-defaults.xml      | 1 +
 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-localtime.xml          | 1 +
 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-macaddr.xml            | 1 +
 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-metadata.xml           | 1 +
 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial-grub-nocons.xml | 1 +
 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial-grub.xml        | 1 +
 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial.xml             | 1 +
 tests/bhyvexml2xmltest.c                                         | 3 ++-
 27 files changed, 38 insertions(+), 5 deletions(-)

diff --git a/src/bhyve/bhyve_domain.c b/src/bhyve/bhyve_domain.c
index e2a20ce63..b4dc26767 100644
--- a/src/bhyve/bhyve_domain.c
+++ b/src/bhyve/bhyve_domain.c
@@ -83,6 +83,15 @@ bhyveDomainDeviceDefPostParse(virDomainDeviceDefPtr dev ATTRIBUTE_UNUSED,
     return 0;
 }
 
+virDomainXMLOptionPtr
+virBhyveDriverCreateXMLConf(bhyveConnPtr driver)
+{
+    virBhyveDriverDomainDefParserConfig.priv = driver;
+    return virDomainXMLOptionNew(&virBhyveDriverDomainDefParserConfig,
+                                 &virBhyveDriverPrivateDataCallbacks,
+                                 NULL);
+}
+
 virDomainDefParserConfig virBhyveDriverDomainDefParserConfig = {
     .devicesPostParseCallback = bhyveDomainDeviceDefPostParse,
     .domainPostParseCallback = bhyveDomainDefPostParse,
diff --git a/src/bhyve/bhyve_domain.h b/src/bhyve/bhyve_domain.h
index 0a6039216..bbc8ecd8c 100644
--- a/src/bhyve/bhyve_domain.h
+++ b/src/bhyve/bhyve_domain.h
@@ -37,6 +37,8 @@ struct _bhyveDomainObjPrivate {
     bhyveMonitorPtr mon;
 };
 
+virDomainXMLOptionPtr virBhyveDriverCreateXMLConf(bhyveConnPtr);
+
 extern virDomainXMLPrivateDataCallbacks virBhyveDriverPrivateDataCallbacks;
 extern virDomainDefParserConfig virBhyveDriverDomainDefParserConfig;
 
diff --git a/src/bhyve/bhyve_driver.c b/src/bhyve/bhyve_driver.c
index 17f85245d..504761f74 100644
--- a/src/bhyve/bhyve_driver.c
+++ b/src/bhyve/bhyve_driver.c
@@ -1239,9 +1239,7 @@ bhyveStateInitialize(bool privileged,
     if (virBhyveProbeGrubCaps(&bhyve_driver->grubcaps) < 0)
         goto cleanup;
 
-    if (!(bhyve_driver->xmlopt = virDomainXMLOptionNew(&virBhyveDriverDomainDefParserConfig,
-                                                       &virBhyveDriverPrivateDataCallbacks,
-                                                       NULL)))
+    if (!(bhyve_driver->xmlopt = virBhyveDriverCreateXMLConf(bhyve_driver)))
         goto cleanup;
 
     if (!(bhyve_driver->domains = virDomainObjListNew()))
diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c
index 22a902c53..a615c8ca1 100644
--- a/tests/bhyvexml2argvtest.c
+++ b/tests/bhyvexml2argvtest.c
@@ -7,6 +7,7 @@
 # include "datatypes.h"
 
 # include "bhyve/bhyve_capabilities.h"
+# include "bhyve/bhyve_domain.h"
 # include "bhyve/bhyve_utils.h"
 # include "bhyve/bhyve_command.h"
 
@@ -131,7 +132,7 @@ mymain(void)
     if ((driver.caps = virBhyveCapsBuild()) == NULL)
         return EXIT_FAILURE;
 
-    if ((driver.xmlopt = virDomainXMLOptionNew(NULL, NULL, NULL)) == NULL)
+    if ((driver.xmlopt = virBhyveDriverCreateXMLConf(&driver)) == NULL)
         return EXIT_FAILURE;
 
 # define DO_TEST_FULL(name, flags)                             \
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-acpiapic.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-acpiapic.xml
index b4720ecaf..ef57e0be6 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-acpiapic.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-acpiapic.xml
@@ -23,6 +23,7 @@
       <target dev='hda' bus='sata'/>
       <address type='drive' controller='0' bus='0' target='2' unit='0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='sata' index='0'/>
     <interface type='bridge'>
       <mac address='52:54:00:81:c4:b1'/>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-base.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-base.xml
index cd4e4f80d..0ff1a3c6b 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-base.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-base.xml
@@ -19,6 +19,7 @@
       <target dev='hda' bus='sata'/>
       <address type='drive' controller='0' bus='0' target='2' unit='0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='sata' index='0'/>
     <interface type='bridge'>
       <mac address='52:54:00:b9:94:02'/>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder.xml
index ab01cb5ab..6c092bb8d 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder.xml
@@ -26,6 +26,7 @@
       <readonly/>
       <address type='drive' controller='0' bus='0' target='4' unit='0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='sata' index='0'/>
     <interface type='bridge'>
       <mac address='52:54:00:8d:10:e1'/>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder1.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder1.xml
index df69c4e87..f9e55d6e3 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder1.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder1.xml
@@ -26,6 +26,7 @@
       <readonly/>
       <address type='drive' controller='0' bus='0' target='4' unit='0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='sata' index='0'/>
     <interface type='bridge'>
       <mac address='52:54:00:92:68:0e'/>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder2.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder2.xml
index 89131dc85..f75471f84 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder2.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder2.xml
@@ -19,6 +19,7 @@
       <target dev='hda' bus='sata'/>
       <address type='drive' controller='0' bus='0' target='2' unit='0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='sata' index='0'/>
     <interface type='bridge'>
       <mac address='52:54:00:1e:63:25'/>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder3.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder3.xml
index 96f9dc4dd..8b9aeea18 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder3.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder3.xml
@@ -26,6 +26,7 @@
       <boot order='1'/>
       <address type='drive' controller='0' bus='0' target='4' unit='0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='sata' index='0'/>
     <interface type='bridge'>
       <mac address='52:54:00:7a:f5:a4'/>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder4.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder4.xml
index 1dd180bc0..a688d8a76 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder4.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-bootorder4.xml
@@ -27,6 +27,7 @@
       <boot order='1'/>
       <address type='drive' controller='0' bus='0' target='4' unit='0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='sata' index='0'/>
     <interface type='bridge'>
       <mac address='52:54:00:fe:97:82'/>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-explicitargs.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-explicitargs.xml
index d7743a640..bb7193037 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-explicitargs.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-bhyveload-explicitargs.xml
@@ -19,6 +19,7 @@
       <target dev='hda' bus='sata'/>
       <address type='drive' controller='0' bus='0' target='2' unit='0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='sata' index='0'/>
     <interface type='bridge'>
       <mac address='52:54:00:11:bd:26'/>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-console.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-console.xml
index bf926f96b..bf9d6ad8a 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-console.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-console.xml
@@ -19,6 +19,7 @@
       <target dev='hda' bus='sata'/>
       <address type='drive' controller='0' bus='0' target='2' unit='0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='sata' index='0'/>
     <interface type='bridge'>
       <mac address='52:54:00:b1:42:eb'/>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-custom-loader.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-custom-loader.xml
index 3e7f145ed..53fd6b54b 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-custom-loader.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-custom-loader.xml
@@ -20,6 +20,7 @@
       <target dev='hda' bus='sata'/>
       <address type='drive' controller='0' bus='0' target='2' unit='0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='sata' index='0'/>
     <interface type='bridge'>
       <mac address='52:54:00:35:99:c2'/>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-cdrom-grub.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-cdrom-grub.xml
index 285842c01..acdc4badb 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-cdrom-grub.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-cdrom-grub.xml
@@ -20,6 +20,7 @@
       <readonly/>
       <address type='drive' controller='0' bus='0' target='2' unit='0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='sata' index='0'/>
     <interface type='bridge'>
       <mac address='52:54:00:6f:6a:53'/>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-cdrom.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-cdrom.xml
index 02517e4fd..23f3f6f47 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-cdrom.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-cdrom.xml
@@ -20,6 +20,7 @@
       <readonly/>
       <address type='drive' controller='0' bus='0' target='2' unit='0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='sata' index='0'/>
     <interface type='bridge'>
       <mac address='52:54:00:e3:ec:9b'/>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-virtio.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-virtio.xml
index 065ae813a..d7abb5abc 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-virtio.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-disk-virtio.xml
@@ -19,6 +19,7 @@
       <target dev='vda' bus='virtio'/>
       <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <interface type='bridge'>
       <mac address='52:54:00:bc:85:fe'/>
       <source bridge='virbr0'/>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-bootorder.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-bootorder.xml
index 939f7ba58..f36daae10 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-bootorder.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-bootorder.xml
@@ -32,6 +32,7 @@
       <boot order='1'/>
       <address type='drive' controller='0' bus='0' target='6' unit='0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='sata' index='0'/>
     <interface type='bridge'>
       <mac address='52:54:00:f4:6c:be'/>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-bootorder2.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-bootorder2.xml
index f774411e9..825ccd78f 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-bootorder2.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-bootorder2.xml
@@ -34,6 +34,7 @@
       <boot order='3'/>
       <address type='drive' controller='0' bus='0' target='6' unit='0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='sata' index='0'/>
     <interface type='bridge'>
       <mac address='52:54:00:0e:d2:6f'/>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-defaults.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-defaults.xml
index 758986b3f..b7f0a4886 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-defaults.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-grub-defaults.xml
@@ -19,6 +19,7 @@
       <target dev='hda' bus='sata'/>
       <address type='drive' controller='0' bus='0' target='2' unit='0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='sata' index='0'/>
     <interface type='bridge'>
       <mac address='52:54:00:ee:f5:79'/>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-localtime.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-localtime.xml
index 7e08ff9de..95b01db2f 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-localtime.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-localtime.xml
@@ -19,6 +19,7 @@
       <target dev='hda' bus='sata'/>
       <address type='drive' controller='0' bus='0' target='2' unit='0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='sata' index='0'/>
     <interface type='bridge'>
       <mac address='52:54:00:82:ca:a3'/>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-macaddr.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-macaddr.xml
index 4e4e672fc..842194caa 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-macaddr.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-macaddr.xml
@@ -19,6 +19,7 @@
       <target dev='hda' bus='sata'/>
       <address type='drive' controller='0' bus='0' target='2' unit='0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='sata' index='0'/>
     <interface type='bridge'>
       <mac address='52:54:00:22:ee:11'/>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-metadata.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-metadata.xml
index 77e18d48c..b44b6bd9e 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-metadata.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-metadata.xml
@@ -23,6 +23,7 @@
       <target dev='hda' bus='sata'/>
       <address type='drive' controller='0' bus='0' target='0' unit='0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='sata' index='0'/>
     <interface type='bridge'>
       <mac address='52:54:00:ad:55:51'/>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial-grub-nocons.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial-grub-nocons.xml
index a379f1274..f4ace3979 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial-grub-nocons.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial-grub-nocons.xml
@@ -19,6 +19,7 @@
       <target dev='hda' bus='sata'/>
       <address type='drive' controller='0' bus='0' target='2' unit='0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='sata' index='0'/>
     <interface type='bridge'>
       <mac address='52:54:00:a7:cd:5b'/>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial-grub.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial-grub.xml
index 2864089ae..f404ee7e3 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial-grub.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial-grub.xml
@@ -19,6 +19,7 @@
       <target dev='hda' bus='sata'/>
       <address type='drive' controller='0' bus='0' target='2' unit='0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='sata' index='0'/>
     <interface type='bridge'>
       <mac address='52:54:00:f0:72:11'/>
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial.xml
index 954c58aca..d713deaee 100644
--- a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial.xml
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-serial.xml
@@ -19,6 +19,7 @@
       <target dev='hda' bus='sata'/>
       <address type='drive' controller='0' bus='0' target='2' unit='0'/>
     </disk>
+    <controller type='pci' index='0' model='pci-root'/>
     <controller type='sata' index='0'/>
     <interface type='bridge'>
       <mac address='52:54:00:4f:f3:5b'/>
diff --git a/tests/bhyvexml2xmltest.c b/tests/bhyvexml2xmltest.c
index e95cee4b8..641ddb33e 100644
--- a/tests/bhyvexml2xmltest.c
+++ b/tests/bhyvexml2xmltest.c
@@ -5,6 +5,7 @@
 #ifdef WITH_BHYVE
 
 # include "bhyve/bhyve_capabilities.h"
+# include "bhyve/bhyve_domain.h"
 # include "bhyve/bhyve_utils.h"
 
 # define VIR_FROM_THIS VIR_FROM_NONE
@@ -49,7 +50,7 @@ mymain(void)
     if ((driver.caps = virBhyveCapsBuild()) == NULL)
         return EXIT_FAILURE;
 
-    if ((driver.xmlopt = virDomainXMLOptionNew(NULL, NULL, NULL)) == NULL)
+    if ((driver.xmlopt = virBhyveDriverCreateXMLConf(&driver)) == NULL)
         return EXIT_FAILURE;
 
 # define DO_TEST_FULL(name, is_different)                        \
-- 
2.11.0

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux