render / rpms / libvirt

Forked from rpms/libvirt 9 months ago
Clone
3e5111
From 7cf2eee78e7e0e08eb1203f7fdb5705aba6b0e42 Mon Sep 17 00:00:00 2001
3e5111
Message-Id: <7cf2eee78e7e0e08eb1203f7fdb5705aba6b0e42@dist-git>
3e5111
From: Jiri Denemark <jdenemar@redhat.com>
3e5111
Date: Fri, 2 Jun 2017 00:44:46 +0200
3e5111
Subject: [PATCH] conf: Add save cookie callbacks to xmlopt
3e5111
3e5111
virDomainXMLOption gains driver specific callbacks for parsing and
3e5111
formatting save cookies.
3e5111
3e5111
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
3e5111
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
3e5111
(cherry picked from commit 25af7e950a9e35a6cffeed32bbcdd95dd7e01035)
3e5111
3e5111
https://bugzilla.redhat.com/show_bug.cgi?id=1441662
3e5111
3e5111
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
3e5111
---
3e5111
 src/bhyve/bhyve_domain.c      |  2 +-
3e5111
 src/conf/domain_conf.c        | 16 +++++++++++++++-
3e5111
 src/conf/domain_conf.h        |  7 ++++++-
3e5111
 src/conf/snapshot_conf.c      | 11 ++++++++++-
3e5111
 src/conf/snapshot_conf.h      |  2 ++
3e5111
 src/libvirt_private.syms      |  1 +
3e5111
 src/libxl/libxl_conf.c        |  2 +-
3e5111
 src/lxc/lxc_conf.c            |  2 +-
3e5111
 src/openvz/openvz_driver.c    |  2 +-
3e5111
 src/phyp/phyp_driver.c        |  2 +-
3e5111
 src/qemu/qemu_capabilities.c  |  2 +-
3e5111
 src/qemu/qemu_conf.c          |  3 ++-
3e5111
 src/security/virt-aa-helper.c |  2 +-
3e5111
 src/test/test_driver.c        |  2 +-
3e5111
 src/uml/uml_driver.c          |  2 +-
3e5111
 src/vbox/vbox_common.c        |  2 +-
3e5111
 src/vmware/vmware_driver.c    |  3 ++-
3e5111
 src/vmx/vmx.c                 |  2 +-
3e5111
 src/vz/vz_driver.c            |  2 +-
3e5111
 src/xen/xen_driver.c          |  2 +-
3e5111
 src/xenapi/xenapi_driver.c    |  2 +-
3e5111
 tests/bhyveargv2xmltest.c     |  2 +-
3e5111
 tests/testutils.c             |  2 +-
3e5111
 23 files changed, 54 insertions(+), 21 deletions(-)
3e5111
3e5111
diff --git a/src/bhyve/bhyve_domain.c b/src/bhyve/bhyve_domain.c
3e5111
index 0a99550afa..20c82937b5 100644
3e5111
--- a/src/bhyve/bhyve_domain.c
3e5111
+++ b/src/bhyve/bhyve_domain.c
3e5111
@@ -144,7 +144,7 @@ virBhyveDriverCreateXMLConf(bhyveConnPtr driver)
3e5111
     virBhyveDriverDomainDefParserConfig.priv = driver;
3e5111
     return virDomainXMLOptionNew(&virBhyveDriverDomainDefParserConfig,
3e5111
                                  &virBhyveDriverPrivateDataCallbacks,
3e5111
-                                 NULL, NULL);
3e5111
+                                 NULL, NULL, NULL);
3e5111
 }
3e5111
 
