From nobody Sun Feb 8 16:06:25 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1664872408; cv=none; d=zohomail.com; s=zohoarc; b=PwnFXimQBlw8SMzJ6Bl/t2jw+i8gG87Ggvtg9GnZ5c+M73Of62RpeeaaHjHPu+8+WNUCKp9poR3PKLRQ6YbzQpUPM7zUk8bJysm8ptBbWAk+XwdCuH3WO13enb2ruufGF8UArTWQnHKbp6N/otPruCNytCPFIpf1g64hMP2sam8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664872408; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5Wmkejw3tQF/hHSiTV1EnbiHo26dw0jgnclTU/eCo40=; b=ZvsrNP27Iy750tsnmMVClguznygG40KYa1iyN9G6NQhYK3Zf9Xg4SuJPVSU1iV1hGmHBjOLLWJVI0Wmeg2ZxP0+d+nQlTeUmwUZm4lT151/iTltTLw8paNt16W7wxxJkfUetS6Q5BCKRNv99O5hSqANXJzvjtZpDTNxrLaC8Df8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1664872408207963.146422193033; Tue, 4 Oct 2022 01:33:28 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-204-WRjUv-DpN1-YmzYlnBrSIg-1; Tue, 04 Oct 2022 04:33:23 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2EC1280A0B9; Tue, 4 Oct 2022 08:33:22 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1914B2024CBB; Tue, 4 Oct 2022 08:33:22 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D91FA19465A2; Tue, 4 Oct 2022 08:33:21 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 665291946588 for ; Tue, 4 Oct 2022 08:33:20 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 55F1140C6EC3; Tue, 4 Oct 2022 08:33:20 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9361440C6EC2 for ; Tue, 4 Oct 2022 08:33:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664872407; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=5Wmkejw3tQF/hHSiTV1EnbiHo26dw0jgnclTU/eCo40=; b=JFEZUWLGkbftgMMpWbYya0SUOh2rjRmC2oDG1MXBSCXINvL+9o8jJYbur3sTNO9mhGH5nF oVzKZy08GmW0f3rmrxXSySZmZGor9rqNIQkUTYXFZX0T8h6cGCAvuEfkBDn+BT1lH0PWFJ Qm/mQkULOiemQiBzWfK2lz2UsZ4BJRI= X-MC-Unique: WRjUv-DpN1-YmzYlnBrSIg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 01/43] util: xml: Expose all arguments of virXMLParseHelper in virXMLParse macro Date: Tue, 4 Oct 2022 10:32:35 +0200 Message-Id: <469474dcdbae1d0d64681bbdd2a0e930027b87ca.1664870258.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1664872409197100003 Content-Type: text/plain; charset="utf-8" The generic helper also has helper code to validate the root element and create an XPath context. Many places in the code duplicate code for doing these operations. Extend the helper to provide all arguments and fix all callers. In many cases this patch refactores the passing of the 'validate' field into a separate variable to avoid quirky looking arguments. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/conf/backup_conf.c | 5 +++-- src/conf/checkpoint_conf.c | 2 +- src/conf/domain_conf.c | 6 ++++-- src/conf/interface_conf.c | 3 ++- src/conf/network_conf.c | 2 +- src/conf/node_device_conf.c | 3 ++- src/conf/nwfilter_conf.c | 5 +++-- src/conf/secret_conf.c | 5 +++-- src/conf/snapshot_conf.c | 5 +++-- src/conf/storage_conf.c | 6 ++++-- src/conf/virnetworkportdef.c | 4 ++-- src/conf/virnwfilterbindingdef.c | 4 ++-- src/conf/virnwfilterbindingobj.c | 3 ++- src/test/test_driver.c | 2 +- src/util/virxml.h | 8 ++++++-- src/vbox/vbox_snapshot_conf.c | 6 +++--- src/vz/vz_sdk.c | 3 ++- tests/qemuxml2argvtest.c | 3 ++- 18 files changed, 46 insertions(+), 29 deletions(-) diff --git a/src/conf/backup_conf.c b/src/conf/backup_conf.c index 0f2fba115d..7dfc8ee635 100644 --- a/src/conf/backup_conf.c +++ b/src/conf/backup_conf.c @@ -277,9 +277,10 @@ virDomainBackupDefParseString(const char *xmlStr, virDomainBackupDef *ret =3D NULL; g_autoptr(xmlDoc) xml =3D NULL; int keepBlanksDefault =3D xmlKeepBlanksDefault(0); + bool validate =3D !(flags & VIR_DOMAIN_BACKUP_PARSE_INTERNAL); - if ((xml =3D virXMLParse(NULL, xmlStr, _("(domain_backup)"), "domainba= ckup.rng", - !(flags & VIR_DOMAIN_BACKUP_PARSE_INTERNAL)))) { + if ((xml =3D virXMLParse(NULL, xmlStr, _("(domain_backup)"), + NULL, NULL, "domainbackup.rng", validate))) { xmlKeepBlanksDefault(keepBlanksDefault); ret =3D virDomainBackupDefParseNode(xml, xmlDocGetRootElement(xml), xmlopt, flags); diff --git a/src/conf/checkpoint_conf.c b/src/conf/checkpoint_conf.c index 338cf10d12..0d2d2050da 100644 --- a/src/conf/checkpoint_conf.c +++ b/src/conf/checkpoint_conf.c @@ -212,7 +212,7 @@ virDomainCheckpointDefParseString(const char *xmlStr, g_autoptr(xmlDoc) xml =3D NULL; int keepBlanksDefault =3D xmlKeepBlanksDefault(0); - if ((xml =3D virXMLParse(NULL, xmlStr, _("(domain_checkpoint)"), + if ((xml =3D virXMLParse(NULL, xmlStr, _("(domain_checkpoint)"), NULL,= NULL, "domaincheckpoint.rng", true))) { xmlKeepBlanksDefault(keepBlanksDefault); ret =3D virDomainCheckpointDefParseNode(xml, xmlDocGetRootElement(= xml), diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index a609cc4f68..b3202c9f76 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -19083,8 +19083,10 @@ virDomainDefParse(const char *xmlStr, virDomainDef *def =3D NULL; int keepBlanksDefault =3D xmlKeepBlanksDefault(0); xmlNodePtr root; - if (!(xml =3D virXMLParse(filename, xmlStr, _("(domain_definition)"), = "domain.rng", - flags & VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA))) + bool validate =3D flags & VIR_DOMAIN_DEF_PARSE_VALIDATE_SCHEMA; + + if (!(xml =3D virXMLParse(filename, xmlStr, _("(domain_definition)"), + NULL, NULL, "domain.rng", validate))) goto cleanup; root =3D xmlDocGetRootElement(xml); diff --git a/src/conf/interface_conf.c b/src/conf/interface_conf.c index dc61b378b9..a3f6b6bed6 100644 --- a/src/conf/interface_conf.c +++ b/src/conf/interface_conf.c @@ -700,9 +700,10 @@ virInterfaceDefParse(const char *xmlStr, unsigned int flags) { g_autoptr(xmlDoc) xml =3D NULL; + bool validate =3D flags & VIR_INTERFACE_DEFINE_VALIDATE; xml =3D virXMLParse(filename, xmlStr, _("(interface_definition)"), - "interface.rng", flags & VIR_INTERFACE_DEFINE_VALIDA= TE); + NULL, NULL, "interface.rng", validate); if (!xml) return NULL; diff --git a/src/conf/network_conf.c b/src/conf/network_conf.c index b8450b75a9..b1d77a80c3 100644 --- a/src/conf/network_conf.c +++ b/src/conf/network_conf.c @@ -2036,7 +2036,7 @@ virNetworkDefParse(const char *xmlStr, int keepBlanksDefault =3D xmlKeepBlanksDefault(0); if ((xml =3D virXMLParse(filename, xmlStr, _("(network_definition)"), - "network.rng", validate))) + NULL, NULL, "network.rng", validate))) def =3D virNetworkDefParseNode(xml, xmlDocGetRootElement(xml), xml= opt); xmlKeepBlanksDefault(keepBlanksDefault); diff --git a/src/conf/node_device_conf.c b/src/conf/node_device_conf.c index d5bfc098b2..1db9a3240a 100644 --- a/src/conf/node_device_conf.c +++ b/src/conf/node_device_conf.c @@ -2508,7 +2508,8 @@ virNodeDeviceDefParse(const char *str, g_autoptr(xmlDoc) xml =3D NULL; g_autoptr(virNodeDeviceDef) def =3D NULL; - if (!(xml =3D virXMLParse(filename, str, _("(node_device_definition)")= , NULL, false)) || + if (!(xml =3D virXMLParse(filename, str, _("(node_device_definition)"), + NULL, NULL, NULL, false)) || !(def =3D virNodeDeviceDefParseNode(xml, xmlDocGetRootElement(xml), create, virt_type))) return NULL; diff --git a/src/conf/nwfilter_conf.c b/src/conf/nwfilter_conf.c index b5fd266457..44ea056823 100644 --- a/src/conf/nwfilter_conf.c +++ b/src/conf/nwfilter_conf.c @@ -2713,9 +2713,10 @@ virNWFilterDefParse(const char *xmlStr, { virNWFilterDef *def =3D NULL; g_autoptr(xmlDoc) xml =3D NULL; + bool validate =3D flags & VIR_NWFILTER_DEFINE_VALIDATE; - if ((xml =3D virXMLParse(filename, xmlStr, _("(nwfilter_definition)"),= "nwfilter.rng", - flags & VIR_NWFILTER_DEFINE_VALIDATE))) { + if ((xml =3D virXMLParse(filename, xmlStr, _("(nwfilter_definition)"), + NULL, NULL, "nwfilter.rng", validate))) { def =3D virNWFilterDefParseNode(xml, xmlDocGetRootElement(xml)); } diff --git a/src/conf/secret_conf.c b/src/conf/secret_conf.c index 011fdaa12b..02c2e38964 100644 --- a/src/conf/secret_conf.c +++ b/src/conf/secret_conf.c @@ -193,9 +193,10 @@ virSecretDefParse(const char *xmlStr, { g_autoptr(xmlDoc) xml =3D NULL; virSecretDef *ret =3D NULL; + bool validate =3D flags & VIR_SECRET_DEFINE_VALIDATE; - if ((xml =3D virXMLParse(filename, xmlStr, _("(definition_of_secret)")= , "secret.rng", - flags & VIR_SECRET_DEFINE_VALIDATE))) { + if ((xml =3D virXMLParse(filename, xmlStr, _("(definition_of_secret)"), + NULL, NULL, "secret.rng", validate))) { ret =3D secretXMLParseNode(xml, xmlDocGetRootElement(xml)); } diff --git a/src/conf/snapshot_conf.c b/src/conf/snapshot_conf.c index ae635edd08..a5974053f4 100644 --- a/src/conf/snapshot_conf.c +++ b/src/conf/snapshot_conf.c @@ -421,9 +421,10 @@ virDomainSnapshotDefParseString(const char *xmlStr, virDomainSnapshotDef *ret =3D NULL; g_autoptr(xmlDoc) xml =3D NULL; int keepBlanksDefault =3D xmlKeepBlanksDefault(0); + bool validate =3D flags & VIR_DOMAIN_SNAPSHOT_PARSE_VALIDATE; - if ((xml =3D virXMLParse(NULL, xmlStr, _("(domain_snapshot)"), "domain= snapshot.rng", - flags & VIR_DOMAIN_SNAPSHOT_PARSE_VALIDATE))) { + if ((xml =3D virXMLParse(NULL, xmlStr, _("(domain_snapshot)"), + NULL, NULL, "domainsnapshot.rng", validate))) { xmlKeepBlanksDefault(keepBlanksDefault); ret =3D virDomainSnapshotDefParseNode(xml, xmlDocGetRootElement(xm= l), xmlopt, parseOpaque, diff --git a/src/conf/storage_conf.c b/src/conf/storage_conf.c index 79f16aadf3..d7375a5160 100644 --- a/src/conf/storage_conf.c +++ b/src/conf/storage_conf.c @@ -1001,9 +1001,10 @@ virStoragePoolDefParse(const char *xmlStr, { virStoragePoolDef *ret =3D NULL; g_autoptr(xmlDoc) xml =3D NULL; + bool validate =3D flags & VIR_STORAGE_POOL_DEFINE_VALIDATE; if ((xml =3D virXMLParse(filename, xmlStr, _("(storage_pool_definition= )"), - "storagepool.rng", flags & VIR_STORAGE_POOL_DEF= INE_VALIDATE))) { + NULL, NULL, "storagepool.rng", validate))) { ret =3D virStoragePoolDefParseNode(xml, xmlDocGetRootElement(xml)); } @@ -1470,7 +1471,8 @@ virStorageVolDefParse(virStoragePoolDef *pool, virStorageVolDef *ret =3D NULL; g_autoptr(xmlDoc) xml =3D NULL; - if ((xml =3D virXMLParse(filename, xmlStr, _("(storage_volume_definiti= on)"), NULL, false))) { + if ((xml =3D virXMLParse(filename, xmlStr, _("(storage_volume_definiti= on)"), + NULL, NULL, NULL, false))) { ret =3D virStorageVolDefParseNode(pool, xml, xmlDocGetRootElement(= xml), flags); } diff --git a/src/conf/virnetworkportdef.c b/src/conf/virnetworkportdef.c index 39fa895fae..40cadc4ae8 100644 --- a/src/conf/virnetworkportdef.c +++ b/src/conf/virnetworkportdef.c @@ -279,10 +279,10 @@ virNetworkPortDefParse(const char *xmlStr, { virNetworkPortDef *def =3D NULL; g_autoptr(xmlDoc) xml =3D NULL; + bool validate =3D flags & VIR_NETWORK_PORT_CREATE_VALIDATE; if ((xml =3D virXMLParse(filename, xmlStr, _("(networkport_definition)= "), - "networkport.rng", - flags & VIR_NETWORK_PORT_CREATE_VALIDATE))) { + NULL, NULL, "networkport.rng", validate))) { def =3D virNetworkPortDefParseNode(xml, xmlDocGetRootElement(xml)); } diff --git a/src/conf/virnwfilterbindingdef.c b/src/conf/virnwfilterbinding= def.c index cc50ba944a..e58bab3f08 100644 --- a/src/conf/virnwfilterbindingdef.c +++ b/src/conf/virnwfilterbindingdef.c @@ -182,10 +182,10 @@ virNWFilterBindingDefParse(const char *xmlStr, { virNWFilterBindingDef *def =3D NULL; g_autoptr(xmlDoc) xml =3D NULL; + bool validate =3D flags & VIR_NWFILTER_BINDING_CREATE_VALIDATE; if ((xml =3D virXMLParse(filename, xmlStr, _("(nwfilterbinding_definit= ion)"), - "nwfilterbinding.rng", - flags & VIR_NWFILTER_BINDING_CREATE_VALIDATE)))= { + NULL, NULL, "nwfilterbinding.rng", validate))) { def =3D virNWFilterBindingDefParseNode(xml, xmlDocGetRootElement(x= ml)); } diff --git a/src/conf/virnwfilterbindingobj.c b/src/conf/virnwfilterbinding= obj.c index 47455c7e35..cc6009d1f2 100644 --- a/src/conf/virnwfilterbindingobj.c +++ b/src/conf/virnwfilterbindingobj.c @@ -257,7 +257,8 @@ virNWFilterBindingObjParse(const char *xmlStr, virNWFilterBindingObj *obj =3D NULL; g_autoptr(xmlDoc) xml =3D NULL; - if ((xml =3D virXMLParse(filename, xmlStr, _("(nwfilterbinding_status)= "), NULL, false))) { + if ((xml =3D virXMLParse(filename, xmlStr, _("(nwfilterbinding_status)= "), + NULL, NULL, NULL, false))) { obj =3D virNWFilterBindingObjParseNode(xml, xmlDocGetRootElement(x= ml)); } diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 686ff051a8..1c10124564 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -851,7 +851,7 @@ testParseXMLDocFromFile(xmlNodePtr node, const char *fi= le, const char *type) if ((relFile =3D virXMLPropString(node, "file"))) { absFile =3D testBuildFilename(file, relFile); - if (!(doc =3D virXMLParse(absFile, NULL, type, NULL, false))) + if (!(doc =3D virXMLParse(absFile, NULL, type, NULL, NULL, NULL, f= alse))) return NULL; ret =3D xmlCopyNode(xmlDocGetRootElement(doc), 1); diff --git a/src/util/virxml.h b/src/util/virxml.h index af58d44835..a80e795f6b 100644 --- a/src/util/virxml.h +++ b/src/util/virxml.h @@ -204,13 +204,17 @@ virXMLPickShellSafeComment(const char *str1, * @filename: file to parse, or NULL for string parsing * @xmlStr: if @filename is NULL, a string to parse * @url: if @filename is NULL, an optional filename to attribute the parse= to + * @rootelement: if non-NULL, validate that the root element name equals t= o this parameter + * @ctxt: if non-NULL, filled with a new XPath context including populatin= g the root node + * @schemafile: name of the appropriate schema file for the parsed XML for= validation (may be NULL) + * @validate: if true and @schemafile is non-NULL, validate the XML agains= t @schemafile * * Parse xml from either a file or a string. * * Return the parsed document object, or NULL on failure. */ -#define virXMLParse(filename, xmlStr, url, schemafile, validate) \ - virXMLParseHelper(VIR_FROM_THIS, filename, xmlStr, url, NULL, NULL, sc= hemafile, validate) +#define virXMLParse(filename, xmlStr, url, rootelement, ctxt, schemafile, = validate) \ + virXMLParseHelper(VIR_FROM_THIS, filename, xmlStr, url, rootelement, c= txt, schemafile, validate) /** * virXMLParseString: diff --git a/src/vbox/vbox_snapshot_conf.c b/src/vbox/vbox_snapshot_conf.c index 90afac179e..6dce9cdf0f 100644 --- a/src/vbox/vbox_snapshot_conf.c +++ b/src/vbox/vbox_snapshot_conf.c @@ -584,7 +584,7 @@ virVBoxSnapshotConfLoadVboxFile(const char *filePath, machineDescription =3D g_new0(virVBoxSnapshotConfMachine, 1); - xml =3D virXMLParse(filePath, NULL, NULL, NULL, false); + xml =3D virXMLParse(filePath, NULL, NULL, NULL, NULL, NULL, false); if (xml =3D=3D NULL) { virReportError(VIR_ERR_XML_ERROR, "%s", _("Unable to parse the xml")); @@ -1214,7 +1214,7 @@ virVBoxSnapshotConfGetRWDisksPathsFromLibvirtXML(cons= t char *filePath, _("filePath is null")); goto cleanup; } - xml =3D virXMLParse(filePath, NULL, NULL, NULL, false); + xml =3D virXMLParse(filePath, NULL, NULL, NULL, NULL, NULL, false); if (xml =3D=3D NULL) { virReportError(VIR_ERR_XML_ERROR, "%s", _("Unable to parse the xml")); @@ -1271,7 +1271,7 @@ virVBoxSnapshotConfGetRODisksPathsFromLibvirtXML(cons= t char *filePath, _("filePath is null")); goto cleanup; } - xml =3D virXMLParse(filePath, NULL, NULL, NULL, false); + xml =3D virXMLParse(filePath, NULL, NULL, NULL, NULL, NULL, false); if (xml =3D=3D NULL) { virReportError(VIR_ERR_XML_ERROR, "%s", _("Unable to parse the xml")); diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c index ecf610d7db..8fb7a9948d 100644 --- a/src/vz/vz_sdk.c +++ b/src/vz/vz_sdk.c @@ -4581,7 +4581,8 @@ prlsdkParseSnapshotTree(const char *treexml) if (*treexml =3D=3D '\0') return snapshots; - if (!(xml =3D virXMLParse(NULL, treexml, _("(snapshot_tree)"), NULL, f= alse))) + if (!(xml =3D virXMLParse(NULL, treexml, _("(snapshot_tree)"), + NULL, NULL, NULL, false))) goto cleanup; root =3D xmlDocGetRootElement(xml); diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index c8b69bbd7a..89bed6a46e 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -672,7 +672,8 @@ testCompareXMLToArgv(const void *data) if (testCheckExclusiveFlags(info->flags) < 0) goto cleanup; - if (!(xml =3D virXMLParse(info->infile, NULL, "(domain_definition)", N= ULL, false))) + if (!(xml =3D virXMLParse(info->infile, NULL, "(domain_definition)", + NULL, NULL, NULL, false))) goto cleanup; root =3D xmlDocGetRootElement(xml); --=20 2.37.3