From nobody Sun Feb 8 17:41:21 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.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=1664872420; cv=none; d=zohomail.com; s=zohoarc; b=AJsxWtICWsLdg3Rqp1uE0WBY8miFptjbHduPnF7t6PijkZeYNfHw+05QAirOnQs+N4Isv4eV1AmIyQ/oQU2jp/laKybyebxLyMfMtnNUiEfbHQh2u8V5QxlZGMn6tGnW3lnfxeYYzvz2zakYHEV6UYqSp/oQtdPsUQJNuRhm+d0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664872420; 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=qvDtxCv9T1rdhx7kwY+hYB1foZUnDYloOJ7Y/it/M6g=; b=lYwADsH0ZodXeBssZ43XeEiX9iJi3XMFYk/fP8/l97C3U1CwtVfvVIGEcw7OjaZRj8AOAUrPcAd4Gt3Sa9F21bEeFiVErv9zZCzrnQ6orNfx/ygUmD1LLuxSus6N3JaC87MqenGoyCXsuwdO8gXSeQ3GbA2YmsCXwPaVNfAMy/w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.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.129.124]) by mx.zohomail.com with SMTPS id 1664872420813956.1769646479646; Tue, 4 Oct 2022 01:33:40 -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-425-skyyS-hWMDOoaGFA9liRug-1; Tue, 04 Oct 2022 04:33:36 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AF6CF100F804; Tue, 4 Oct 2022 08:33:33 +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 8F9C2C15BB3; Tue, 4 Oct 2022 08:33:33 +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 2D2A01946A7A; Tue, 4 Oct 2022 08:33:33 +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 4917819465B5 for ; Tue, 4 Oct 2022 08:33:30 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 3B31840C6EC3; Tue, 4 Oct 2022 08:33:30 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.40.208.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id ACB6A40C6EC2 for ; Tue, 4 Oct 2022 08:33:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664872419; 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=qvDtxCv9T1rdhx7kwY+hYB1foZUnDYloOJ7Y/it/M6g=; b=GEJt8kxPicm1RdH+Hr8Hsz6qH+mszVAUWWeNA1V9uR0HGKKicb5vxqZQfH2Cw8b0t7hol4 y8Cca2zJQxLb+ayiBTV/zHTyGPJQD9UsOTFNdCuVwLqmebhQVMg0hYIz+yxrilFb6LDjxi je4WP2/bd+RT0ubwrsElEKy12lOQRkA= X-MC-Unique: skyyS-hWMDOoaGFA9liRug-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 12/43] testParseXMLDocFromFile: Remove 'type' argument Date: Tue, 4 Oct 2022 10:32:46 +0200 Message-Id: <095fa18e4dee67430806baa20d1f2c93cc69a856.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.8 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: 1664872421193100005 Content-Type: text/plain; charset="utf-8" virXMLParse ignores the 'url' argument which is what 'type' was passed to it as when a filename is used as source for the XML. Signed-off-by: Peter Krempa --- src/test/test_driver.c | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 5740f54a58..26c6c95c28 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -842,8 +842,7 @@ testDomainObjCheckTaint(virDomainObj *obj) static xmlNodePtr testParseXMLDocFromFile(xmlNodePtr node, - const char *file, - const char *type) + const char *file) { g_autoptr(xmlDoc) doc =3D NULL; g_autofree char *relFile =3D NULL; @@ -852,7 +851,7 @@ testParseXMLDocFromFile(xmlNodePtr node, g_autofree char *absFile =3D testBuildFilename(file, relFile); xmlNodePtr newnode =3D NULL; - if (!(doc =3D virXMLParse(absFile, NULL, type, NULL, NULL, NULL, f= alse))) + if (!(doc =3D virXMLParse(absFile, NULL, NULL, NULL, NULL, NULL, f= alse))) return NULL; if (!(newnode =3D xmlCopyNode(xmlDocGetRootElement(doc), 1))) { @@ -969,8 +968,7 @@ testParseDomainSnapshots(testDriver *privconn, for (i =3D 0; i < nsdata->num_snap_nodes; i++) { virDomainMomentObj *snap; g_autoptr(virDomainSnapshotDef) def =3D NULL; - xmlNodePtr node =3D testParseXMLDocFromFile(nodes[i], file, - "domainsnapshot"); + xmlNodePtr node =3D testParseXMLDocFromFile(nodes[i], file); if (!node) return -1; @@ -1024,7 +1022,7 @@ testParseDomains(testDriver *privconn, for (i =3D 0; i < num; i++) { g_autoptr(virDomainDef) def =3D NULL; testDomainNamespaceDef *nsdata; - xmlNodePtr node =3D testParseXMLDocFromFile(nodes[i], file, "domai= n"); + xmlNodePtr node =3D testParseXMLDocFromFile(nodes[i], file); if (!node) goto error; @@ -1088,7 +1086,7 @@ testParseNetworks(testDriver *privconn, for (i =3D 0; i < num; i++) { g_autoptr(virNetworkDef) def =3D NULL; - xmlNodePtr node =3D testParseXMLDocFromFile(nodes[i], file, "netwo= rk"); + xmlNodePtr node =3D testParseXMLDocFromFile(nodes[i], file); if (!node) return -1; @@ -1124,8 +1122,7 @@ testParseInterfaces(testDriver *privconn, for (i =3D 0; i < num; i++) { g_autoptr(virInterfaceDef) def =3D NULL; - xmlNodePtr node =3D testParseXMLDocFromFile(nodes[i], file, - "interface"); + xmlNodePtr node =3D testParseXMLDocFromFile(nodes[i], file); if (!node) return -1; @@ -1165,8 +1162,7 @@ testOpenVolumesForPool(const char *file, return -1; for (i =3D 0; i < num; i++) { - xmlNodePtr node =3D testParseXMLDocFromFile(nodes[i], file, - "volume"); + xmlNodePtr node =3D testParseXMLDocFromFile(nodes[i], file); if (!node) return -1; @@ -1209,8 +1205,7 @@ testParseStorage(testDriver *privconn, for (i =3D 0; i < num; i++) { virStoragePoolDef *def; - xmlNodePtr node =3D testParseXMLDocFromFile(nodes[i], file, - "pool"); + xmlNodePtr node =3D testParseXMLDocFromFile(nodes[i], file); if (!node) return -1; @@ -1258,8 +1253,8 @@ testParseNodedevs(testDriver *privconn, for (i =3D 0; i < num; i++) { virNodeDeviceDef *def; - xmlNodePtr node =3D testParseXMLDocFromFile(nodes[i], file, - "nodedev"); + xmlNodePtr node =3D testParseXMLDocFromFile(nodes[i], file); + if (!node) return -1; --=20 2.37.3