3e5111
 virDomainDefParserConfig virBhyveDriverDomainDefParserConfig = {
3e5111
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
3e5111
index 395dcc0531..b473ce6b1e 100644
3e5111
--- a/src/conf/domain_conf.c
3e5111
+++ b/src/conf/domain_conf.c
3e5111
@@ -79,6 +79,9 @@ struct _virDomainXMLOption {
3e5111
 
3e5111
     /* ABI stability callbacks */
3e5111
     virDomainABIStability abi;
3e5111
+
3e5111
+    /* Private data for save image stored in snapshot XML */
3e5111
+    virSaveCookieCallbacks saveCookie;
3e5111
 };
3e5111
 
3e5111
 #define VIR_DOMAIN_DEF_FORMAT_COMMON_FLAGS             \
3e5111
@@ -1054,7 +1057,8 @@ virDomainXMLOptionPtr
3e5111
 virDomainXMLOptionNew(virDomainDefParserConfigPtr config,
3e5111
                       virDomainXMLPrivateDataCallbacksPtr priv,
3e5111
                       virDomainXMLNamespacePtr xmlns,
3e5111
-                      virDomainABIStabilityPtr abi)
3e5111
+                      virDomainABIStabilityPtr abi,
3e5111
+                      virSaveCookieCallbacksPtr saveCookie)
3e5111
 {
3e5111
     virDomainXMLOptionPtr xmlopt;
3e5111
 
3e5111
@@ -1076,6 +1080,9 @@ virDomainXMLOptionNew(virDomainDefParserConfigPtr config,
3e5111
     if (abi)
3e5111
         xmlopt->abi = *abi;
3e5111
 
3e5111
+    if (saveCookie)
3e5111
+        xmlopt->saveCookie = *saveCookie;
3e5111
+
3e5111
     /* Technically this forbids to use one of Xerox's MAC address prefixes in
3e5111
      * our hypervisor drivers. This shouldn't ever be a problem.
3e5111
      *
3e5111
@@ -1106,6 +1113,13 @@ virDomainXMLOptionGetNamespace(virDomainXMLOptionPtr xmlopt)
3e5111
 }
3e5111
 
3e5111
 
3e5111
+virSaveCookieCallbacksPtr
3e5111
+virDomainXMLOptionGetSaveCookie(virDomainXMLOptionPtr xmlopt)
3e5111
+{
3e5111
+    return &xmlopt->saveCookie;
3e5111
+}
3e5111
+
3e5111
+
3e5111
 void
3e5111
 virBlkioDeviceArrayClear(virBlkioDevicePtr devices,
3e5111
                          int ndevices)
3e5111
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
3e5111
index d64ef1b6e9..706d106ad9 100644
3e5111
--- a/src/conf/domain_conf.h
3e5111
+++ b/src/conf/domain_conf.h
3e5111
@@ -55,6 +55,7 @@
3e5111
 # include "virgic.h"
3e5111
 # include "virperf.h"
3e5111
 # include "virtypedparam.h"
3e5111
+# include "virsavecookie.h"
3e5111
 
3e5111
 /* forward declarations of all device types, required by
3e5111
  * virDomainDeviceDef
3e5111
@@ -2549,7 +2550,11 @@ struct _virDomainABIStability {
3e5111
 virDomainXMLOptionPtr virDomainXMLOptionNew(virDomainDefParserConfigPtr config,
3e5111
                                             virDomainXMLPrivateDataCallbacksPtr priv,
3e5111
                                             virDomainXMLNamespacePtr xmlns,
3e5111
-                                            virDomainABIStabilityPtr abi);
3e5111
+                                            virDomainABIStabilityPtr abi,
3e5111
+                                            virSaveCookieCallbacksPtr saveCookie);
3e5111
+
3e5111
+virSaveCookieCallbacksPtr
3e5111
+virDomainXMLOptionGetSaveCookie(virDomainXMLOptionPtr xmlopt);
3e5111
 
3e5111
 void virDomainNetGenerateMAC(virDomainXMLOptionPtr xmlopt, virMacAddrPtr mac);
3e5111
 
3e5111
diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c
3e5111
index e3bba985d7..6330f7d1f9 100644
3e5111
--- a/src/conf/snapshot_conf.c
3e5111
+++ b/src/conf/snapshot_conf.c
3e5111
@@ -102,6 +102,7 @@ void virDomainSnapshotDefFree(virDomainSnapshotDefPtr def)
3e5111
         virDomainSnapshotDiskDefClear(&def->disks[i]);
3e5111
     VIR_FREE(def->disks);
3e5111
     virDomainDefFree(def->dom);
3e5111
+    virObjectUnref(def->cookie);
3e5111
     VIR_FREE(def);
3e5111
 }
3e5111
 
3e5111
@@ -214,6 +215,7 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt,
3e5111
     char *memorySnapshot = NULL;
3e5111
     char *memoryFile = NULL;
3e5111
     bool offline = !!(flags & VIR_DOMAIN_SNAPSHOT_PARSE_OFFLINE);
3e5111
+    virSaveCookieCallbacksPtr saveCookie = virDomainXMLOptionGetSaveCookie(xmlopt);
3e5111
 
3e5111
     if (VIR_ALLOC(def) < 0)
3e5111
         goto cleanup;
3e5111
@@ -365,6 +367,9 @@ virDomainSnapshotDefParse(xmlXPathContextPtr ctxt,
3e5111
         def->current = active != 0;
3e5111
     }
3e5111
 
3e5111
+    if (!offline && virSaveCookieParse(ctxt, &def->cookie, saveCookie) < 0)
3e5111
+        goto cleanup;
3e5111
+
3e5111
     ret = def;
3e5111
 
3e5111
  cleanup:
3e5111
@@ -691,7 +696,7 @@ char *
3e5111
 virDomainSnapshotDefFormat(const char *domain_uuid,
3e5111
                            virDomainSnapshotDefPtr def,
3e5111
                            virCapsPtr caps,
3e5111
-                           virDomainXMLOptionPtr xmlopt ATTRIBUTE_UNUSED,
3e5111
+                           virDomainXMLOptionPtr xmlopt,
3e5111
                            unsigned int flags,
3e5111
                            int internal)
3e5111
 {
3e5111
@@ -751,6 +756,10 @@ virDomainSnapshotDefFormat(const char *domain_uuid,
3e5111
         virBufferAddLit(&buf, "</domain>\n");
3e5111
     }
3e5111
 
3e5111
+    if (virSaveCookieFormatBuf(&buf, def->cookie,
3e5111
+                               virDomainXMLOptionGetSaveCookie(xmlopt)) < 0)
3e5111
+        goto error;
3e5111
+
3e5111
     if (internal)
3e5111
         virBufferAsprintf(&buf, "<active>%d</active>\n", def->current);
3e5111
 
3e5111
diff --git a/src/conf/snapshot_conf.h b/src/conf/snapshot_conf.h
3e5111
index 2ce526fa6b..1d663c77bc 100644
3e5111
--- a/src/conf/snapshot_conf.h
3e5111
+++ b/src/conf/snapshot_conf.h
3e5111
@@ -76,6 +76,8 @@ struct _virDomainSnapshotDef {
3e5111
 
3e5111
     virDomainDefPtr dom;
3e5111
 
3e5111
+    virObjectPtr cookie;
3e5111
+
3e5111
     /* Internal use.  */
3e5111
     bool current; /* At most one snapshot in the list should have this set */
3e5111
 };
3e5111
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
3e5111
index b4769080e8..88e3f4b8ac 100644
3e5111
--- a/src/libvirt_private.syms
3e5111
+++ b/src/libvirt_private.syms
3e5111
@@ -533,6 +533,7 @@ virDomainWatchdogActionTypeToString;
3e5111
 virDomainWatchdogModelTypeFromString;
3e5111
 virDomainWatchdogModelTypeToString;
3e5111
 virDomainXMLOptionGetNamespace;
3e5111
+virDomainXMLOptionGetSaveCookie;
3e5111
 virDomainXMLOptionNew;
3e5111
 
3e5111
 
3e5111
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c
3e5111
index dd345c22cf..28d31db158 100644
3e5111
--- a/src/libxl/libxl_conf.c
3e5111
+++ b/src/libxl/libxl_conf.c
3e5111
@@ -2147,5 +2147,5 @@ libxlCreateXMLConf(void)
3e5111
 {
3e5111
     return virDomainXMLOptionNew(&libxlDomainDefParserConfig,
3e5111
                                  &libxlDomainXMLPrivateDataCallbacks,
3e5111
-                                 NULL, NULL);
3e5111
+                                 NULL, NULL, NULL);
3e5111
 }
3e5111
diff --git a/src/lxc/lxc_conf.c b/src/lxc/lxc_conf.c
3e5111
index b46fbc58ff..8adc408c32 100644
3e5111
--- a/src/lxc/lxc_conf.c
3e5111
+++ b/src/lxc/lxc_conf.c
3e5111
@@ -213,7 +213,7 @@ lxcDomainXMLConfInit(void)
3e5111
     return virDomainXMLOptionNew(&virLXCDriverDomainDefParserConfig,
3e5111
                                  &virLXCDriverPrivateDataCallbacks,
3e5111
                                  &virLXCDriverDomainXMLNamespace,
3e5111
-                                 NULL);
3e5111
+                                 NULL, NULL);
3e5111
 }
3e5111
 
3e5111
 
3e5111
diff --git a/src/openvz/openvz_driver.c b/src/openvz/openvz_driver.c
3e5111
index 44a6631a99..4392aa64c0 100644
3e5111
--- a/src/openvz/openvz_driver.c
3e5111
+++ b/src/openvz/openvz_driver.c
3e5111
@@ -1493,7 +1493,7 @@ static virDrvOpenStatus openvzConnectOpen(virConnectPtr conn,
3e5111
         goto cleanup;
3e5111
 
3e5111
     if (!(driver->xmlopt = virDomainXMLOptionNew(&openvzDomainDefParserConfig,
3e5111
-                                                 NULL, NULL, NULL)))
3e5111
+                                                 NULL, NULL, NULL, NULL)))
3e5111
         goto cleanup;
3e5111
 
3e5111
     if (openvzLoadDomains(driver) < 0)
3e5111
diff --git a/src/phyp/phyp_driver.c b/src/phyp/phyp_driver.c
3e5111
index e85f66ffab..32cb681c75 100644
3e5111
--- a/src/phyp/phyp_driver.c
3e5111
+++ b/src/phyp/phyp_driver.c
3e5111
@@ -1199,7 +1199,7 @@ phypConnectOpen(virConnectPtr conn,
3e5111
         goto failure;
3e5111
 
3e5111
     if (!(phyp_driver->xmlopt = virDomainXMLOptionNew(&virPhypDriverDomainDefParserConfig,
3e5111
-                                                      NULL, NULL, NULL)))
3e5111
+                                                      NULL, NULL, NULL, NULL)))
3e5111
         goto failure;
3e5111
 
3e5111
     conn->privateData = phyp_driver;
3e5111
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
3e5111
index 72d3f25763..29bb9949af 100644
3e5111
--- a/src/qemu/qemu_capabilities.c
3e5111
+++ b/src/qemu/qemu_capabilities.c
3e5111
@@ -5027,7 +5027,7 @@ virQEMUCapsInitQMPCommandRun(virQEMUCapsInitQMPCommandPtr cmd,
3e5111
         goto ignore;
3e5111
     }
3e5111
 
3e5111
-    if (!(xmlopt = virDomainXMLOptionNew(NULL, NULL, NULL, NULL)) ||
3e5111
+    if (!(xmlopt = virDomainXMLOptionNew(NULL, NULL, NULL, NULL, NULL)) ||
3e5111
         !(cmd->vm = virDomainObjNew(xmlopt)))
3e5111
         goto cleanup;
3e5111
 
3e5111
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
3e5111
index 76eed25277..96956b7779 100644
3e5111
--- a/src/qemu/qemu_conf.c
3e5111
+++ b/src/qemu/qemu_conf.c
3e5111
@@ -908,7 +908,8 @@ virQEMUDriverCreateXMLConf(virQEMUDriverPtr driver)
3e5111
     return virDomainXMLOptionNew(&virQEMUDriverDomainDefParserConfig,
3e5111
                                  &virQEMUDriverPrivateDataCallbacks,
3e5111
                                  &virQEMUDriverDomainXMLNamespace,
3e5111
-                                 &virQEMUDriverDomainABIStability);
3e5111
+                                 &virQEMUDriverDomainABIStability,
3e5111
+                                 NULL);
3e5111
 }
3e5111
 
3e5111
 
3e5111
diff --git a/src/security/virt-aa-helper.c b/src/security/virt-aa-helper.c
3e5111
index 48201d5b8c..97436e5dc7 100644
3e5111
--- a/src/security/virt-aa-helper.c
3e5111
+++ b/src/security/virt-aa-helper.c
3e5111
@@ -667,7 +667,7 @@ get_definition(vahControl * ctl, const char *xmlStr)
3e5111
         goto exit;
3e5111
     }
3e5111
 
3e5111
-    if (!(ctl->xmlopt = virDomainXMLOptionNew(NULL, NULL, NULL, NULL))) {
3e5111
+    if (!(ctl->xmlopt = virDomainXMLOptionNew(NULL, NULL, NULL, NULL, NULL))) {
3e5111
         vah_error(ctl, 0, _("Failed to create XML config object"));
3e5111
         goto exit;
3e5111
     }
3e5111
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
3e5111
index c8085dd797..4fd14ddee6 100644
3e5111
--- a/src/test/test_driver.c
3e5111
+++ b/src/test/test_driver.c
3e5111
@@ -414,7 +414,7 @@ testDriverNew(void)
3e5111
         goto error;
3e5111
     }
3e5111
 
3e5111
-    if (!(ret->xmlopt = virDomainXMLOptionNew(NULL, NULL, &ns, NULL)) ||
3e5111
+    if (!(ret->xmlopt = virDomainXMLOptionNew(NULL, NULL, &ns, NULL, NULL)) ||
3e5111
         !(ret->eventState = virObjectEventStateNew()) ||
3e5111
         !(ret->domains = virDomainObjListNew()) ||
3e5111
         !(ret->networks = virNetworkObjListNew()))
3e5111
diff --git a/src/uml/uml_driver.c b/src/uml/uml_driver.c
3e5111
index ae75daa596..f91ee2961e 100644
3e5111
--- a/src/uml/uml_driver.c
3e5111
+++ b/src/uml/uml_driver.c
3e5111
@@ -533,7 +533,7 @@ umlStateInitialize(bool privileged,
3e5111
         goto out_of_memory;
3e5111
 
3e5111
     if (!(uml_driver->xmlopt = virDomainXMLOptionNew(&umlDriverDomainDefParserConfig,
3e5111
-                                                     &privcb, NULL, NULL)))
3e5111
+                                                     &privcb, NULL, NULL, NULL)))
3e5111
         goto error;
3e5111
 
3e5111
     if ((uml_driver->inotifyFD = inotify_init()) < 0) {
3e5111
diff --git a/src/vbox/vbox_common.c b/src/vbox/vbox_common.c
3e5111
index c739031660..4a79c43a1a 100644
3e5111
--- a/src/vbox/vbox_common.c
3e5111
+++ b/src/vbox/vbox_common.c
3e5111
@@ -139,7 +139,7 @@ vboxDriverObjNew(void)
3e5111
 
3e5111
     if (!(driver->caps = vboxCapsInit()) ||
3e5111
         !(driver->xmlopt = virDomainXMLOptionNew(&vboxDomainDefParserConfig,
3e5111
-                                                 NULL, NULL, NULL)))
3e5111
+                                                 NULL, NULL, NULL, NULL)))
3e5111
         goto cleanup;
3e5111
 
3e5111
     return driver;
3e5111
diff --git a/src/vmware/vmware_driver.c b/src/vmware/vmware_driver.c
3e5111
index 24e97a4969..525c85edc8 100644
3e5111
--- a/src/vmware/vmware_driver.c
3e5111
+++ b/src/vmware/vmware_driver.c
3e5111
@@ -114,7 +114,8 @@ vmwareDomainXMLConfigInit(void)
3e5111
     virDomainXMLPrivateDataCallbacks priv = { .alloc = vmwareDataAllocFunc,
3e5111
                                               .free = vmwareDataFreeFunc };
3e5111
 
3e5111
-    return virDomainXMLOptionNew(&vmwareDomainDefParserConfig, &priv, NULL, NULL);
3e5111
+    return virDomainXMLOptionNew(&vmwareDomainDefParserConfig, &priv,
3e5111
+                                 NULL, NULL, NULL);
3e5111
 }
3e5111
 
3e5111
 static virDrvOpenStatus
3e5111
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
3e5111
index 3289a20026..96507f10f3 100644
3e5111
--- a/src/vmx/vmx.c
3e5111
+++ b/src/vmx/vmx.c
3e5111
@@ -591,7 +591,7 @@ virDomainXMLOptionPtr
3e5111
 virVMXDomainXMLConfInit(void)
3e5111
 {
3e5111
     return virDomainXMLOptionNew(&virVMXDomainDefParserConfig, NULL,
3e5111
-                                 &virVMXDomainXMLNamespace, NULL);
3e5111
+                                 &virVMXDomainXMLNamespace, NULL, NULL);
3e5111
 }
3e5111
 
3e5111
 char *
3e5111
diff --git a/src/vz/vz_driver.c b/src/vz/vz_driver.c
3e5111
index f0b6722a6e..532a6841f3 100644
3e5111
--- a/src/vz/vz_driver.c
3e5111
+++ b/src/vz/vz_driver.c
3e5111
@@ -326,7 +326,7 @@ vzDriverObjNew(void)
3e5111
     if (!(driver->caps = vzBuildCapabilities()) ||
3e5111
         !(driver->xmlopt = virDomainXMLOptionNew(&vzDomainDefParserConfig,
3e5111
                                                  &vzDomainXMLPrivateDataCallbacksPtr,
3e5111
-                                                 NULL, NULL)) ||
3e5111
+                                                 NULL, NULL, NULL)) ||
3e5111
         !(driver->domains = virDomainObjListNew()) ||
3e5111
         !(driver->domainEventState = virObjectEventStateNew()) ||
3e5111
         (vzInitVersion(driver) < 0) ||
3e5111
diff --git a/src/xen/xen_driver.c b/src/xen/xen_driver.c
3e5111
index 0c160f8370..ab74ba9928 100644
3e5111
--- a/src/xen/xen_driver.c
3e5111
+++ b/src/xen/xen_driver.c
3e5111
@@ -401,7 +401,7 @@ virDomainXMLOptionPtr
3e5111
 xenDomainXMLConfInit(void)
3e5111
 {
3e5111
     return virDomainXMLOptionNew(&xenDomainDefParserConfig,
3e5111
-                                 NULL, NULL, NULL);
3e5111
+                                 NULL, NULL, NULL, NULL);
3e5111
 }
3e5111
 
3e5111
 
3e5111
diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
3e5111
index 5623ddb507..c94fd422f9 100644
3e5111
--- a/src/xenapi/xenapi_driver.c
3e5111
+++ b/src/xenapi/xenapi_driver.c
3e5111
@@ -200,7 +200,7 @@ xenapiConnectOpen(virConnectPtr conn, virConnectAuthPtr auth,
3e5111
     }
3e5111
 
3e5111
     if (!(privP->xmlopt = virDomainXMLOptionNew(&xenapiDomainDefParserConfig,
3e5111
-                                                NULL, NULL, NULL))) {
3e5111
+                                                NULL, NULL, NULL, NULL))) {
3e5111
         xenapiSessionErrorHandler(conn, VIR_ERR_INTERNAL_ERROR,
3e5111
                                   _("Failed to create XML conf object"));
3e5111
         goto error;
3e5111
diff --git a/tests/bhyveargv2xmltest.c b/tests/bhyveargv2xmltest.c
3e5111
index 5d7261a45b..43ef76a594 100644
3e5111
--- a/tests/bhyveargv2xmltest.c
3e5111
+++ b/tests/bhyveargv2xmltest.c
3e5111
@@ -131,7 +131,7 @@ mymain(void)
3e5111
         return EXIT_FAILURE;
3e5111
 
3e5111
     if ((driver.xmlopt = virDomainXMLOptionNew(NULL, NULL,
3e5111
-                                               NULL, NULL)) == NULL)
3e5111
+                                               NULL, NULL, NULL)) == NULL)
3e5111
         return EXIT_FAILURE;
3e5111
 
3e5111
 # define DO_TEST_FULL(name, flags)                            \
3e5111
diff --git a/tests/testutils.c b/tests/testutils.c
3e5111
index b7dc8d8408..0823469068 100644
3e5111
--- a/tests/testutils.c
3e5111
+++ b/tests/testutils.c
3e5111
@@ -1136,7 +1136,7 @@ virDomainXMLOptionPtr virTestGenericDomainXMLConfInit(void)
3e5111
 {
3e5111
     return virDomainXMLOptionNew(&virTestGenericDomainDefParserConfig,
3e5111
                                  &virTestGenericPrivateDataCallbacks,
3e5111
-                                 NULL, NULL);
3e5111
+                                 NULL, NULL, NULL);
3e5111
 }
3e5111
 
3e5111
 
3e5111
-- 
3e5111
2.13.1
3e5111