From nobody Mon Feb 2 05:55:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769610708; cv=none; d=zohomail.com; s=zohoarc; b=C/5gYmT347TBWMXHmYh5vkGU3mll4AMT2gW6N0FVQlfwmN22WqJD/migbdU2uW2gSFDA7Z/jkTZk7aVV+pRiM5jKPqtBqvIwQFm99tEO9xDEh31UGxy401phFNMeXdOiRUaewxYOVu88zrMRtgvclTVB8TdWdhOutsepqqFv+pk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769610708; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=mrOBcZVy5/RZR6bpEPsVP2AEWtDLRn+mbbg2pSGUMLo=; b=RzWSGvPXSG3ry4mCbHq963l+AXiCinqCI7rlfABUzLVGvKRSzLi+LcGuipCYYe+T571FF8jWqY1oTpPX0auZz+pGMk/u43JOYPRFRSoCwN9aHGe8O2rriB1Hmp3mOSgfMTY4DvYYoRG56LT07PVOruqXkxY0R4pLNtYRfy1DMGY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769610708178136.44412111806798; Wed, 28 Jan 2026 06:31:48 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 36D55419D9; Wed, 28 Jan 2026 09:31:47 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 42C5641AAD; Wed, 28 Jan 2026 09:30:58 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 56F134182D; Wed, 28 Jan 2026 09:30:52 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 9178941891 for ; Wed, 28 Jan 2026 09:30:50 -0500 (EST) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-460-hUOhlexXN16ujEkVzhuudg-1; Wed, 28 Jan 2026 09:30:48 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C56DC1955D4A for ; Wed, 28 Jan 2026 14:30:47 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2E469195419A for ; Wed, 28 Jan 2026 14:30:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769610650; h=from:from: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; bh=mrOBcZVy5/RZR6bpEPsVP2AEWtDLRn+mbbg2pSGUMLo=; b=C3U1kn9BoU35p1AIndkgm/tEoApEAY3vd7fDks4OA1F1irCiOYJnz7FmT/5znSdahCgzV3 V+PbSkCKxkA6ETaJarUQUfBU+a68oIIsaUa8lyKRGQcWBeTk0dsXkCC3LxvWNwfW4H13je TgDwP3SPpWN/rO7l034R5aEhWFkCMlY= X-MC-Unique: hUOhlexXN16ujEkVzhuudg-1 X-Mimecast-MFC-AGG-ID: hUOhlexXN16ujEkVzhuudg_1769610647 To: devel@lists.libvirt.org Subject: [PATCH 01/20] tests: Avoid crossdir inclusion for networkxml2* tests Date: Wed, 28 Jan 2026 15:30:22 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 0vyKoDgB852ilSXFXIEJDxjgN4a1tY4PuIrR9Th5wpo_1769610647 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: AP33QMTQ53W5SH3N5IGKXQJZ7C76AIUG X-Message-ID-Hash: AP33QMTQ53W5SH3N5IGKXQJZ7C76AIUG X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769610714186158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Instead of including network driver header files as: #include "network/header.h" pass network_inc_dir to the compiler and include files directly. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- tests/meson.build | 6 +++--- tests/networkxml2conftest.c | 2 +- tests/networkxml2firewalltest.c | 2 +- tests/networkxml2xmltest.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/meson.build b/tests/meson.build index b963047732..4b93fb405a 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -407,9 +407,9 @@ endif =20 if conf.has('WITH_NETWORK') tests +=3D [ - { 'name': 'networkxml2conftest', 'link_with': [ network_driver_impl ] = }, - { 'name': 'networkxml2firewalltest', 'link_with': [ network_driver_imp= l ] }, - { 'name': 'networkxml2xmltest', 'link_with': [ network_driver_impl ] }, + { 'name': 'networkxml2conftest', 'include': [ network_inc_dir ], 'link= _with': [ network_driver_impl ] }, + { 'name': 'networkxml2firewalltest', 'include': [ network_inc_dir ], '= link_with': [ network_driver_impl ] }, + { 'name': 'networkxml2xmltest', 'include': [ network_inc_dir ], 'link_= with': [ network_driver_impl ], }, ] endif =20 diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c index d18985e060..40b9d07d31 100644 --- a/tests/networkxml2conftest.c +++ b/tests/networkxml2conftest.c @@ -9,7 +9,7 @@ #include "testutils.h" #include "network_conf.h" #include "viralloc.h" -#include "network/bridge_driver.h" +#include "bridge_driver.h" #define LIBVIRT_VIRCOMMANDPRIV_H_ALLOW #include "vircommandpriv.h" =20 diff --git a/tests/networkxml2firewalltest.c b/tests/networkxml2firewalltes= t.c index f7b87ff798..e32f1b281e 100644 --- a/tests/networkxml2firewalltest.c +++ b/tests/networkxml2firewalltest.c @@ -27,7 +27,7 @@ =20 # include =20 -# include "network/bridge_driver_platform.h" +# include "bridge_driver_platform.h" # include "virbuffer.h" # include "virmock.h" =20 diff --git a/tests/networkxml2xmltest.c b/tests/networkxml2xmltest.c index 0783d84915..59266defb6 100644 --- a/tests/networkxml2xmltest.c +++ b/tests/networkxml2xmltest.c @@ -8,7 +8,7 @@ #include "internal.h" #include "testutils.h" #include "network_conf.h" -#include "network/bridge_driver.h" +#include "bridge_driver.h" =20 #define VIR_FROM_THIS VIR_FROM_NONE =20 --=20 2.52.0 From nobody Mon Feb 2 05:55:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769610875; cv=none; d=zohomail.com; s=zohoarc; b=F/ZjKgo4hyytAY+04TmwUnWyMVC1vEHygz7EsqeongNEU+OKrgzy+kQyxP0LCwms3fypH4pfw/Qzxooxil4hNQeEZOVu8zkbZpwYbnp4lHGrXE3xGneqpLKm7gHaB56K0Vwt3oYhyEa2ZlAO6pB3qA4bKxr2y3KxgeJHslBlXe0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769610875; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=+087hq8fqmor7FEXTh013aqmLsifdqiHp6O0HP13WHI=; b=bnhAdSpxnnL8b6DEiRNHeX4Jvbxodzy98Dl69J+eXgKKymJR8MAy+WwnzMQwC4s2wcb3YILBzCnuK6Liam+Vwp8A2eVfNV8EwgI4+dcKK9DTGEqXC2O/91D5pLgbrgMKEOmjzwXS6PnhozyEl40T/hgRyJmebQ9zECKEZWQVIdU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769610874993956.1667837191051; Wed, 28 Jan 2026 06:34:34 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 2896941B94; Wed, 28 Jan 2026 09:34:34 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 5646743E3C; Wed, 28 Jan 2026 09:31:04 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id C84613F88F; Wed, 28 Jan 2026 09:30:54 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id A835D3F88F for ; Wed, 28 Jan 2026 09:30:53 -0500 (EST) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-407-q-q_0nOAM4yjBpEqpxTVEw-1; Wed, 28 Jan 2026 09:30:49 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D0A4A19775E8 for ; Wed, 28 Jan 2026 14:30:48 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 359C2195419E for ; Wed, 28 Jan 2026 14:30:47 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769610653; h=from:from: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; bh=+087hq8fqmor7FEXTh013aqmLsifdqiHp6O0HP13WHI=; b=H+ch+HFK1ZfgXR6r6iPTDNdjJA7aecnzXtMNpYWtwmlG1UQSsJZkyVcAb9MYrD+QvuKn3H vziVH+UlZUKUUlcKltBMnJzzAdBtsDJTz0IBVXaUD/ia2f+SbLLTQokTUImPDikxU6CHnN gJ3xuFudzrj7JH+z8inh5It0jGxjjBA= X-MC-Unique: q-q_0nOAM4yjBpEqpxTVEw-1 X-Mimecast-MFC-AGG-ID: q-q_0nOAM4yjBpEqpxTVEw_1769610649 To: devel@lists.libvirt.org Subject: [PATCH 02/20] network: Separate private APIs declaration to bridge_driver_priv.h Date: Wed, 28 Jan 2026 15:30:23 +0100 Message-ID: <281c259088252cec5113812b688194d2b0965d31.1769610369.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: lTSEkMK13kbISl3wAfG8IzH2v13wFoo9nXw8tuQGwpk_1769610649 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: EUDYCQDDMQ3X3CGR46SQPRSHMGZFOH2J X-Message-ID-Hash: EUDYCQDDMQ3X3CGR46SQPRSHMGZFOH2J X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769610876915158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik There are two functions implemented in bridge_driver.c that are used in tests (networkDnsmasqCreateXMLConf() and networkDnsmasqConfContents()) but are declared in bridge_driver.h. This goes against our current practice where such APIs are declared in $name_priv.h. Therefore, move those APIs to bridge_driver_priv.h Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/network/bridge_driver.c | 2 ++ src/network/bridge_driver.h | 15 ----------- .../{bridge_driver.h =3D> bridge_driver_priv.h} | 27 +++++-------------- tests/networkxml2conftest.c | 2 ++ tests/networkxml2xmltest.c | 2 ++ 5 files changed, 12 insertions(+), 36 deletions(-) copy src/network/{bridge_driver.h =3D> bridge_driver_priv.h} (32%) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 8b5dbb3ab7..d7004771b7 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -39,6 +39,8 @@ #include "virerror.h" #include "datatypes.h" #include "bridge_driver.h" +#define LIBVIRT_BRIDGE_DRIVER_PRIV_H_ALLOW +#include "bridge_driver_priv.h" #include "bridge_driver_platform.h" #include "driver.h" #include "virbuffer.h" diff --git a/src/network/bridge_driver.h b/src/network/bridge_driver.h index fddc3dc8cf..64af68c1e0 100644 --- a/src/network/bridge_driver.h +++ b/src/network/bridge_driver.h @@ -21,20 +21,5 @@ =20 #pragma once =20 -#include "internal.h" -#include "virdnsmasq.h" -#include "virnetworkobj.h" - -virNetworkXMLOption * -networkDnsmasqCreateXMLConf(void); - int networkRegister(void); - -int -networkDnsmasqConfContents(virNetworkObj *obj, - const char *pidfile, - char **configstr, - char **hostsfilestr, - dnsmasqContext *dctx, - dnsmasqCaps *caps); diff --git a/src/network/bridge_driver.h b/src/network/bridge_driver_priv.h similarity index 32% copy from src/network/bridge_driver.h copy to src/network/bridge_driver_priv.h index fddc3dc8cf..7f21ed7ad6 100644 --- a/src/network/bridge_driver.h +++ b/src/network/bridge_driver_priv.h @@ -1,36 +1,21 @@ /* - * bridge_driver.h: core driver methods for managing networks + * bridge_driver_priv.h: private declarations for network driver * - * Copyright (C) 2006-2016 Red Hat, Inc. - * Copyright (C) 2006 Daniel P. Berrange - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * This library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with this library. If not, see - * . + * SPDX-License-Identifier: LGPL-2.1-or-later */ =20 +#ifndef LIBVIRT_BRIDGE_DRIVER_PRIV_H_ALLOW +# error "bridge_driver_priv.h may only be included by bridge_driver.c or t= est suites" +#endif /* LIBVIRT_BRIDGE_DRIVER_PRIV_H_ALLOW */ + #pragma once =20 -#include "internal.h" #include "virdnsmasq.h" #include "virnetworkobj.h" =20 virNetworkXMLOption * networkDnsmasqCreateXMLConf(void); =20 -int -networkRegister(void); - int networkDnsmasqConfContents(virNetworkObj *obj, const char *pidfile, diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c index 40b9d07d31..70fb3a37b9 100644 --- a/tests/networkxml2conftest.c +++ b/tests/networkxml2conftest.c @@ -10,6 +10,8 @@ #include "network_conf.h" #include "viralloc.h" #include "bridge_driver.h" +#define LIBVIRT_BRIDGE_DRIVER_PRIV_H_ALLOW +#include "bridge_driver_priv.h" #define LIBVIRT_VIRCOMMANDPRIV_H_ALLOW #include "vircommandpriv.h" =20 diff --git a/tests/networkxml2xmltest.c b/tests/networkxml2xmltest.c index 59266defb6..840bcaa83f 100644 --- a/tests/networkxml2xmltest.c +++ b/tests/networkxml2xmltest.c @@ -9,6 +9,8 @@ #include "testutils.h" #include "network_conf.h" #include "bridge_driver.h" +#define LIBVIRT_BRIDGE_DRIVER_PRIV_H_ALLOW +#include "bridge_driver_priv.h" =20 #define VIR_FROM_THIS VIR_FROM_NONE =20 --=20 2.52.0 From nobody Mon Feb 2 05:55:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769610813; cv=none; d=zohomail.com; s=zohoarc; b=Sf3b/YRvKt08MA1wILoUQ5OvAEPozIesTnBUmbJb8e8cK/phTt/fOjEc2ybAp0b2iWfyIBgpUA5vCKNWQz2/tezKPC93jX91kJq22RCVOK4B+rE85HwBlLrBMg5/XAV7nYX1xkZ9UsNRbgkME1yXuFQ/N0idApDY3j3l4Tv3Xvg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769610813; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=iRLfF0fOrtR+Am4KK1EVD1fBmFj+m3B3F9tEbmAEeBw=; b=byCLqXvmCLsF8NGczRaAwE2rSpdu6AUroLnhWmIGzq4xYIFIk78tT40JxwUF4AojGtYy6jHZDAvE4VoE4J1wnsp9qKI596CvnaofAXLikpu0qLZc+zNjhyk52w1/R/4OFBd+Js/vgO9tJSCLtBZHVd3/v/Y/rBByI2S2eFsIblw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769610813311144.51225296780103; Wed, 28 Jan 2026 06:33:33 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 4E3EB43DB8; Wed, 28 Jan 2026 09:33:32 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id B3F2F43DD8; Wed, 28 Jan 2026 09:31:03 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 1946B3F30A; Wed, 28 Jan 2026 09:30:54 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 85ED13F30A for ; Wed, 28 Jan 2026 09:30:53 -0500 (EST) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-45-1UkR2Iu1NN-3xwitzf546A-1; Wed, 28 Jan 2026 09:30:50 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E12771800614 for ; Wed, 28 Jan 2026 14:30:49 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4AD40195419E for ; Wed, 28 Jan 2026 14:30:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769610653; h=from:from: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; bh=iRLfF0fOrtR+Am4KK1EVD1fBmFj+m3B3F9tEbmAEeBw=; b=SU1A2UIryspfbTfmJFKrnHMM2OPQiK5ywE4B+g0I4cL1oiGtQD5W9Q8gr4fg+F2Kg1nvSY fKwVeSc49KCfNUA6Ia/IvW702RV85HH7g5Ls0cHzHbL8BwxefEt1Mt1eKmVeIlcAb7ShkX kFPcbbcN0ViJ4vX2GQFl89ZzRh4Civo= X-MC-Unique: 1UkR2Iu1NN-3xwitzf546A-1 X-Mimecast-MFC-AGG-ID: 1UkR2Iu1NN-3xwitzf546A_1769610650 To: devel@lists.libvirt.org Subject: [PATCH 03/20] network: Move decision on dnsmasq need into a separate function Date: Wed, 28 Jan 2026 15:30:24 +0100 Message-ID: <58abe7c8495e82284629a04be956c9bdf1e3185f.1769610369.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: ARXrKp-_unotY31i10LkM7A7zY-Q4DEFz_YjnALLKN4_1769610650 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 2OVNWMMFGZZSW6ADZFB24TPNYULUP5GJ X-Message-ID-Hash: 2OVNWMMFGZZSW6ADZFB24TPNYULUP5GJ X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769610814474158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Whether a network needs dnsmasq or not is decided at the beginning of networkStartDhcpDaemon(). Move that code into a separate function so it can be reused later. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/network/bridge_driver.c | 36 ++++++++++++++++++++------------ src/network/bridge_driver_priv.h | 3 +++ 2 files changed, 26 insertions(+), 13 deletions(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index d7004771b7..e7a4e5e1b7 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -1516,34 +1516,44 @@ networkBuildDhcpDaemonCommandLine(virNetworkDriverS= tate *driver, } =20 =20 -static int -networkStartDhcpDaemon(virNetworkDriverState *driver, - virNetworkObj *obj) +bool +networkNeedsDnsmasq(const virNetworkDef* def) { - g_autoptr(virNetworkDriverConfig) cfg =3D virNetworkDriverGetConfig(dr= iver); - virNetworkDef *def =3D virNetworkObjGetDef(obj); virNetworkIPDef *ipdef; size_t i; - bool needDnsmasq =3D false; - g_autoptr(virCommand) cmd =3D NULL; - g_autofree char *pidfile =3D NULL; - pid_t dnsmasqPid; - g_autoptr(dnsmasqContext) dctx =3D NULL; =20 /* see if there are any IP addresses that need a dhcp server */ i =3D 0; while ((ipdef =3D virNetworkDefGetIPByIndex(def, AF_UNSPEC, i))) { i++; if (ipdef->nranges || ipdef->nhosts || ipdef->tftproot) - needDnsmasq =3D true; + return true; } =20 /* no IP addresses at all, so we don't need to run */ if (i =3D=3D 0) - return 0; + return false; =20 /* no DHCP services needed, and user disabled DNS service */ - if (!needDnsmasq && def->dns.enable =3D=3D VIR_TRISTATE_BOOL_NO) + if (def->dns.enable =3D=3D VIR_TRISTATE_BOOL_NO) + return false; + + return true; +} + + +static int +networkStartDhcpDaemon(virNetworkDriverState *driver, + virNetworkObj *obj) +{ + g_autoptr(virNetworkDriverConfig) cfg =3D virNetworkDriverGetConfig(dr= iver); + virNetworkDef *def =3D virNetworkObjGetDef(obj); + g_autoptr(virCommand) cmd =3D NULL; + g_autofree char *pidfile =3D NULL; + pid_t dnsmasqPid; + g_autoptr(dnsmasqContext) dctx =3D NULL; + + if (!networkNeedsDnsmasq(def)) return 0; =20 if (g_mkdir_with_parents(cfg->pidDir, 0777) < 0) { diff --git a/src/network/bridge_driver_priv.h b/src/network/bridge_driver_p= riv.h index 7f21ed7ad6..c7d1d8268d 100644 --- a/src/network/bridge_driver_priv.h +++ b/src/network/bridge_driver_priv.h @@ -23,3 +23,6 @@ networkDnsmasqConfContents(virNetworkObj *obj, char **hostsfilestr, dnsmasqContext *dctx, dnsmasqCaps *caps); + +bool +networkNeedsDnsmasq(const virNetworkDef* def); --=20 2.52.0 From nobody Mon Feb 2 05:55:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769610760; cv=none; d=zohomail.com; s=zohoarc; b=TKf0nXP46nF8NPLgQ3JZMXEpl1/R4CYgXgUT60VZHFalE6EO5ta8n//xnNsYrdI/kaenzu+PRxLm/3+DEr4AgaQ61ogM5TEhPEH2cl9e27EQ/WGHx9ekZn2lLcZKxDTt3H8qBqNdlVSki1PSI6z/YCvPFzmbIB9evp6q/ufFVMo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769610760; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=Z2zwYeBHC8fHp+DlsngHKcbE8UD0AiKf6Fm75fXSjmQ=; b=Gku6We12tog8gBGbT/HVFEePCfNomTe4A7feKrlVNGOphebgzuhvoUphlv8CmZqWHyBL7SzXxlHopFIzA3TMGle9k9XjDUrxFIGed3vHlU+EPNAv/Gfq7NHXmT0Nu9L8li3vZiqum3i+Ywzh5YVBdqLygy7kLudT31LThInwHo0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769610760069312.54636527575474; Wed, 28 Jan 2026 06:32:40 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 0B87941A34; Wed, 28 Jan 2026 09:32:40 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id E3F6F41BEA; Wed, 28 Jan 2026 09:31:00 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 0A737417D6; Wed, 28 Jan 2026 09:30:54 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 9884F3F86C for ; Wed, 28 Jan 2026 09:30:53 -0500 (EST) Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-94-9au8WmlCOimj_9T-WVc_Pg-1; Wed, 28 Jan 2026 09:30:51 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DF3A21944EB7 for ; Wed, 28 Jan 2026 14:30:50 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 493F519541AA for ; Wed, 28 Jan 2026 14:30:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769610653; h=from:from: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; bh=Z2zwYeBHC8fHp+DlsngHKcbE8UD0AiKf6Fm75fXSjmQ=; b=RBCvTovVe7skFNXldouq0fhY04UIsaJkKSCPBAw9mCCBwLXYGE9Owr0GxCiV310xuTcp2B 9O2oUbxm2FQikTvXH5OxanIbGOFwa4yE3Y9xgADMUrLYLsg+Ly24n06NOeOD3ZMsNsQNzg nH40xZPWTq14t21rLS2kUcFTF+bFeoo= X-MC-Unique: 9au8WmlCOimj_9T-WVc_Pg-1 X-Mimecast-MFC-AGG-ID: 9au8WmlCOimj_9T-WVc_Pg_1769610651 To: devel@lists.libvirt.org Subject: [PATCH 04/20] networkxml2conftest: Drop routed-network-no-dns test case Date: Wed, 28 Jan 2026 15:30:25 +0100 Message-ID: <4e2e794eb964f42ddfc1c0b18764bb1bf4a74d43.1769610369.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: cTxmUk9skJ0meOwX-mYclI3uuC0BbZNE9BqSnnXoa60_1769610651 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 7I4DU3FLVDTUH4H2C6PUVI6D5GUGE6EW X-Message-ID-Hash: 7I4DU3FLVDTUH4H2C6PUVI6D5GUGE6EW X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769610762172158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik This test case is spurious. If this was real life scenario then no dnsmasq would be spawned and yet, the test tries to generate dnsmasq config for it. Just drop the test case and move on. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- tests/networkxml2confdata/routed-network-no-dns.conf | 11 ----------- tests/networkxml2confdata/routed-network-no-dns.xml | 10 ---------- tests/networkxml2conftest.c | 1 - 3 files changed, 22 deletions(-) delete mode 100644 tests/networkxml2confdata/routed-network-no-dns.conf delete mode 100644 tests/networkxml2confdata/routed-network-no-dns.xml diff --git a/tests/networkxml2confdata/routed-network-no-dns.conf b/tests/n= etworkxml2confdata/routed-network-no-dns.conf deleted file mode 100644 index 83cc85ea6b..0000000000 --- a/tests/networkxml2confdata/routed-network-no-dns.conf +++ /dev/null @@ -1,11 +0,0 @@ -##WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE -##OVERWRITTEN AND LOST. Changes to this configuration should be made usin= g: -## virsh net-edit local -## or other application using the libvirt API. -## -## dnsmasq conf file created by libvirt -strict-order -port=3D0 -except-interface=3Dlo -bind-dynamic -interface=3Dvirbr1 diff --git a/tests/networkxml2confdata/routed-network-no-dns.xml b/tests/ne= tworkxml2confdata/routed-network-no-dns.xml deleted file mode 100644 index 70d041745d..0000000000 --- a/tests/networkxml2confdata/routed-network-no-dns.xml +++ /dev/null @@ -1,10 +0,0 @@ - - local - 81ff0d90-c91e-6742-64da-4a736edb9a9b - - - - - - - diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c index 70fb3a37b9..aa0adbdd52 100644 --- a/tests/networkxml2conftest.c +++ b/tests/networkxml2conftest.c @@ -174,7 +174,6 @@ mymain(void) DO_TEST("nat-network-dns-srv-record-minimal", full); DO_TEST("nat-network-name-with-quotes", full); DO_TEST("routed-network", full); - DO_TEST("routed-network-no-dns", full); DO_TEST("open-network", full); DO_TEST("nat-network", full); DO_TEST("nat-network-dns-txt-record", full); --=20 2.52.0 From nobody Mon Feb 2 05:55:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769611111; cv=none; d=zohomail.com; s=zohoarc; b=e29GHfB2NZEDtdaYA2hDKzwUKNVn6LkP9nQ8MsvsaGsk1nckwMJrJgnxBDHf4AakrwVmRm24YpmHKUu2H0flYFcTofQ7o7UBsQdeXhWjl69ZkwV2tpRdacmgyqYsgO48RSg2RmyDIL0A5X/C6aacEVCQqRs/vhZYvostmioWnnE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769611111; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=X6NSAcztvu9/xWaUI3BZLXdtvNYq6+8t0seLTEf2/Z4=; b=ZCy7VOcLf/yMb+tAniiWi1yuEaol+dIrBNzLCungEnKf8b1uwGedrWXBK1sq5B3Gg3Dx6n1GtOBTq8NxKNJapY5Lhz/fcrtndv4nzfK8O20fljK4+vpPGjQWfDbZxSBaMFwIdKxCAIrS38Y9eEi9pkWWPheUCSJmKLXiLDB6C6w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769611111529417.63988334194926; Wed, 28 Jan 2026 06:38:31 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id B2D7D43E51; Wed, 28 Jan 2026 09:38:30 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id EEE6543F07; Wed, 28 Jan 2026 09:31:07 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 4FA994189C; Wed, 28 Jan 2026 09:31:00 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id CAC9141891 for ; Wed, 28 Jan 2026 09:30:54 -0500 (EST) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-191-N3fMHIUjPZShrL8noPRiwQ-1; Wed, 28 Jan 2026 09:30:52 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E918D18005BD for ; Wed, 28 Jan 2026 14:30:51 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 48153195419E for ; Wed, 28 Jan 2026 14:30:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769610654; h=from:from: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; bh=X6NSAcztvu9/xWaUI3BZLXdtvNYq6+8t0seLTEf2/Z4=; b=Y6ePA31XP7hjdSm/yDD+XvSP1Om/h9ZrjlQ91jBiJh/c+/zV+ZysmJofE1POhJ0MoKIF9Q byVQ+Yp9SmuWBCcLNjQhMhVdvHeLgo6byri40hHZzf02QxfYSYIf0ixR3w17/BGykR1XFj YQU6ztJ9dLtp59AM2fsPEpGeulC6xe4= X-MC-Unique: N3fMHIUjPZShrL8noPRiwQ-1 X-Mimecast-MFC-AGG-ID: N3fMHIUjPZShrL8noPRiwQ_1769610652 To: devel@lists.libvirt.org Subject: [PATCH 05/20] networkxml2conftest: Fail tests where no dnsmasq would be spawned Date: Wed, 28 Jan 2026 15:30:26 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: yPiUlWPeUEGz8IlKR_8IPgVLVnLUVQ430-QfdZnrLsM_1769610652 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: E54VRBMX5BEFVYTILWMKVW2NYNA37IF2 X-Message-ID-Hash: E54VRBMX5BEFVYTILWMKVW2NYNA37IF2 X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769611112963158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik If network config does not require dnsmasq then none is spawned. Having a test case that would still require generating dnsmasq config is weird and can lead to spurious results. Just fail such test case. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- tests/networkxml2conftest.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c index aa0adbdd52..59ab3a402b 100644 --- a/tests/networkxml2conftest.c +++ b/tests/networkxml2conftest.c @@ -41,6 +41,11 @@ testCompareXMLToConfFiles(const char *inxml, const char = *outconf, =20 virNetworkObjSetDef(obj, def); =20 + if (!networkNeedsDnsmasq(def)) { + VIR_TEST_VERBOSE("spurious request to generate conf files. Would n= ot start dnsmasq in real life scenario"); + goto fail; + } + dctx =3D dnsmasqContextNew(def->name, "/var/lib/libvirt/dnsmasq"); =20 if (dctx =3D=3D NULL) --=20 2.52.0 From nobody Mon Feb 2 05:55:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769611196; cv=none; d=zohomail.com; s=zohoarc; b=WSwsVXuSJ+xBv1hyTa8xsgr0lATdgXSFTvNrEMrCRCnkUuuMPeUF/0lnjvlcwU6k4Dvag49neyhRGmOmEVEG2d+4PZlKpdLG9IXOV2p8aArLLZxmsdqFyYFyMj4GEsnAWfKZRRX1EfVsLTDpOz/xWvctykLG/vfm1ZElmb6msa4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769611196; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=FaQJQKLpDGDnideiBvS+kKxRmyZ8+K+HgxFWYVuQKag=; b=TswjhFxUY0PAGi7UZKScJCNQLlVZ6caX6B5eOIAXcCRv9VF/8sw7caLNk6XGWVUhUrQVHuUPB8Xk2t4IinRXItM/OAUGCQ6BCjxZy4IoAJoXvvTpey1zbGgxd36d9BCUM5E3Gw6StkwF7sE6ie6fBG2YQL7KdjzJHuShEuiSOgw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769611196247979.0899940724438; Wed, 28 Jan 2026 06:39:56 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 6E95A43F33; Wed, 28 Jan 2026 09:39:55 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id A09BF43F69; Wed, 28 Jan 2026 09:31:14 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 877A043F1B; Wed, 28 Jan 2026 09:31:10 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 73F28418BD for ; Wed, 28 Jan 2026 09:30:55 -0500 (EST) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-146-rWel7Y9_N_qblL1pEAwjcg-1; Wed, 28 Jan 2026 09:30:53 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E7DDC1800614 for ; Wed, 28 Jan 2026 14:30:52 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5113619541B2 for ; Wed, 28 Jan 2026 14:30:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769610655; h=from:from: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; bh=FaQJQKLpDGDnideiBvS+kKxRmyZ8+K+HgxFWYVuQKag=; b=NiYqOZd2fFz58J4+ZvuEbdK/a2gMZTh5K2ThKo0wzRdOgtKHItm8FCgAyfQyCb2vn7zIDa OFZwJ8myApQcVg7jaEbNsA+S3e9jI/j3ToBWMGAtBZB60mUY1zEnaaO/lIrV9SnsqOC8Bk /z6lG+P2e7BP3Yb3kvANElkojYCiAMs= X-MC-Unique: rWel7Y9_N_qblL1pEAwjcg-1 X-Mimecast-MFC-AGG-ID: rWel7Y9_N_qblL1pEAwjcg_1769610653 To: devel@lists.libvirt.org Subject: [PATCH 06/20] networkxml2xmltest: Update couple of test cases Date: Wed, 28 Jan 2026 15:30:27 +0100 Message-ID: <44a10840a84f3f6a4f849ff9954623c924112959.1769610369.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: oDnVNkP90V3YRQ15jx3W0TGFM77veamDHKQPGT1x7Qw_1769610653 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: KVENDEY3KMKXSLAAU73FNDE76REWE4GS X-Message-ID-Hash: KVENDEY3KMKXSLAAU73FNDE76REWE4GS X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769611197383158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Soon, individual test cases of networkxml2xmltest will be subject to networkValidate() call. This means, that input XMLs must be valid (or marked as expected fail). Anyway, there are couple of offenders: 1) 8021Qbh-net.xml setting vlan for is unsupported, 2) hostdev.xml networkValidate() will check if hostdevs specified for are VFs. Use PCI addresses from virpcimock. 3) openvswitch-net.xml for only openvswitch type of virtualports is allowed. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- tests/networkxml2xmlin/8021Qbh-net.xml | 3 --- tests/networkxml2xmlin/hostdev.xml | 6 ++---- tests/networkxml2xmlin/openvswitch-net.xml | 6 +++--- tests/networkxml2xmlout/8021Qbh-net.xml | 3 --- tests/networkxml2xmlout/hostdev.xml | 6 ++---- tests/networkxml2xmlout/openvswitch-net.xml | 6 +++--- tests/networkxml2xmlupdateout/openvswitch-net-modified.xml | 4 ++-- .../openvswitch-net-more-portgroups.xml | 6 +++--- .../openvswitch-net-without-alice.xml | 4 ++-- 9 files changed, 17 insertions(+), 27 deletions(-) diff --git a/tests/networkxml2xmlin/8021Qbh-net.xml b/tests/networkxml2xmli= n/8021Qbh-net.xml index 3aaab61db6..2d779dcac0 100644 --- a/tests/networkxml2xmlin/8021Qbh-net.xml +++ b/tests/networkxml2xmlin/8021Qbh-net.xml @@ -8,9 +8,6 @@ - - - diff --git a/tests/networkxml2xmlin/hostdev.xml b/tests/networkxml2xmlin/ho= stdev.xml index 03f141106f..94974804a7 100644 --- a/tests/networkxml2xmlin/hostdev.xml +++ b/tests/networkxml2xmlin/hostdev.xml @@ -2,9 +2,7 @@ hostdev 81ff0d90-c91e-6742-64da-4a736edb9a9b -
-
-
-
+
+
diff --git a/tests/networkxml2xmlin/openvswitch-net.xml b/tests/networkxml2= xmlin/openvswitch-net.xml index 2f6084d690..30c1e2af10 100644 --- a/tests/networkxml2xmlin/openvswitch-net.xml +++ b/tests/networkxml2xmlin/openvswitch-net.xml @@ -7,7 +7,7 @@ - + @@ -17,7 +17,7 @@ - + @@ -26,7 +26,7 @@ - + diff --git a/tests/networkxml2xmlout/8021Qbh-net.xml b/tests/networkxml2xml= out/8021Qbh-net.xml index 281466a9f7..d4d5b4b443 100644 --- a/tests/networkxml2xmlout/8021Qbh-net.xml +++ b/tests/networkxml2xmlout/8021Qbh-net.xml @@ -8,9 +8,6 @@ - - - diff --git a/tests/networkxml2xmlout/hostdev.xml b/tests/networkxml2xmlout/= hostdev.xml index 03f141106f..94974804a7 100644 --- a/tests/networkxml2xmlout/hostdev.xml +++ b/tests/networkxml2xmlout/hostdev.xml @@ -2,9 +2,7 @@ hostdev 81ff0d90-c91e-6742-64da-4a736edb9a9b -
-
-
-
+
+
diff --git a/tests/networkxml2xmlout/openvswitch-net.xml b/tests/networkxml= 2xmlout/openvswitch-net.xml index 2f6084d690..30c1e2af10 100644 --- a/tests/networkxml2xmlout/openvswitch-net.xml +++ b/tests/networkxml2xmlout/openvswitch-net.xml @@ -7,7 +7,7 @@ - + @@ -17,7 +17,7 @@ - + @@ -26,7 +26,7 @@ - + diff --git a/tests/networkxml2xmlupdateout/openvswitch-net-modified.xml b/t= ests/networkxml2xmlupdateout/openvswitch-net-modified.xml index cc0c344c1b..d52e91e564 100644 --- a/tests/networkxml2xmlupdateout/openvswitch-net-modified.xml +++ b/tests/networkxml2xmlupdateout/openvswitch-net-modified.xml @@ -7,7 +7,7 @@ - + @@ -26,7 +26,7 @@ - + diff --git a/tests/networkxml2xmlupdateout/openvswitch-net-more-portgroups.= xml b/tests/networkxml2xmlupdateout/openvswitch-net-more-portgroups.xml index 7c19ad9f48..069b2a01d8 100644 --- a/tests/networkxml2xmlupdateout/openvswitch-net-more-portgroups.xml +++ b/tests/networkxml2xmlupdateout/openvswitch-net-more-portgroups.xml @@ -18,7 +18,7 @@ - + @@ -28,7 +28,7 @@ - + @@ -37,7 +37,7 @@ - + diff --git a/tests/networkxml2xmlupdateout/openvswitch-net-without-alice.xm= l b/tests/networkxml2xmlupdateout/openvswitch-net-without-alice.xml index 41044240df..2fb0cf9f6d 100644 --- a/tests/networkxml2xmlupdateout/openvswitch-net-without-alice.xml +++ b/tests/networkxml2xmlupdateout/openvswitch-net-without-alice.xml @@ -7,7 +7,7 @@ - + @@ -16,7 +16,7 @@ - + --=20 2.52.0 From nobody Mon Feb 2 05:55:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769611247; cv=none; d=zohomail.com; s=zohoarc; b=JLqCnXFitNVnGOSoFyf/1tki5VzpzNK3vbZ/Z2TtI2LIcq8eBpEWy1xFitWeZ5PMxeCMeWwV4dijwSRpz9SFbw4CEhx8JhIFq1+QkGJWOWliWMd60w/c39ybiBcJl8Uc+mBXQEvCSWOxv/GqRYwecfacmNFwmqXsbXSUMZL7a+I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769611247; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=nfVhtsZlaFJttYmzE8flY8f0DD8fT1Z/plPdoPqhuMs=; b=M3MkoEg2ofPBOFoUdxTua1xkPFPcUIo3YJRveXKUBXsl2StJiux2cLW3UrdL5aE+k7Iv+lMiDZBuW/HI1h3o+t1b1kKbeKcUk2evCb5D4jcfU0oEcoZBz35PZteL42Xu/jLVOpSd89cp6cP40IqTTox7OjFZdlE+EJollb6iOvg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769611247368259.15789418211034; Wed, 28 Jan 2026 06:40:47 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id CBE5E43EC7; Wed, 28 Jan 2026 09:40:46 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 7630A43FAF; Wed, 28 Jan 2026 09:31:22 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 6A15041A3C; Wed, 28 Jan 2026 09:31:18 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 96038419B0 for ; Wed, 28 Jan 2026 09:30:56 -0500 (EST) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-481-s_T18w_yMp2768quXpIrww-1; Wed, 28 Jan 2026 09:30:54 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E60FF19775AE for ; Wed, 28 Jan 2026 14:30:53 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5018E195419A for ; Wed, 28 Jan 2026 14:30:53 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769610656; h=from:from: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; bh=nfVhtsZlaFJttYmzE8flY8f0DD8fT1Z/plPdoPqhuMs=; b=AlONG3uVm0WkehZ2A0Irv3DIkBTCF/+NtApkzHFut9srrBbcSvdON2WrZaETdBLO24lx0b 9sUXYPtrl0HFKLZ3glcmLgOk/B+KclPrUMY91zD3dOcX940h6ZxOT64T51Mv8b3WW3RYIH 68AVnnfW9hjxbbIX57jwdSGdobkmasU= X-MC-Unique: s_T18w_yMp2768quXpIrww-1 X-Mimecast-MFC-AGG-ID: s_T18w_yMp2768quXpIrww_1769610654 To: devel@lists.libvirt.org Subject: [PATCH 07/20] network: Introduce networkValidateTests() Date: Wed, 28 Jan 2026 15:30:28 +0100 Message-ID: <847060c002724f5ceb4d05c13045c7eb0fed60dc.1769610369.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 7gcl5dIFQjH76CWg44utpEOp_sVhnKtAx6VR15vkCiE_1769610654 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: G2ESBUQX5C7B7QKPXVXMWQE4WJQLA2GP X-Message-ID-Hash: G2ESBUQX5C7B7QKPXVXMWQE4WJQLA2GP X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769611250401154100 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik The aim of this internal API is to wrap networkValidate() and it is meant to be called from our tests. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/network/bridge_driver.c | 22 +++++++++++++++++++++- src/network/bridge_driver_priv.h | 3 +++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index e7a4e5e1b7..9636984390 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -2827,6 +2827,17 @@ networkBridgeNameValidate(virNetworkObjList *nets, } =20 =20 +/** + * networkValidate: + * @driver: network driver + * @def: network definition + * + * Validates network definition and fills up blanks. + * Callers, but tests, must provide valid @driver to ensure + * unique bridge name. + * + * Returns: 0 on success, -1 otherwise (with error reported). + */ static int networkValidate(virNetworkDriverState *driver, virNetworkDef *def) @@ -2852,8 +2863,10 @@ networkValidate(virNetworkDriverState *driver, case VIR_NETWORK_FORWARD_OPEN: /* if no bridge name was given in the config, find a name * unused by any other libvirt networks and assign it. + * All callers MUST provide valid @driver, except for tests. */ - if (networkBridgeNameValidate(driver->networks, def) < 0) + if (driver && + networkBridgeNameValidate(driver->networks, def) < 0) return -1; =20 virNetworkSetBridgeMacAddr(def); @@ -3104,6 +3117,13 @@ networkValidate(virNetworkDriverState *driver, } =20 =20 +int +networkValidateTests(virNetworkDef *def) +{ + return networkValidate(NULL, def); +} + + static virNetworkPtr networkCreateXMLFlags(virConnectPtr conn, const char *xml, diff --git a/src/network/bridge_driver_priv.h b/src/network/bridge_driver_p= riv.h index c7d1d8268d..0fdb1d715e 100644 --- a/src/network/bridge_driver_priv.h +++ b/src/network/bridge_driver_priv.h @@ -26,3 +26,6 @@ networkDnsmasqConfContents(virNetworkObj *obj, =20 bool networkNeedsDnsmasq(const virNetworkDef* def); + +int +networkValidateTests(virNetworkDef *def); --=20 2.52.0 From nobody Mon Feb 2 05:55:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769611442; cv=none; d=zohomail.com; s=zohoarc; b=VoRxDCgI1WyMntHo1uekn/pYOGBhdfb1nGPwmKJSMzo9MVJNTVasd8BrPgiRR/I653gRvGOE2nyz7rH5f/HehQTYY1++laKk6u8QY4bE33CLOTik4OFcHJa3c3+ZSCVWirrAYGIH9Xag2Frw4wjeqPyax3yE1xBD4Ts1+ofAyj0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769611442; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=48uuWR9tRIHwOwJoOJjJlPSmwIecqqafyDHV76N5dXI=; b=LmSHr9uris55LQW+c2tRTVDMOYPaZ7/lHj1EtaabE1Zgc0AJDuY19gHhTigN5IFOLTMCmQ1VJ5F7vTs061YT7OVfAVaMGPA2jvzM2rxJybERB1hmqYBN7EVnjMFQ92vZCOXLkF9OqmIowWaUtFdOg7IBvwAAV1ggbGha4koGp9Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769611442872768.0038013047628; Wed, 28 Jan 2026 06:44:02 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id F397F43DD0; Wed, 28 Jan 2026 09:44:01 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id B7D2144019; Wed, 28 Jan 2026 09:32:00 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 3334E4182E; Wed, 28 Jan 2026 09:31:55 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id C8CCE41B11 for ; Wed, 28 Jan 2026 09:30:58 -0500 (EST) Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-215-5M9ONjVzNxCwAQDE0vMpMA-1; Wed, 28 Jan 2026 09:30:55 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E687D193E8DC for ; Wed, 28 Jan 2026 14:30:54 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4F15919541B2 for ; Wed, 28 Jan 2026 14:30:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769610658; h=from:from: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; bh=48uuWR9tRIHwOwJoOJjJlPSmwIecqqafyDHV76N5dXI=; b=bpD9Ze5/VHA1SgD7I27id0s9d9eKGHwEBlCxZEvZvl6l8zmSiHOXNI0tqv/YundD++YxR1 sZR881SIo34RiYotRFIYqmGfDo/lkC63jSneWQ6d6Kj+nIz1Xai4NhRydwhSlhCSaLTlKf 1ilYQoDFHMwNgLWXi2CuBBb+XQhQab0= X-MC-Unique: 5M9ONjVzNxCwAQDE0vMpMA-1 X-Mimecast-MFC-AGG-ID: 5M9ONjVzNxCwAQDE0vMpMA_1769610655 To: devel@lists.libvirt.org Subject: [PATCH 08/20] test: wire up networkValidateTests() Date: Wed, 28 Jan 2026 15:30:29 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: iLtMRdsJQ2B7qpC5NPED_Hr1A9hME8r9fO1bEsi3hig_1769610655 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: ZOXU65VJZX25EPKOS5UQFOBPFCMRGZN4 X-Message-ID-Hash: ZOXU65VJZX25EPKOS5UQFOBPFCMRGZN4 X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769611444813158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Our network driver calls networkValidate() right after a network XML is parsed. This is similar to domain validation step when parsing domain XML. But it's not that convoluted in network driver. Regardless, any network related test should mimic real life scenario as close as possible and thus networkValidateTests() should be called right after domain XML is parsed. Now, networkValidate() might query sysfs wrt to PCI devices and thus tests must start using virpcimock. The function will also generate random MAC addresses, if needed, hence virrandommock. With this change, passthrough-pf and passthrough-address-crash test cases of networkxml2xmltest started failing but looking at corresponding XMLs those test cases were designed to test just XML parsing. They were never designed to showcase a "real" network XML. So mark them as expected fail. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- tests/networkxml2confdata/leasetime-hours.xml | 1 + .../networkxml2confdata/leasetime-infinite.xml | 1 + .../networkxml2confdata/leasetime-minutes.xml | 1 + .../networkxml2confdata/leasetime-seconds.xml | 1 + tests/networkxml2confdata/netboot-tftp.xml | 1 + tests/networkxml2conftest.c | 5 +++++ tests/networkxml2firewalltest.c | 10 +++++++++- tests/networkxml2xmlout/dnsmasq-options.xml | 1 + .../nat-network-dns-forward-plain.xml | 1 + .../nat-network-dns-forwarder-no-resolv.xml | 1 + .../nat-network-dns-forwarders.xml | 1 + .../nat-network-dns-hosts.xml | 1 + .../nat-network-dns-srv-record-minimal.xml | 1 + .../nat-network-dns-srv-record.xml | 1 + .../nat-network-dns-srv-records.xml | 1 + .../nat-network-dns-txt-record.xml | 1 + .../nat-network-explicit-flood.xml | 1 + .../nat-network-forward-nat-address.xml | 1 + .../nat-network-forward-nat-ipv6.xml | 1 + .../nat-network-forward-nat-no-address.xml | 1 + tests/networkxml2xmlout/nat-network-mtu.xml | 1 + tests/networkxml2xmlout/nat-network.xml | 1 + tests/networkxml2xmlout/netboot-network.xml | 1 + .../netboot-proxy-network.xml | 1 + .../passthrough-address-crash.xml | 7 ------- tests/networkxml2xmlout/passthrough-pf.xml | 9 --------- tests/networkxml2xmltest.c | 18 +++++++++++++++--- 27 files changed, 51 insertions(+), 20 deletions(-) delete mode 100644 tests/networkxml2xmlout/passthrough-address-crash.xml delete mode 100644 tests/networkxml2xmlout/passthrough-pf.xml diff --git a/tests/networkxml2confdata/leasetime-hours.xml b/tests/networkx= ml2confdata/leasetime-hours.xml index 5c8bec8328..3824d42368 100644 --- a/tests/networkxml2confdata/leasetime-hours.xml +++ b/tests/networkxml2confdata/leasetime-hours.xml @@ -5,6 +5,7 @@ + diff --git a/tests/networkxml2confdata/leasetime-infinite.xml b/tests/netwo= rkxml2confdata/leasetime-infinite.xml index a5a9e6c5ed..24df80d5e3 100644 --- a/tests/networkxml2confdata/leasetime-infinite.xml +++ b/tests/networkxml2confdata/leasetime-infinite.xml @@ -5,6 +5,7 @@ + diff --git a/tests/networkxml2confdata/leasetime-minutes.xml b/tests/networ= kxml2confdata/leasetime-minutes.xml index 1cbc285685..99956edc51 100644 --- a/tests/networkxml2confdata/leasetime-minutes.xml +++ b/tests/networkxml2confdata/leasetime-minutes.xml @@ -5,6 +5,7 @@ + diff --git a/tests/networkxml2confdata/leasetime-seconds.xml b/tests/networ= kxml2confdata/leasetime-seconds.xml index 9d8efc2608..76bd7909b8 100644 --- a/tests/networkxml2confdata/leasetime-seconds.xml +++ b/tests/networkxml2confdata/leasetime-seconds.xml @@ -5,6 +5,7 @@ + diff --git a/tests/networkxml2confdata/netboot-tftp.xml b/tests/networkxml2= confdata/netboot-tftp.xml index 297f5a7ba1..9d5d57bae4 100644 --- a/tests/networkxml2confdata/netboot-tftp.xml +++ b/tests/networkxml2confdata/netboot-tftp.xml @@ -3,6 +3,7 @@ eb486e5c-4df5-42ee-ae4a-ad8557998d00 + diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c index 59ab3a402b..67856f2e8c 100644 --- a/tests/networkxml2conftest.c +++ b/tests/networkxml2conftest.c @@ -36,6 +36,9 @@ testCompareXMLToConfFiles(const char *inxml, const char *= outconf, if (!(def =3D virNetworkDefParse(NULL, inxml, xmlopt, false))) goto fail; =20 + if (networkValidateTests(def) < 0) + goto fail; + if (!(obj =3D virNetworkObjNew())) goto fail; =20 @@ -203,4 +206,6 @@ mymain(void) } =20 VIR_TEST_MAIN_PRELOAD(mymain, + VIR_TEST_MOCK("virpci"), + VIR_TEST_MOCK("virrandom"), VIR_TEST_MOCK("virdnsmasq")) diff --git a/tests/networkxml2firewalltest.c b/tests/networkxml2firewalltes= t.c index e32f1b281e..0febae9ebc 100644 --- a/tests/networkxml2firewalltest.c +++ b/tests/networkxml2firewalltest.c @@ -27,6 +27,8 @@ =20 # include =20 +# define LIBVIRT_BRIDGE_DRIVER_PRIV_H_ALLOW +# include "bridge_driver_priv.h" # include "bridge_driver_platform.h" # include "virbuffer.h" # include "virmock.h" @@ -106,6 +108,9 @@ static int testCompareXMLToArgvFiles(const char *xml, if (!(def =3D virNetworkDefParse(NULL, xml, NULL, false))) return -1; =20 + if (networkValidateTests(def) < 0) + return -1; + if (networkAddFirewallRules(def, backend, NULL) < 0) return -1; =20 @@ -213,7 +218,10 @@ mymain(void) * virGDBusIsServiceRegistered(). */ =20 -VIR_TEST_MAIN_PRELOAD(mymain, VIR_TEST_MOCK("virgdbus"), +VIR_TEST_MAIN_PRELOAD(mymain, + VIR_TEST_MOCK("virpci"), + VIR_TEST_MOCK("virrandom"), + VIR_TEST_MOCK("virgdbus"), VIR_TEST_MOCK("virfirewall")) =20 #else /* ! defined (__linux__) */ diff --git a/tests/networkxml2xmlout/dnsmasq-options.xml b/tests/networkxml= 2xmlout/dnsmasq-options.xml index 856a018f25..97911eb65e 100644 --- a/tests/networkxml2xmlout/dnsmasq-options.xml +++ b/tests/networkxml2xmlout/dnsmasq-options.xml @@ -5,6 +5,7 @@ + diff --git a/tests/networkxml2xmlout/nat-network-dns-forward-plain.xml b/te= sts/networkxml2xmlout/nat-network-dns-forward-plain.xml index 7522f6ae1c..76e0f926a9 100644 --- a/tests/networkxml2xmlout/nat-network-dns-forward-plain.xml +++ b/tests/networkxml2xmlout/nat-network-dns-forward-plain.xml @@ -5,6 +5,7 @@ + diff --git a/tests/networkxml2xmlout/nat-network-dns-forwarder-no-resolv.xm= l b/tests/networkxml2xmlout/nat-network-dns-forwarder-no-resolv.xml index 9661ce561e..ab2800331c 100644 --- a/tests/networkxml2xmlout/nat-network-dns-forwarder-no-resolv.xml +++ b/tests/networkxml2xmlout/nat-network-dns-forwarder-no-resolv.xml @@ -3,6 +3,7 @@ 81ff0d90-c91e-6742-64da-4a736edb9a9c + diff --git a/tests/networkxml2xmlout/nat-network-dns-forwarders.xml b/tests= /networkxml2xmlout/nat-network-dns-forwarders.xml index e03912750c..170b043d09 100644 --- a/tests/networkxml2xmlout/nat-network-dns-forwarders.xml +++ b/tests/networkxml2xmlout/nat-network-dns-forwarders.xml @@ -5,6 +5,7 @@ + diff --git a/tests/networkxml2xmlout/nat-network-dns-hosts.xml b/tests/netw= orkxml2xmlout/nat-network-dns-hosts.xml index 86832af518..548282e514 100644 --- a/tests/networkxml2xmlout/nat-network-dns-hosts.xml +++ b/tests/networkxml2xmlout/nat-network-dns-hosts.xml @@ -5,6 +5,7 @@ + pudding diff --git a/tests/networkxml2xmlout/nat-network-dns-srv-record-minimal.xml= b/tests/networkxml2xmlout/nat-network-dns-srv-record-minimal.xml index a18afae2fd..50e968be9d 100644 --- a/tests/networkxml2xmlout/nat-network-dns-srv-record-minimal.xml +++ b/tests/networkxml2xmlout/nat-network-dns-srv-record-minimal.xml @@ -5,6 +5,7 @@ + diff --git a/tests/networkxml2xmlout/nat-network-dns-srv-record.xml b/tests= /networkxml2xmlout/nat-network-dns-srv-record.xml index 3dd19e6698..1486fc3224 100644 --- a/tests/networkxml2xmlout/nat-network-dns-srv-record.xml +++ b/tests/networkxml2xmlout/nat-network-dns-srv-record.xml @@ -5,6 +5,7 @@ + diff --git a/tests/networkxml2xmlout/nat-network-dns-srv-records.xml b/test= s/networkxml2xmlout/nat-network-dns-srv-records.xml index eda9e20333..26b802e1eb 100644 --- a/tests/networkxml2xmlout/nat-network-dns-srv-records.xml +++ b/tests/networkxml2xmlout/nat-network-dns-srv-records.xml @@ -5,6 +5,7 @@ + diff --git a/tests/networkxml2xmlout/nat-network-dns-txt-record.xml b/tests= /networkxml2xmlout/nat-network-dns-txt-record.xml index a4590119ef..cba7e9d1f8 100644 --- a/tests/networkxml2xmlout/nat-network-dns-txt-record.xml +++ b/tests/networkxml2xmlout/nat-network-dns-txt-record.xml @@ -5,6 +5,7 @@ + diff --git a/tests/networkxml2xmlout/nat-network-explicit-flood.xml b/tests= /networkxml2xmlout/nat-network-explicit-flood.xml index 305c3b7d98..c039955543 100644 --- a/tests/networkxml2xmlout/nat-network-explicit-flood.xml +++ b/tests/networkxml2xmlout/nat-network-explicit-flood.xml @@ -5,6 +5,7 @@ + diff --git a/tests/networkxml2xmlout/nat-network-forward-nat-address.xml b/= tests/networkxml2xmlout/nat-network-forward-nat-address.xml index faeba24706..e3276ac338 100644 --- a/tests/networkxml2xmlout/nat-network-forward-nat-address.xml +++ b/tests/networkxml2xmlout/nat-network-forward-nat-address.xml @@ -9,6 +9,7 @@ + diff --git a/tests/networkxml2xmlout/nat-network-forward-nat-ipv6.xml b/tes= ts/networkxml2xmlout/nat-network-forward-nat-ipv6.xml index cfec391ee2..642929cc8d 100644 --- a/tests/networkxml2xmlout/nat-network-forward-nat-ipv6.xml +++ b/tests/networkxml2xmlout/nat-network-forward-nat-ipv6.xml @@ -5,6 +5,7 @@ + diff --git a/tests/networkxml2xmlout/nat-network-forward-nat-no-address.xml= b/tests/networkxml2xmlout/nat-network-forward-nat-no-address.xml index f19e34deec..77fc0b5324 100644 --- a/tests/networkxml2xmlout/nat-network-forward-nat-no-address.xml +++ b/tests/networkxml2xmlout/nat-network-forward-nat-no-address.xml @@ -8,6 +8,7 @@ + diff --git a/tests/networkxml2xmlout/nat-network-mtu.xml b/tests/networkxml= 2xmlout/nat-network-mtu.xml index 715bc1b505..97044c70ec 100644 --- a/tests/networkxml2xmlout/nat-network-mtu.xml +++ b/tests/networkxml2xmlout/nat-network-mtu.xml @@ -6,6 +6,7 @@ + diff --git a/tests/networkxml2xmlout/nat-network.xml b/tests/networkxml2xml= out/nat-network.xml index 93bc7db51d..9d3757f0e0 100644 --- a/tests/networkxml2xmlout/nat-network.xml +++ b/tests/networkxml2xmlout/nat-network.xml @@ -5,6 +5,7 @@ + diff --git a/tests/networkxml2xmlout/netboot-network.xml b/tests/networkxml= 2xmlout/netboot-network.xml index 8d5ad31a00..723c6c7a72 100644 --- a/tests/networkxml2xmlout/netboot-network.xml +++ b/tests/networkxml2xmlout/netboot-network.xml @@ -3,6 +3,7 @@ 81ff0d90-c91e-6742-64da-4a736edb9a9b + diff --git a/tests/networkxml2xmlout/netboot-proxy-network.xml b/tests/netw= orkxml2xmlout/netboot-proxy-network.xml index a5b7c1e4e6..8c9fae874c 100644 --- a/tests/networkxml2xmlout/netboot-proxy-network.xml +++ b/tests/networkxml2xmlout/netboot-proxy-network.xml @@ -3,6 +3,7 @@ 81ff0d90-c91e-6742-64da-4a736edb9a9b + diff --git a/tests/networkxml2xmlout/passthrough-address-crash.xml b/tests/= networkxml2xmlout/passthrough-address-crash.xml deleted file mode 100644 index a05dbbf837..0000000000 --- a/tests/networkxml2xmlout/passthrough-address-crash.xml +++ /dev/null @@ -1,7 +0,0 @@ - - passthrough_001 - 50e92386-8dd1-4a95-8a4b-9a888274eb66 - -
- - diff --git a/tests/networkxml2xmlout/passthrough-pf.xml b/tests/networkxml2= xmlout/passthrough-pf.xml deleted file mode 100644 index 1a7e71ea88..0000000000 --- a/tests/networkxml2xmlout/passthrough-pf.xml +++ /dev/null @@ -1,9 +0,0 @@ - - local - 81ff0d90-c91e-6742-64da-4a736edb9a9b - - - - - - diff --git a/tests/networkxml2xmltest.c b/tests/networkxml2xmltest.c index 840bcaa83f..10eed8173e 100644 --- a/tests/networkxml2xmltest.c +++ b/tests/networkxml2xmltest.c @@ -17,6 +17,7 @@ typedef enum { TEST_COMPARE_NET_XML2XML_RESULT_SUCCESS, TEST_COMPARE_NET_XML2XML_RESULT_FAIL_PARSE, + TEST_COMPARE_NET_XML2XML_RESULT_FAIL_VALIDATE, TEST_COMPARE_NET_XML2XML_RESULT_FAIL_FORMAT, TEST_COMPARE_NET_XML2XML_RESULT_FAIL_COMPARE, } testCompareNetXML2XMLResult; @@ -42,6 +43,13 @@ testCompareXMLToXMLFiles(const char *inxml, const char *= outxml, if (expectResult =3D=3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_PARSE) goto cleanup; =20 + if (networkValidateTests(dev) < 0) { + result =3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_VALIDATE; + goto cleanup; + } + if (expectResult =3D=3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_VALIDATE) + goto cleanup; + if (!(actual =3D virNetworkDefFormat(dev, xmlopt, flags))) { result =3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_FORMAT; goto cleanup; @@ -114,6 +122,8 @@ mymain(void) DO_TEST_FULL(name, flags, TEST_COMPARE_NET_XML2XML_RESULT_SUCCESS) #define DO_TEST_PARSE_ERROR(name) \ DO_TEST_FULL(name, 0, TEST_COMPARE_NET_XML2XML_RESULT_FAIL_PARSE) +#define DO_TEST_VALIDATE_ERROR(name) \ + DO_TEST_FULL(name, 0, TEST_COMPARE_NET_XML2XML_RESULT_FAIL_VALIDATE) =20 DO_TEST("dhcp6host-routed-network"); DO_TEST("empty-allow-ipv6"); @@ -145,12 +155,12 @@ mymain(void) DO_TEST("vepa-net"); DO_TEST("bandwidth-network"); DO_TEST("openvswitch-net"); - DO_TEST_FLAGS("passthrough-pf", VIR_NETWORK_XML_INACTIVE); + DO_TEST_VALIDATE_ERROR("passthrough-pf"); DO_TEST("hostdev"); DO_TEST_FLAGS("hostdev-pf", VIR_NETWORK_XML_INACTIVE); DO_TEST_FLAGS("hostdev-pf-driver-model", VIR_NETWORK_XML_INACTIVE); =20 - DO_TEST("passthrough-address-crash"); + DO_TEST_VALIDATE_ERROR("passthrough-address-crash"); DO_TEST("nat-network-explicit-flood"); DO_TEST("host-bridge-no-flood"); DO_TEST_PARSE_ERROR("hostdev-duplicate"); @@ -167,4 +177,6 @@ mymain(void) return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; } =20 -VIR_TEST_MAIN(mymain) +VIR_TEST_MAIN_PRELOAD(mymain, + VIR_TEST_MOCK("virpci"), + VIR_TEST_MOCK("virrandom")) --=20 2.52.0 From nobody Mon Feb 2 05:55:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769611313; cv=none; d=zohomail.com; s=zohoarc; b=Bec8zoXeofzfgz84UBc3Nt+x58w96Y5YJKvbbUAQPNkCaqrVkTwqYQ2S4QgIMzBSxa51A78wSaDc+0ab3GUex8KgDZujUNJfHhmJjpQ4Pl/b2eg/k5TlUnIFbwYgXXKXDj177xnCP+WvRFWEomrLPw7lkA6I25qg+791+kVIUik= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769611313; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=iKcwoLWR60GkOBd9wOsRBWllUJpEf0MQrPAiBGdNtj0=; b=K+qGyeL16pto4+cTbuU2WYd0nobM3MgzGLo5TUOmInlPJCF+A/vu35uj27EzBJd6hVUn7nED4H70253xrvr4yYrjKs8yyGk2LLJNwdjB06ii7i/nwFVcx4MPUbuijtYeYG6hdxXWFXzH+XPDL/dixmDDzFVrWBVNARDW3yj8Xo8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769611312995712.382073611387; Wed, 28 Jan 2026 06:41:52 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 1B751418E2; Wed, 28 Jan 2026 09:41:52 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 6CDE343FC3; Wed, 28 Jan 2026 09:31:58 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id DBE99417DA; Wed, 28 Jan 2026 09:31:53 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id B3E2C41B10 for ; Wed, 28 Jan 2026 09:30:58 -0500 (EST) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-424-Ilwvg93XNZiG9CykAjW66Q-1; Wed, 28 Jan 2026 09:30:56 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E593619775A5 for ; Wed, 28 Jan 2026 14:30:55 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4E250195419A for ; Wed, 28 Jan 2026 14:30:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769610658; h=from:from: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; bh=iKcwoLWR60GkOBd9wOsRBWllUJpEf0MQrPAiBGdNtj0=; b=P7EkpkQYpZ1lsXrknUzA7to5cef31p7SP7W0VZ7eU9qSwmwByfBPZCuCPcc+YNi8/4EZzU FNrXhcIw0mm77BIO1RxSF8RJe6U1wcYTaduemsC+xZoY+TcsiHSqHCAzN+AVVXoVk/aozl P0bBRRgTB9C8edd4sZyxpcI0mtOJQGc= X-MC-Unique: Ilwvg93XNZiG9CykAjW66Q-1 X-Mimecast-MFC-AGG-ID: Ilwvg93XNZiG9CykAjW66Q_1769610656 To: devel@lists.libvirt.org Subject: [PATCH 09/20] networkxml2conftest: Avoid potential leak Date: Wed, 28 Jan 2026 15:30:30 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: LKNUtVbCZHBtFQdvD2EoKyg4FV7QdESEW6k0jJs9gTM_1769610656 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: BUZC2JDPOHLOH23PMNJKDNDOOQ6IGRCR X-Message-ID-Hash: BUZC2JDPOHLOH23PMNJKDNDOOQ6IGRCR X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769611313912158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Inside of testCompareXMLToConfFiles() the network definition is parsed and if that succeeds a virNetworkObj is created by calling virNetworkObjNew(). But if the latter fails, the control jumps onto the fail label where only the object is freed but not already parsed definition leading to a leak. Swapping these two steps ensures that if either of them fails no memleak occurs. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- tests/networkxml2conftest.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c index 67856f2e8c..d089ff38b1 100644 --- a/tests/networkxml2conftest.c +++ b/tests/networkxml2conftest.c @@ -33,17 +33,17 @@ testCompareXMLToConfFiles(const char *inxml, const char= *outconf, if (!(xmlopt =3D networkDnsmasqCreateXMLConf())) goto fail; =20 - if (!(def =3D virNetworkDefParse(NULL, inxml, xmlopt, false))) - goto fail; - - if (networkValidateTests(def) < 0) - goto fail; - if (!(obj =3D virNetworkObjNew())) goto fail; =20 + if (!(def =3D virNetworkDefParse(NULL, inxml, xmlopt, false))) + goto fail; + virNetworkObjSetDef(obj, def); =20 + if (networkValidateTests(def) < 0) + goto fail; + if (!networkNeedsDnsmasq(def)) { VIR_TEST_VERBOSE("spurious request to generate conf files. Would n= ot start dnsmasq in real life scenario"); goto fail; --=20 2.52.0 From nobody Mon Feb 2 05:55:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769611508; cv=none; d=zohomail.com; s=zohoarc; b=KENx8wnquY/YnVQkYjg5DTgIJC2pEctZDCJip4GZXWb/eWrDtiYIXPcoX5sYo+7Ox8ik5rtAfUTg4HAw33/qkoCre2fw192+8PgOURnFCejB55MPo+wrN3FBWb6J+1pwi6rGGwlrBnizwbMDgHur5mVMjcZpesku8A5Bqp9Ng8s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769611508; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=eGBKESMKy6soR+WamqNqRfhOPYmlNgEKdLwfIX0uGSg=; b=T1UDPYPgCNeAiHYisoALltS5Jp8PtKaqewBKa52SH/gfDSNbrhNdn/Y9gUx/BrADIUzCQ0LrPtAa8+1k3j5ReEk0lKi6yhKyQNxCPIFhqEx0Cra07M6wGXLN10bCgFZndCKfLgsFGjuYfFyrd6N6uqC71uFo/RwZmGXKdRnGvZs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 17696115080231000.8886142065244; Wed, 28 Jan 2026 06:45:08 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 648BB41B95; Wed, 28 Jan 2026 09:45:07 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 4EDC844056; Wed, 28 Jan 2026 09:32:07 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 52AA441A13; Wed, 28 Jan 2026 09:32:03 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 7DDC941B27 for ; Wed, 28 Jan 2026 09:30:59 -0500 (EST) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-32--mbUIv2FPtGvU9V5DfWGMA-1; Wed, 28 Jan 2026 09:30:57 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E3F961800371 for ; Wed, 28 Jan 2026 14:30:56 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4CBEE19540E7 for ; Wed, 28 Jan 2026 14:30:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769610659; h=from:from: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; bh=eGBKESMKy6soR+WamqNqRfhOPYmlNgEKdLwfIX0uGSg=; b=iwk6axvrhMln+UGEZXHWoArmc5IZuTs0yu7JFYIChY3Si3EtForNkP2O/sSCLhAleDal1S p+C+iIV4ISM7aUoTchs0TUp9B9H49tJSSJMWElAHc5i980aPJL34gb2Q6j1jPxeGpCpXrs DM7Nsab0wOEuLcuzYqkTCEmeHJyE4p8= X-MC-Unique: -mbUIv2FPtGvU9V5DfWGMA-1 X-Mimecast-MFC-AGG-ID: -mbUIv2FPtGvU9V5DfWGMA_1769610657 To: devel@lists.libvirt.org Subject: [PATCH 10/20] networkxml2conftest: Allow regenerating hosts file Date: Wed, 28 Jan 2026 15:30:31 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: XPqvSg-kuj3MD2EtjcC5dHPa0NK-us_cVSeOJTA9AVk_1769610657 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: ZMCWNU4W2ALR27NNGZV72EC6OW32OQQD X-Message-ID-Hash: ZMCWNU4W2ALR27NNGZV72EC6OW32OQQD X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769611510370154100 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Inside of testCompareXMLToConfFiles() the networkDnsmasqConfContents() is called. This may also produce contents of corresponding hosts file. This is then compared to expected contents stored on disk as ${testname}.hostsfile. But due to additional checks virTestCompareToFile() might not even be called. Problem with that is when there's actual content but the file doesn't exist the compare helper is not called and thus VIR_TEST_REGENERATE_OUTPUT trick doesn't work. Let's call the helper more often as it is perfectly capable of handling this edge case. What it is not capable of handling is when the file shouldn't exist at all. So handling of that case is kept. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- tests/networkxml2conftest.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c index d089ff38b1..cb2cafa918 100644 --- a/tests/networkxml2conftest.c +++ b/tests/networkxml2conftest.c @@ -75,18 +75,16 @@ testCompareXMLToConfFiles(const char *inxml, const char= *outconf, if (virTestCompareToFile(confactual, outconf) < 0) goto fail; =20 - if (virFileExists(outhostsfile)) { - if (!hostsfileactual) { - VIR_TEST_DEBUG("%s: hostsfile exists but the configuration did= " - "not specify any host", outhostsfile); + if (hostsfileactual) { + if (virTestCompareToFile(hostsfileactual, outhostsfile) < 0) { goto fail; - } else if (virTestCompareToFile(hostsfileactual, outhostsfile) < 0= ) { + } + } else { + if (virFileExists(outhostsfile)) { + VIR_TEST_DEBUG("%s: hostsfile exists but the configuration did= not specify any host", + outhostsfile); goto fail; } - } else if (hostsfileactual) { - VIR_TEST_DEBUG("%s: file does not exist but actual data was expect= ed", - outhostsfile); - goto fail; } =20 ret =3D 0; --=20 2.52.0 From nobody Mon Feb 2 05:55:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769611543; cv=none; d=zohomail.com; s=zohoarc; b=a5lTnj5X9ufew6JTW2MiBTAG3PxifHIhPA/JL8cgbxWmHaV4/B1fAad7Cy79w/z3h5rXhamNd5OADkCf9RwbyY4ykkEgjgR2YiN9vhUlvYALx0cdwTFL2wBHLyuz6nZ0QbZxbgkRzhuV4ldF07RHV2Nx6YNoS19eJWJmZkn1htc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769611543; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=wTtXNqJ5tM4eCKob8t8aJ6lL+RpSPU2+6/UmSfu16qo=; b=Fcq0uwi4l3qC3sC6izigYxUv9A1csN8GSGafPBYnIbRbHM6QhxiDnz+JwZEbjSKiCkU2e6GebOigPt7aP/69rTOvaTzhzDUvVeuSXdFwAAEXBoj4/c4OiRg7XyWSuMVf8pF40xPp6LyU1YnN2aT6IqYhZvBQSB8wZws6HBRriIA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769611543725763.8761362296341; Wed, 28 Jan 2026 06:45:43 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 3711F418FB; Wed, 28 Jan 2026 09:45:43 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 7B98544075; Wed, 28 Jan 2026 09:32:46 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 00CBE41904; Wed, 28 Jan 2026 09:32:42 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 6FE3F3FB96 for ; Wed, 28 Jan 2026 09:31:01 -0500 (EST) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-474-Ba3zby9jNgeyqO_bl8YBsQ-1; Wed, 28 Jan 2026 09:30:58 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E239A1955D88 for ; Wed, 28 Jan 2026 14:30:57 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4C2D01956095 for ; Wed, 28 Jan 2026 14:30:57 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769610661; h=from:from: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; bh=wTtXNqJ5tM4eCKob8t8aJ6lL+RpSPU2+6/UmSfu16qo=; b=ZCzHUUPEkmNIIzV/ZMvAFy4KiODJ/8EnWmnJtIg3dbb2zA/LOZdu/iVi9zqz+i8R+zjEYG TvUl3QJABO80lps0kp+gitJEafjaBJbjic8603tjlwHRtA2EQjJgyJ7pMHtpBaZ/EfwDgX HQSOTnFrtcThrrSurEGJUbOPpukfKuE= X-MC-Unique: Ba3zby9jNgeyqO_bl8YBsQ-1 X-Mimecast-MFC-AGG-ID: Ba3zby9jNgeyqO_bl8YBsQ_1769610658 To: devel@lists.libvirt.org Subject: [PATCH 11/20] networkxml2conftest: Allow regenerating more in one run Date: Wed, 28 Jan 2026 15:30:32 +0100 Message-ID: <0799ac237d70e3c5b2c22172bafdaeaab8f79ad3.1769610369.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: huA7jz3yfKPYcpUhKBm5vsS--tZP3skx8oAA3AVTEAM_1769610658 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: SW2FTT6VYQHGAU6EA4RHG6FZHNMXK7RZ X-Message-ID-Hash: SW2FTT6VYQHGAU6EA4RHG6FZHNMXK7RZ X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769611544951154100 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Currently, there are two calls to virTestCompareToFile() inside of testCompareXMLToConfFiles(). If the first one fails the control jumps directly onto the fail label and skips the second one. This means that When regenerating test case output (VIR_TEST_REGENERATE_OUTPUT) the test binary has to be called twice to regenerate all the files. Suboptimal. Try harder to call both compare helpers. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- tests/networkxml2conftest.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c index cb2cafa918..c7534773a3 100644 --- a/tests/networkxml2conftest.c +++ b/tests/networkxml2conftest.c @@ -29,6 +29,7 @@ testCompareXMLToConfFiles(const char *inxml, const char *= outconf, g_autofree char *pidfile =3D NULL; g_autoptr(dnsmasqContext) dctx =3D NULL; g_autoptr(virNetworkXMLOption) xmlopt =3D NULL; + bool compareFailed =3D false; =20 if (!(xmlopt =3D networkDnsmasqCreateXMLConf())) goto fail; @@ -73,20 +74,23 @@ testCompareXMLToConfFiles(const char *inxml, const char= *outconf, #endif =20 if (virTestCompareToFile(confactual, outconf) < 0) - goto fail; + compareFailed =3D true; =20 if (hostsfileactual) { if (virTestCompareToFile(hostsfileactual, outhostsfile) < 0) { - goto fail; + compareFailed =3D true; } } else { if (virFileExists(outhostsfile)) { VIR_TEST_DEBUG("%s: hostsfile exists but the configuration did= not specify any host", outhostsfile); - goto fail; + compareFailed =3D true; } } =20 + if (compareFailed) + goto fail; + ret =3D 0; =20 fail: --=20 2.52.0 From nobody Mon Feb 2 05:55:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769611586; cv=none; d=zohomail.com; s=zohoarc; b=hG8NuVmR1KAc02n8B/Tisa2P/Nj1OL82OgxMxnghVsjapkzlHb2ZQKr9390RVWjg2K+pXJBugbQ4lcq/GR0bW9VFquhuFIJ4JVxbfKUrThpqcVcqTifwOG28E4en01il/m1u697NCLzZxMe3gC/ei1ridUoqdx44x3JtBuleXpw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769611586; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=V+hCyE4Alzx68hX71XNTkcuISqXZyze3DS5jACKGfk0=; b=X+KBVc94dgs2SJVqqkoNJ5NCZnc8iiF7EBhQOk0/ebi8BaSQekZQPK4L65a3OlhzufH7QfuzESDtKkm+Pfxxr0N//rU64X0VKX2LXNvavVwhdnbcJoF+o6SZ7ybLYMTU5maS80w5m71SpJhd1f9q52H95TLtBKAKOeeln/3TdQc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769611586760301.27374284995824; Wed, 28 Jan 2026 06:46:26 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 1F5CB4195C; Wed, 28 Jan 2026 09:46:26 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 41F89440BD; Wed, 28 Jan 2026 09:32:47 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 83A6441B62; Wed, 28 Jan 2026 09:32:43 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id CD0EF417D6 for ; Wed, 28 Jan 2026 09:31:01 -0500 (EST) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-600-VuEFOFgGMfiInhBt-UenoQ-1; Wed, 28 Jan 2026 09:30:59 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E13F61800451 for ; Wed, 28 Jan 2026 14:30:58 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4AE26195419E for ; Wed, 28 Jan 2026 14:30:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769610661; h=from:from: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; bh=V+hCyE4Alzx68hX71XNTkcuISqXZyze3DS5jACKGfk0=; b=NbFovHwQVB766hgk1GMD1/3Sy/Tm79FG6rFwPsHmU53GVXMuWqTWYmXzQU6BBzMlGhkqXS tW8P+wlSwcYTUEt+TLvJPb5h9RJC6S/ywpSd1oIs3IOjjYgKmi5n9VDPAiYKPfm9bCH9c0 W8TwN3/kD38teV+5xA7GisSKzZQzom4= X-MC-Unique: VuEFOFgGMfiInhBt-UenoQ-1 X-Mimecast-MFC-AGG-ID: VuEFOFgGMfiInhBt-UenoQ_1769610659 To: devel@lists.libvirt.org Subject: [PATCH 12/20] networkxml2xmltest: Don't recreate xmlopt object Date: Wed, 28 Jan 2026 15:30:33 +0100 Message-ID: <8427239efecc1e480c5cb398d6e47d4f662a500a.1769610369.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: vm0e_5BGNPXkkx-tHpbpzk6bRPf8VcAaGNE_O-m-bnQ_1769610659 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: KWTBJVVGROEVKL434E3FX4AKG7ZNVYNY X-Message-ID-Hash: KWTBJVVGROEVKL434E3FX4AKG7ZNVYNY X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769611589637154100 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik The aim of virNetworkXMLOption object is to provide some immutable data to XML parser (e.g. various callbacks). Since the object is immutable, it can be created once and then reused by all test cases. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- tests/networkxml2xmltest.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/tests/networkxml2xmltest.c b/tests/networkxml2xmltest.c index 10eed8173e..325a43c385 100644 --- a/tests/networkxml2xmltest.c +++ b/tests/networkxml2xmltest.c @@ -23,18 +23,16 @@ typedef enum { } testCompareNetXML2XMLResult; =20 static int -testCompareXMLToXMLFiles(const char *inxml, const char *outxml, +testCompareXMLToXMLFiles(const char *inxml, + const char *outxml, unsigned int flags, - testCompareNetXML2XMLResult expectResult) + testCompareNetXML2XMLResult expectResult, + virNetworkXMLOption *xmlopt) { g_autofree char *actual =3D NULL; int ret; testCompareNetXML2XMLResult result =3D TEST_COMPARE_NET_XML2XML_RESULT= _SUCCESS; g_autoptr(virNetworkDef) dev =3D NULL; - g_autoptr(virNetworkXMLOption) xmlopt =3D NULL; - - if (!(xmlopt =3D networkDnsmasqCreateXMLConf())) - goto cleanup; =20 if (!(dev =3D virNetworkDefParse(NULL, inxml, xmlopt, false))) { result =3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_PARSE; @@ -85,6 +83,7 @@ struct testInfo { const char *name; unsigned int flags; testCompareNetXML2XMLResult expectResult; + virNetworkXMLOption *xmlopt; }; =20 static int @@ -99,7 +98,7 @@ testCompareXMLToXMLHelper(const void *data) outxml =3D g_strdup_printf("%s/networkxml2xmlout/%s.xml", abs_srcdir, = info->name); =20 result =3D testCompareXMLToXMLFiles(inxml, outxml, info->flags, - info->expectResult); + info->expectResult, info->xmlopt); =20 return result; } @@ -107,11 +106,15 @@ testCompareXMLToXMLHelper(const void *data) static int mymain(void) { + g_autoptr(virNetworkXMLOption) xmlopt =3D NULL; int ret =3D 0; =20 + if (!(xmlopt =3D networkDnsmasqCreateXMLConf())) + return -1; + #define DO_TEST_FULL(name, flags, expectResult) \ do { \ - const struct testInfo info =3D {name, flags, expectResult}; \ + const struct testInfo info =3D {name, flags, expectResult, xmlopt}= ; \ if (virTestRun("Network XML-2-XML " name, \ testCompareXMLToXMLHelper, &info) < 0) \ ret =3D -1; \ --=20 2.52.0 From nobody Mon Feb 2 05:55:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769611629; cv=none; d=zohomail.com; s=zohoarc; b=d6rUoa3aKSYoKjI5ftw2VfUiHdKDVsx6I7Ws26ejtjQ+aDaAuITz4Wif2r0pJNsuQmllPbl/wGlUKx+txStS6hXbMliBDEB3IuPJLmhZjtiuNoiWE75n/KMCpgWxTs/uTGkfrEXJJ27tIorOGLToTPc965rAX0jWB8N9AXkBq+U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769611629; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=7b4xZU9+GavjGbPhFs2SSG9Ug0AfU4H5HntorwNOjO4=; b=Ms5Bqh1X93KVrX+CIwFQkHX7UKu5E7MQm/+p9Y2RMsyiJpMxCn+39SG06gO7j/fzbL1Ou7UmdxGLOFJHtJtPR5PxpRok03jFZWQTtV712ciZWZtGkVLUkUuC9flQMKE73q124XoplEPqguiNmgXhW/f4DloznuAEtALnP9ela6w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769611629749129.72232870987762; Wed, 28 Jan 2026 06:47:09 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id F168B41B7E; Wed, 28 Jan 2026 09:47:08 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 27A2944107; Wed, 28 Jan 2026 09:33:07 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 3B39E418AB; Wed, 28 Jan 2026 09:33:01 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 8A12841C9D for ; Wed, 28 Jan 2026 09:31:02 -0500 (EST) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-139-B5KZswn_Mf-lHnqwXO8FqQ-1; Wed, 28 Jan 2026 09:31:00 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E03151800447 for ; Wed, 28 Jan 2026 14:30:59 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 49CED1956095 for ; Wed, 28 Jan 2026 14:30:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769610662; h=from:from: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; bh=7b4xZU9+GavjGbPhFs2SSG9Ug0AfU4H5HntorwNOjO4=; b=DFO8OFfToD9rralVvGVbos7RFp7SeoXSwYsHXxuPwSVNqJH0DMZnmMjhbaCrSJzbipSZ4Z nRPCrmIzeuMaOO82TfoOb5fb34xNFmpTFR1ONErvp/df2/INDg4Z1mUePjrEOTMVs+qJRD TBNSKxTmOOrfZKRvt3xWhQ/TkO45700= X-MC-Unique: B5KZswn_Mf-lHnqwXO8FqQ-1 X-Mimecast-MFC-AGG-ID: B5KZswn_Mf-lHnqwXO8FqQ_1769610660 To: devel@lists.libvirt.org Subject: [PATCH 13/20] networkxml2xmltest: Introduce testRun() Date: Wed, 28 Jan 2026 15:30:34 +0100 Message-ID: <75147384389ac04be092b611ee8481d088b6bc30.1769610369.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: KOPlJ73f5l7WQg0-JAqqlRKxnuJSNLYdhE4XtIXY3Cc_1769610660 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: SIGRUZ2VYI2JHBPG6RASUNVJJBJPKZIQ X-Message-ID-Hash: SIGRUZ2VYI2JHBPG6RASUNVJJBJPKZIQ X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769611631748158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik This is a beginning of something bigger. The idea is that one DO_TEST_FULL() macro (and its friends) will run multiple test cases (just like qemuxmlconftest does). But in order to do that in a readable fashion, the macro should merely just expand to a function call. The function will then call virTestRunLog(), multiple times possibly. This is the first step in that direction. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- tests/networkxml2xmltest.c | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/tests/networkxml2xmltest.c b/tests/networkxml2xmltest.c index 325a43c385..552364818d 100644 --- a/tests/networkxml2xmltest.c +++ b/tests/networkxml2xmltest.c @@ -103,6 +103,19 @@ testCompareXMLToXMLHelper(const void *data) return result; } =20 +static void +testRun(const char *name, + int *ret, + virNetworkXMLOption *xmlopt, + testCompareNetXML2XMLResult expectResult, + unsigned int flags) +{ + g_autofree char *name_xml2xml =3D g_strdup_printf("Network XML-2-XML %= s", name); + struct testInfo info =3D { .name =3D name, .flags =3D flags, .expectRe= sult =3D expectResult, .xmlopt =3D xmlopt }; + + virTestRunLog(ret, name_xml2xml, testCompareXMLToXMLHelper, &info); +} + static int mymain(void) { @@ -113,12 +126,7 @@ mymain(void) return -1; =20 #define DO_TEST_FULL(name, flags, expectResult) \ - do { \ - const struct testInfo info =3D {name, flags, expectResult, xmlopt}= ; \ - if (virTestRun("Network XML-2-XML " name, \ - testCompareXMLToXMLHelper, &info) < 0) \ - ret =3D -1; \ - } while (0) + testRun(name, &ret, xmlopt, expectResult, flags) #define DO_TEST(name) \ DO_TEST_FULL(name, 0, TEST_COMPARE_NET_XML2XML_RESULT_SUCCESS) #define DO_TEST_FLAGS(name, flags) \ --=20 2.52.0 From nobody Mon Feb 2 05:55:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769611676; cv=none; d=zohomail.com; s=zohoarc; b=hc4BIQtJp7zRUG4lNVBJzp+gtgS0wWkVrjhzBsYpxiF3R17lHCkZn1sR4Spaa/Fv7d/X4naDtkVdWGcSyjsh5HDakqJC6MQp+3dPv8tNB+7OKhTRcm6sdFiAol9tw8rEZlRhfeC+hf3U4bD4ZceqrL235vpsvsUjV1QJI4DmWS8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769611676; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=8ctH/l1/GeAn8GyIe/q6XSJjj5nfGmF5NeBTWgJI5i8=; b=BIE0uPae3zo7m3lqQIDWeISNvgYaGC4XFyULQJ5GRvOf2U3CdTgQzfCxxb2yrnS0YehsBuvSyMFIa4ZFipdMdLqgBTaBv8Z8ccXfXpZPneB/ZP76w0n+aC3aZL6Fpr2dBWcWGxXSA835ce26G09LDRkHht7J0ju2QFU7koMs81c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769611676636363.51410179164964; Wed, 28 Jan 2026 06:47:56 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id CB06441B82; Wed, 28 Jan 2026 09:47:55 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 04B2F44128; Wed, 28 Jan 2026 09:33:43 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id BF25541BF3; Wed, 28 Jan 2026 09:33:36 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id DB055418B2 for ; Wed, 28 Jan 2026 09:31:03 -0500 (EST) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-324-zfdjGmgyMNuoPXAA0PqR6A-1; Wed, 28 Jan 2026 09:31:01 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E009418005BA for ; Wed, 28 Jan 2026 14:31:00 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4991A19540E9 for ; Wed, 28 Jan 2026 14:31:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769610663; h=from:from: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; bh=8ctH/l1/GeAn8GyIe/q6XSJjj5nfGmF5NeBTWgJI5i8=; b=IS+itCr/xH+U1IpsYHqriZs5ZnETVjyQU8a66Cmb0zh9roG347LhRl1VcAGHTASh8Ap101 M98RDMahFITgviBH0O0yBvgdoSUKlFtpyk7X0lPucVpjpdTHgfPDBr2qA2Db4WiyK3k5l2 LCx+GZCOgY2dkscY/S++W7J8kHMO00E= X-MC-Unique: zfdjGmgyMNuoPXAA0PqR6A-1 X-Mimecast-MFC-AGG-ID: zfdjGmgyMNuoPXAA0PqR6A_1769610661 To: devel@lists.libvirt.org Subject: [PATCH 14/20] networkxml2xmltest: Move path generation into testRun() Date: Wed, 28 Jan 2026 15:30:35 +0100 Message-ID: <6ef3b79760a550d25d4bf93fbd4f03fc54f70cf0.1769610369.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: gFIPnuA8ON9gN0SMSQnnVciBeSE55JG4ajbwvNmUwKE_1769610661 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: DWHOJ5UFTFBWN2FHX43VTLUDFLAXWF2L X-Message-ID-Hash: DWHOJ5UFTFBWN2FHX43VTLUDFLAXWF2L X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769611679099154100 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik This effectively dissolves testCompareXMLToXMLHelper() into testRun(). Motivation is that parts of data generated inside of testCompareXMLToXMLHelper() is going to be reused from the caller (testRun()). Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- tests/networkxml2xmltest.c | 69 +++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 39 deletions(-) diff --git a/tests/networkxml2xmltest.c b/tests/networkxml2xmltest.c index 552364818d..2a537d77c0 100644 --- a/tests/networkxml2xmltest.c +++ b/tests/networkxml2xmltest.c @@ -22,86 +22,69 @@ typedef enum { TEST_COMPARE_NET_XML2XML_RESULT_FAIL_COMPARE, } testCompareNetXML2XMLResult; =20 +struct testInfo { + const char *name; + unsigned int flags; + testCompareNetXML2XMLResult expectResult; + virNetworkXMLOption *xmlopt; + const char *inxml; + const char *outxml; +}; + static int -testCompareXMLToXMLFiles(const char *inxml, - const char *outxml, - unsigned int flags, - testCompareNetXML2XMLResult expectResult, - virNetworkXMLOption *xmlopt) +testCompareXMLToXMLFiles(const void *data) { + struct testInfo *info =3D (void *) data; g_autofree char *actual =3D NULL; int ret; testCompareNetXML2XMLResult result =3D TEST_COMPARE_NET_XML2XML_RESULT= _SUCCESS; g_autoptr(virNetworkDef) dev =3D NULL; =20 - if (!(dev =3D virNetworkDefParse(NULL, inxml, xmlopt, false))) { + if (!(dev =3D virNetworkDefParse(NULL, info->inxml, info->xmlopt, fals= e))) { result =3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_PARSE; goto cleanup; } - if (expectResult =3D=3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_PARSE) + if (info->expectResult =3D=3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_PAR= SE) goto cleanup; =20 if (networkValidateTests(dev) < 0) { result =3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_VALIDATE; goto cleanup; } - if (expectResult =3D=3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_VALIDATE) + if (info->expectResult =3D=3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_VAL= IDATE) goto cleanup; =20 - if (!(actual =3D virNetworkDefFormat(dev, xmlopt, flags))) { + if (!(actual =3D virNetworkDefFormat(dev, info->xmlopt, info->flags)))= { result =3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_FORMAT; goto cleanup; } - if (expectResult =3D=3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_FORMAT) + if (info->expectResult =3D=3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_FOR= MAT) goto cleanup; =20 - if (virTestCompareToFile(actual, outxml) < 0) { + if (virTestCompareToFile(actual, info->outxml) < 0) { result =3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_COMPARE; goto cleanup; } - if (expectResult =3D=3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_COMPARE) + if (info->expectResult =3D=3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_COM= PARE) goto cleanup; =20 cleanup: - if (result =3D=3D expectResult) { + if (result =3D=3D info->expectResult) { ret =3D 0; - if (expectResult !=3D TEST_COMPARE_NET_XML2XML_RESULT_SUCCESS) { + if (info->expectResult !=3D TEST_COMPARE_NET_XML2XML_RESULT_SUCCES= S) { VIR_TEST_DEBUG("Got expected failure code=3D%d msg=3D%s", result, virGetLastErrorMessage()); } } else { ret =3D -1; VIR_TEST_DEBUG("Expected result code=3D%d but received code=3D%d", - expectResult, result); + info->expectResult, result); } virResetLastError(); =20 return ret; } =20 -struct testInfo { - const char *name; - unsigned int flags; - testCompareNetXML2XMLResult expectResult; - virNetworkXMLOption *xmlopt; -}; - -static int -testCompareXMLToXMLHelper(const void *data) -{ - const struct testInfo *info =3D data; - int result =3D -1; - g_autofree char *inxml =3D NULL; - g_autofree char *outxml =3D NULL; - - inxml =3D g_strdup_printf("%s/networkxml2xmlin/%s.xml", abs_srcdir, in= fo->name); - outxml =3D g_strdup_printf("%s/networkxml2xmlout/%s.xml", abs_srcdir, = info->name); - - result =3D testCompareXMLToXMLFiles(inxml, outxml, info->flags, - info->expectResult, info->xmlopt); - - return result; -} =20 static void testRun(const char *name, @@ -112,8 +95,16 @@ testRun(const char *name, { g_autofree char *name_xml2xml =3D g_strdup_printf("Network XML-2-XML %= s", name); struct testInfo info =3D { .name =3D name, .flags =3D flags, .expectRe= sult =3D expectResult, .xmlopt =3D xmlopt }; + g_autofree char *inxml =3D NULL; + g_autofree char *outxml =3D NULL; =20 - virTestRunLog(ret, name_xml2xml, testCompareXMLToXMLHelper, &info); + inxml =3D g_strdup_printf("%s/networkxml2xmlin/%s.xml", abs_srcdir, na= me); + outxml =3D g_strdup_printf("%s/networkxml2xmlout/%s.xml", abs_srcdir, = name); + + info.inxml =3D inxml; + info.outxml =3D outxml; + + virTestRunLog(ret, name_xml2xml, testCompareXMLToXMLFiles, &info); } =20 static int --=20 2.52.0 From nobody Mon Feb 2 05:55:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769611746; cv=none; d=zohomail.com; s=zohoarc; b=nCXqC4IcIEXDxIyuv6OaK4Gyr6N1oGT6Y7U0AFGqqZQbhUpUu3r7GDZGTE+X6yO/wdenN0APk2n2rIENccdcs/U1ls8tayujezWA+eaiaO+M0G8YXlAO4nC6dhvXx6DmOr//MkNXB9gRuNlw8BPhg4F0X74mUNi9a+M62pa7eEw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769611746; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=f8DAVJ6ZR+/eTT31cgOO7CN8BvHHQAdaE5pniYzzlhs=; b=GepXamVd42adys2FMjI5LJohFZ19VgJFgfKT7p3OAdQvDkvzWXLtVSJllmMGQvYhXiBmbcEEWAAjwO7UFUugYifFTGEldP7O40ebbwkCwURJL9rKeU/yfqYe5uQaUoW8PqXXZ+0SxrqH2n7HH6LcxSkK9lDaXGGlng1FWzZvtSY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769611746136975.8241672158895; Wed, 28 Jan 2026 06:49:06 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 4513641891; Wed, 28 Jan 2026 09:49:05 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id D8BAE43E4C; Wed, 28 Jan 2026 09:34:53 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 6C17C41919; Wed, 28 Jan 2026 09:34:49 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id C579043E58 for ; Wed, 28 Jan 2026 09:31:04 -0500 (EST) Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-414-RzOJtXa5MFCp1EgSU6HOyQ-1; Wed, 28 Jan 2026 09:31:02 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DF47A18005BC for ; Wed, 28 Jan 2026 14:31:01 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4862C1956095 for ; Wed, 28 Jan 2026 14:31:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769610664; h=from:from: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; bh=f8DAVJ6ZR+/eTT31cgOO7CN8BvHHQAdaE5pniYzzlhs=; b=HNcDY0Y+YjM2FwWv/boXLjtuW7DcQEnna+GEf9jaX+yI6W92GPYgEkOYgF4gp80bZlHegl 3zHWlDu1i45vuvF4hWUhtSmXFFV8ZK/9nkOuOy/6HfE27W+fKwxpLXFo+KqoY43dncnEBI 6Bnkp+yqNVDhyyhX2A1MCCBeJjSy42A= X-MC-Unique: RzOJtXa5MFCp1EgSU6HOyQ-1 X-Mimecast-MFC-AGG-ID: RzOJtXa5MFCp1EgSU6HOyQ_1769610662 To: devel@lists.libvirt.org Subject: [PATCH 15/20] networkxml2xmltest: Dynamically allocate testInfo struct Date: Wed, 28 Jan 2026 15:30:36 +0100 Message-ID: <4903529385a51470cadebcf08df467db06ab6c2f.1769610369.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: tdhCPRuhpCuX6TaGKMiT8lofNfV1YW37AWZBWlFflw4_1769610662 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: FNH2VPZIDPZU6GWTC7NJCIVIYUTRABYJ X-Message-ID-Hash: FNH2VPZIDPZU6GWTC7NJCIVIYUTRABYJ X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769611746409158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik So far, the testInfo struct contained immutable data (from its lifetime point of view). But that is about to change. For instance, it will hold parsed network definition (virNetworkDef) and in order to avoid leaking dynamically allocated data corresponding free function must be introduced (or clear function, doesn't really matter). At this point, the structure might as well be dynamically allocated entirely. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- tests/networkxml2xmltest.c | 41 +++++++++++++++++++++++++------------- 1 file changed, 27 insertions(+), 14 deletions(-) diff --git a/tests/networkxml2xmltest.c b/tests/networkxml2xmltest.c index 2a537d77c0..e90b38088a 100644 --- a/tests/networkxml2xmltest.c +++ b/tests/networkxml2xmltest.c @@ -22,19 +22,33 @@ typedef enum { TEST_COMPARE_NET_XML2XML_RESULT_FAIL_COMPARE, } testCompareNetXML2XMLResult; =20 -struct testInfo { +struct _testInfo { const char *name; unsigned int flags; testCompareNetXML2XMLResult expectResult; - virNetworkXMLOption *xmlopt; - const char *inxml; - const char *outxml; + virNetworkXMLOption *xmlopt; /* borrowed, immutable */ + char *inxml; + char *outxml; }; =20 +typedef struct _testInfo testInfo; +void testInfoFree(testInfo *info); +G_DEFINE_AUTOPTR_CLEANUP_FUNC(testInfo, testInfoFree); + +void testInfoFree(testInfo *info) +{ + if (!info) + return; + + VIR_FREE(info->inxml); + VIR_FREE(info->outxml); + VIR_FREE(info); +} + static int testCompareXMLToXMLFiles(const void *data) { - struct testInfo *info =3D (void *) data; + testInfo *info =3D (void *) data; g_autofree char *actual =3D NULL; int ret; testCompareNetXML2XMLResult result =3D TEST_COMPARE_NET_XML2XML_RESULT= _SUCCESS; @@ -94,17 +108,16 @@ testRun(const char *name, unsigned int flags) { g_autofree char *name_xml2xml =3D g_strdup_printf("Network XML-2-XML %= s", name); - struct testInfo info =3D { .name =3D name, .flags =3D flags, .expectRe= sult =3D expectResult, .xmlopt =3D xmlopt }; - g_autofree char *inxml =3D NULL; - g_autofree char *outxml =3D NULL; + g_autoptr(testInfo) info =3D g_new0(testInfo, 1); =20 - inxml =3D g_strdup_printf("%s/networkxml2xmlin/%s.xml", abs_srcdir, na= me); - outxml =3D g_strdup_printf("%s/networkxml2xmlout/%s.xml", abs_srcdir, = name); + info->name =3D name; + info->flags =3D flags; + info->expectResult =3D expectResult; + info->xmlopt =3D xmlopt; + info->inxml =3D g_strdup_printf("%s/networkxml2xmlin/%s.xml", abs_srcd= ir, name); + info->outxml =3D g_strdup_printf("%s/networkxml2xmlout/%s.xml", abs_sr= cdir, name); =20 - info.inxml =3D inxml; - info.outxml =3D outxml; - - virTestRunLog(ret, name_xml2xml, testCompareXMLToXMLFiles, &info); + virTestRunLog(ret, name_xml2xml, testCompareXMLToXMLFiles, info); } =20 static int --=20 2.52.0 From nobody Mon Feb 2 05:55:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769611785; cv=none; d=zohomail.com; s=zohoarc; b=awFOL86V+i6AZsjneMn6bVLcINnbDdhoSTKKu60Us24l2HyKhRKAPB0zDMcfRTOLX0VSdtrMjF79JxXnPy6GxAj0YpRcvP32LRiYe6Xe0OcIk8a8n1OBfPcXr3FC4bSEJoHAASXZz7NAXKnYgnxI/bfGTfrhhmE4xhLHXbKa1yo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769611785; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=iksSlpLfge8Q2js8310W6/rPGaF4rWFENHguOpKWJ+4=; b=dYO5Y64/OjLM2SRFQDbCkjAZycFKdMilS6VUAiFymsJto8ICh5sS/cztzmll6NU+7OvtOrTIGihF7oVWme7oYpaF3fjusg1Emo5IKU/a81L1ZFJf695XoyRYrjLti2MI34N4WlO6ELbYkh3yQxAHMtwqAUX6KArzl0De43TydJg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769611785614158.23079171125448; Wed, 28 Jan 2026 06:49:45 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 1017D3F83A; Wed, 28 Jan 2026 09:49:45 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 9454943E01; Wed, 28 Jan 2026 09:35:24 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 6FE6343DBB; Wed, 28 Jan 2026 09:35:21 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id B4DDE43E6D for ; Wed, 28 Jan 2026 09:31:05 -0500 (EST) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-437-FlFkLpH-OdW-iGWeBjQdYA-1; Wed, 28 Jan 2026 09:31:03 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DEB8D1955DA7 for ; Wed, 28 Jan 2026 14:31:02 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4756819541AA for ; Wed, 28 Jan 2026 14:31:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769610665; h=from:from: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; bh=iksSlpLfge8Q2js8310W6/rPGaF4rWFENHguOpKWJ+4=; b=UBDajWWIu0ImOrxSUmg8hBerYJn1+q/8JfO7edDat9ElGILbtCnTMYI9Wmf/C0N7WsWpJl IKw1t5TQ/meTXGp3dRpv0A69+ORzEVw+PsDEfvg9Cy6xZftfkgVtPoYLePwezIToMpHBxT Bpb4phxX68Ty7ZO4qIe7iJ0hs0ixKHw= X-MC-Unique: FlFkLpH-OdW-iGWeBjQdYA-1 X-Mimecast-MFC-AGG-ID: FlFkLpH-OdW-iGWeBjQdYA_1769610663 To: devel@lists.libvirt.org Subject: [PATCH 16/20] networkxml2xmltest: Store parsed def for future tests Date: Wed, 28 Jan 2026 15:30:37 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: oNZ8omRixL7MYRuLuN77VJn7FmEIoiNdF5Iv8Ap1Yuo_1769610663 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: QJ62IQ2WNKKKDILERJKLD7QDZAD5U6BJ X-Message-ID-Hash: QJ62IQ2WNKKKDILERJKLD7QDZAD5U6BJ X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769611788818154100 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Soon, the testRun() will run more than one test case. The input network XML, however, stays the same. Instead of parsing it and throwing away immediately, store it temporarily. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- tests/networkxml2xmltest.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/networkxml2xmltest.c b/tests/networkxml2xmltest.c index e90b38088a..4a4cf329e4 100644 --- a/tests/networkxml2xmltest.c +++ b/tests/networkxml2xmltest.c @@ -27,6 +27,7 @@ struct _testInfo { unsigned int flags; testCompareNetXML2XMLResult expectResult; virNetworkXMLOption *xmlopt; /* borrowed, immutable */ + virNetworkDef *def; char *inxml; char *outxml; }; @@ -40,6 +41,7 @@ void testInfoFree(testInfo *info) if (!info) return; =20 + virNetworkDefFree(info->def); VIR_FREE(info->inxml); VIR_FREE(info->outxml); VIR_FREE(info); @@ -52,23 +54,23 @@ testCompareXMLToXMLFiles(const void *data) g_autofree char *actual =3D NULL; int ret; testCompareNetXML2XMLResult result =3D TEST_COMPARE_NET_XML2XML_RESULT= _SUCCESS; - g_autoptr(virNetworkDef) dev =3D NULL; + g_autoptr(virNetworkDef) def =3D NULL; =20 - if (!(dev =3D virNetworkDefParse(NULL, info->inxml, info->xmlopt, fals= e))) { + if (!(def =3D virNetworkDefParse(NULL, info->inxml, info->xmlopt, fals= e))) { result =3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_PARSE; goto cleanup; } if (info->expectResult =3D=3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_PAR= SE) goto cleanup; =20 - if (networkValidateTests(dev) < 0) { + if (networkValidateTests(def) < 0) { result =3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_VALIDATE; goto cleanup; } if (info->expectResult =3D=3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_VAL= IDATE) goto cleanup; =20 - if (!(actual =3D virNetworkDefFormat(dev, info->xmlopt, info->flags)))= { + if (!(actual =3D virNetworkDefFormat(def, info->xmlopt, info->flags)))= { result =3D TEST_COMPARE_NET_XML2XML_RESULT_FAIL_FORMAT; goto cleanup; } @@ -88,6 +90,8 @@ testCompareXMLToXMLFiles(const void *data) if (info->expectResult !=3D TEST_COMPARE_NET_XML2XML_RESULT_SUCCES= S) { VIR_TEST_DEBUG("Got expected failure code=3D%d msg=3D%s", result, virGetLastErrorMessage()); + } else { + info->def =3D g_steal_pointer(&def); } } else { ret =3D -1; --=20 2.52.0 From nobody Mon Feb 2 05:55:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769611906; cv=none; d=zohomail.com; s=zohoarc; b=kamTZEOWM962Ir4hl6xt2AZ2tCJyQTpj5Y9NJDpZSGhsxiaYgOiTmg1RyuE06b+PVb9pQyUN+JDqKS1x37qaL5FkgZO2DS/ntKTfZK+xDBe8wnFqm3PO8JwH0mLcOKUjMjYxZUgVv0jq/1Hlow7Y/csaxmfyLDWStBTCoQWCEzA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769611906; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=xj20haLosiFpcxpeR03nGY0w3BvFWAHKc7VeggGIYCQ=; b=mSN77qxaVOxd38DODh3WwpAAX1FIP2uJ77kpGsZUFP/UeJ/ZIPjOHbuLSBFZz36c5Wq6dhu4g2Y4riCjeodT2hhPGHGwT9Ud56cHmqo6xGj29Ifvktg6Jm3eN6JqS+65PiJYrMg8sfW0p4GAyCCFB+45Gp9sJJ/bx2Xupr592zw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769611906621894.6663465286385; Wed, 28 Jan 2026 06:51:46 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 9109541A72; Wed, 28 Jan 2026 09:51:45 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id CC04F41999; Wed, 28 Jan 2026 09:37:52 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id B2DC843E00; Wed, 28 Jan 2026 09:37:48 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 94D0843EC7 for ; Wed, 28 Jan 2026 09:31:07 -0500 (EST) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-47-rpGrZGnTOnizOwntfS0bww-1; Wed, 28 Jan 2026 09:31:04 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 18CA019775A7 for ; Wed, 28 Jan 2026 14:31:04 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 465DF1956095 for ; Wed, 28 Jan 2026 14:31:03 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769610667; h=from:from: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; bh=xj20haLosiFpcxpeR03nGY0w3BvFWAHKc7VeggGIYCQ=; b=a+s5SGxGQAYKtuQwZ1WITjqDrX+oQEMboiunzuZZ5AKWkSHcz9z+S4+c3mWinxjk/WY4Gf feFBUCWB8SmSnkzMtzemFo5x8yLGIx/2SFSppw4YNrCEoqiXLHk5lKpHPy4BFk75IfMZvw f0AAqUFuj0SpsTAb2SSl3Tw8sBiaG04= X-MC-Unique: rpGrZGnTOnizOwntfS0bww-1 X-Mimecast-MFC-AGG-ID: rpGrZGnTOnizOwntfS0bww_1769610664 To: devel@lists.libvirt.org Subject: [PATCH 17/20] networkxml2xmltest: Sync test cases with networkxml2conftest Date: Wed, 28 Jan 2026 15:30:38 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: aRgak_8k22eQTp01WLI1etvfHtbGTcdO_KBRwagdjlU_1769610664 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: NEWYL54S4FLYWGUC2I6LRJMEWCTQM2A4 X-Message-ID-Hash: NEWYL54S4FLYWGUC2I6LRJMEWCTQM2A4 X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769611907543158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik The networkxml2xmltest does basic parse -> format tests. The networkxml2conftest does parse -> conf tests. Now, majority of XMLs are the same. That is, output XMLs of networkxml2xmltest and input XMls of networkxml2conftest. There are only a few differences. This is actually great, because it will allow either tests to do both test cases. There are some (subtle) differences in individual test cases though: 1) some test cases exist only in networkxml2conftest and not networkxml2xmltest, or 2) some test cases in networkxml2conftest have more values, i.e. extra elements, extra attributes. or 3) some test cases in networkxml2conftest have less values. For cases from 1) they were just copied over. For cases from 2) those extra elements/attributes were added, and for cases from 3) those extra attributes were removed (to minimize changes to .conf files in near future). One caveat though: networkxml2xmlupdatetest uses input XMLs of networkxml2xmltest too (hence changes under networkxml2xmlupdateout/ dir). This means that the "delete-srv-record-protocol" test started failing, because the input network XML now has more records than the test case anticipated. But this is easy to fix - hence seemingly unrelated change under networkxml2xmlupdatein/ dir. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- .../nat-network-dns-srv-record-minimal.conf | 2 +- .../nat-network-dns-srv-record-minimal.xml | 2 +- .../nat-network-dns-srv-record.conf | 2 +- .../nat-network-dns-srv-record.xml | 2 +- ...cord-minimal.xml =3D> dhcp6-nat-network.xml} | 19 ++++++++------- .../dhcp6-network.xml} | 24 +++++++------------ .../nat-network-dns-forwarders.xml | 3 ++- .../nat-network-dns-hosts.xml | 1 + ...s.xml =3D> nat-network-dns-local-domain.xml} | 7 +----- .../nat-network-dns-srv-record-minimal.xml | 2 +- .../nat-network-dns-srv-record.xml | 6 +++++ .../nat-network-name-with-quotes.xml} | 2 +- .../ptr-domains-auto.xml} | 10 ++++---- ...s-srv-record.xml =3D> dhcp6-nat-network.xml} | 13 ++++++---- ...v-record-minimal.xml =3D> dhcp6-network.xml} | 23 +++++++----------- .../nat-network-dns-forwarders.xml | 3 ++- .../nat-network-dns-hosts.xml | 1 + ...s.xml =3D> nat-network-dns-local-domain.xml} | 7 +----- .../nat-network-dns-srv-record-minimal.xml | 2 +- .../nat-network-dns-srv-record.xml | 6 +++++ .../nat-network-name-with-quotes.xml} | 3 ++- ...ecord-minimal.xml =3D> ptr-domains-auto.xml} | 9 +++---- tests/networkxml2xmltest.c | 6 ++++- .../srv-record-protocol.xml | 2 +- .../nat-network-dns-hosts-modified.xml | 1 + .../nat-network-dns-more-hosts.xml | 1 + .../nat-network-dns-srv-records.xml | 6 +++++ .../nat-network-forward-ifaces.xml | 6 +++++ .../nat-network-no-forward-ifaces.xml | 6 +++++ .../nat-network-no-hosts.xml | 1 + tests/networkxml2xmlupdateout/nat-network.xml | 8 +++++++ 31 files changed, 106 insertions(+), 80 deletions(-) copy tests/networkxml2xmlin/{nat-network-dns-srv-record-minimal.xml =3D> d= hcp6-nat-network.xml} (53%) copy tests/{networkxml2xmlupdateout/nat-network.xml =3D> networkxml2xmlin/= dhcp6-network.xml} (29%) copy tests/networkxml2xmlin/{nat-network-dns-forwarders.xml =3D> nat-netwo= rk-dns-local-domain.xml} (55%) copy tests/{networkxml2confdata/nat-network-dns-srv-record-minimal.xml =3D= > networkxml2xmlin/nat-network-name-with-quotes.xml} (95%) copy tests/{networkxml2xmlupdateout/nat-network.xml =3D> networkxml2xmlin/= ptr-domains-auto.xml} (74%) copy tests/networkxml2xmlout/{nat-network-dns-srv-record.xml =3D> dhcp6-na= t-network.xml} (59%) copy tests/networkxml2xmlout/{nat-network-dns-srv-record-minimal.xml =3D> = dhcp6-network.xml} (39%) copy tests/networkxml2xmlout/{nat-network-dns-forwarders.xml =3D> nat-netw= ork-dns-local-domain.xml} (62%) copy tests/{networkxml2confdata/nat-network-dns-srv-record-minimal.xml =3D= > networkxml2xmlout/nat-network-name-with-quotes.xml} (90%) copy tests/networkxml2xmlout/{nat-network-dns-srv-record-minimal.xml =3D> = ptr-domains-auto.xml} (79%) diff --git a/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.c= onf b/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.conf index bd560ba3f4..4757f824da 100644 --- a/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.conf +++ b/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.conf @@ -15,5 +15,5 @@ dhcp-authoritative dhcp-lease-max=3D253 dhcp-hostsfile=3D/var/lib/libvirt/dnsmasq/default.hostsfile addn-hosts=3D/var/lib/libvirt/dnsmasq/default.addnhosts -dhcp-range=3Dfc00:db8:ac10:fe01::1,ra-only +dhcp-range=3D2001:db8:ac10:fe01::1,ra-only dhcp-range=3Dfc00:db8:ac10:fd01::1,ra-only diff --git a/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.x= ml b/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.xml index 13b1c247d5..83838d01d3 100644 --- a/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.xml +++ b/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.xml @@ -17,7 +17,7 @@ - + diff --git a/tests/networkxml2confdata/nat-network-dns-srv-record.conf b/te= sts/networkxml2confdata/nat-network-dns-srv-record.conf index 22bf3b1de9..c83148cc0a 100644 --- a/tests/networkxml2confdata/nat-network-dns-srv-record.conf +++ b/tests/networkxml2confdata/nat-network-dns-srv-record.conf @@ -8,7 +8,7 @@ strict-order except-interface=3Dlo bind-dynamic interface=3Dvirbr0 -srv-host=3D_name._tcp.test-domain-name.com,test.example.com,1111,11,111 +srv-host=3D_name._tcp.test-domain-name srv-host=3D_name2._udp,test2.example.com,2222,22,222 srv-host=3D_name3._tcp.test3.com,test3.example.com,3333,33 srv-host=3D_name4._tcp.test4.com,test4.example.com,4444 diff --git a/tests/networkxml2confdata/nat-network-dns-srv-record.xml b/tes= ts/networkxml2confdata/nat-network-dns-srv-record.xml index d01b331fb1..0369f4caa9 100644 --- a/tests/networkxml2confdata/nat-network-dns-srv-record.xml +++ b/tests/networkxml2confdata/nat-network-dns-srv-record.xml @@ -6,7 +6,7 @@ - + diff --git a/tests/networkxml2xmlin/nat-network-dns-srv-record-minimal.xml = b/tests/networkxml2xmlin/dhcp6-nat-network.xml similarity index 53% copy from tests/networkxml2xmlin/nat-network-dns-srv-record-minimal.xml copy to tests/networkxml2xmlin/dhcp6-nat-network.xml index a18afae2fd..cab0700f2b 100644 --- a/tests/networkxml2xmlin/nat-network-dns-srv-record-minimal.xml +++ b/tests/networkxml2xmlin/dhcp6-nat-network.xml @@ -1,25 +1,26 @@ default 81ff0d90-c91e-6742-64da-4a736edb9a9b - - - + - - - - + - - + + + + + + + + diff --git a/tests/networkxml2xmlupdateout/nat-network.xml b/tests/networkx= ml2xmlin/dhcp6-network.xml similarity index 29% copy from tests/networkxml2xmlupdateout/nat-network.xml copy to tests/networkxml2xmlin/dhcp6-network.xml index 93bc7db51d..ae9ff1f32c 100644 --- a/tests/networkxml2xmlupdateout/nat-network.xml +++ b/tests/networkxml2xmlin/dhcp6-network.xml @@ -1,23 +1,17 @@ default 81ff0d90-c91e-6742-64da-4a736edb9a9b - - - + - + + - - - + + + + + + - - - - - - - - diff --git a/tests/networkxml2xmlin/nat-network-dns-forwarders.xml b/tests/= networkxml2xmlin/nat-network-dns-forwarders.xml index dd22b686ab..70123720b9 100644 --- a/tests/networkxml2xmlin/nat-network-dns-forwarders.xml +++ b/tests/networkxml2xmlin/nat-network-dns-forwarders.xml @@ -6,7 +6,8 @@ - + + diff --git a/tests/networkxml2xmlin/nat-network-dns-hosts.xml b/tests/netwo= rkxml2xmlin/nat-network-dns-hosts.xml index c28ebd8c4b..6c027423f4 100644 --- a/tests/networkxml2xmlin/nat-network-dns-hosts.xml +++ b/tests/networkxml2xmlin/nat-network-dns-hosts.xml @@ -3,6 +3,7 @@ 81ff0d90-c91e-6742-64da-4a736edb9a9c + pudding diff --git a/tests/networkxml2xmlin/nat-network-dns-forwarders.xml b/tests/= networkxml2xmlin/nat-network-dns-local-domain.xml similarity index 55% copy from tests/networkxml2xmlin/nat-network-dns-forwarders.xml copy to tests/networkxml2xmlin/nat-network-dns-local-domain.xml index dd22b686ab..a92d71f1f2 100644 --- a/tests/networkxml2xmlin/nat-network-dns-forwarders.xml +++ b/tests/networkxml2xmlin/nat-network-dns-local-domain.xml @@ -3,12 +3,7 @@ 81ff0d90-c91e-6742-64da-4a736edb9a9c - - - - - - + diff --git a/tests/networkxml2xmlin/nat-network-dns-srv-record-minimal.xml = b/tests/networkxml2xmlin/nat-network-dns-srv-record-minimal.xml index a18afae2fd..83838d01d3 100644 --- a/tests/networkxml2xmlin/nat-network-dns-srv-record-minimal.xml +++ b/tests/networkxml2xmlin/nat-network-dns-srv-record-minimal.xml @@ -19,7 +19,7 @@ - + diff --git a/tests/networkxml2xmlin/nat-network-dns-srv-record.xml b/tests/= networkxml2xmlin/nat-network-dns-srv-record.xml index 3dd19e6698..0369f4caa9 100644 --- a/tests/networkxml2xmlin/nat-network-dns-srv-record.xml +++ b/tests/networkxml2xmlin/nat-network-dns-srv-record.xml @@ -7,6 +7,12 @@ + + + + + + diff --git a/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.x= ml b/tests/networkxml2xmlin/nat-network-name-with-quotes.xml similarity index 95% copy from tests/networkxml2confdata/nat-network-dns-srv-record-minimal.xml copy to tests/networkxml2xmlin/nat-network-name-with-quotes.xml index 13b1c247d5..eba75d2e2d 100644 --- a/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.xml +++ b/tests/networkxml2xmlin/nat-network-name-with-quotes.xml @@ -1,5 +1,5 @@ - default + default"with"quotes" 81ff0d90-c91e-6742-64da-4a736edb9a9b diff --git a/tests/networkxml2xmlupdateout/nat-network.xml b/tests/networkx= ml2xmlin/ptr-domains-auto.xml similarity index 74% copy from tests/networkxml2xmlupdateout/nat-network.xml copy to tests/networkxml2xmlin/ptr-domains-auto.xml index 93bc7db51d..7fe12dc671 100644 --- a/tests/networkxml2xmlupdateout/nat-network.xml +++ b/tests/networkxml2xmlin/ptr-domains-auto.xml @@ -1,20 +1,18 @@ default 81ff0d90-c91e-6742-64da-4a736edb9a9b - - - + - + - + - + diff --git a/tests/networkxml2xmlout/nat-network-dns-srv-record.xml b/tests= /networkxml2xmlout/dhcp6-nat-network.xml similarity index 59% copy from tests/networkxml2xmlout/nat-network-dns-srv-record.xml copy to tests/networkxml2xmlout/dhcp6-nat-network.xml index 1486fc3224..44bb2d1f5d 100644 --- a/tests/networkxml2xmlout/nat-network-dns-srv-record.xml +++ b/tests/networkxml2xmlout/dhcp6-nat-network.xml @@ -6,9 +6,6 @@ - - - @@ -18,9 +15,15 @@ - - + + + + + + + + diff --git a/tests/networkxml2xmlout/nat-network-dns-srv-record-minimal.xml= b/tests/networkxml2xmlout/dhcp6-network.xml similarity index 39% copy from tests/networkxml2xmlout/nat-network-dns-srv-record-minimal.xml copy to tests/networkxml2xmlout/dhcp6-network.xml index 50e968be9d..cabe833e03 100644 --- a/tests/networkxml2xmlout/nat-network-dns-srv-record-minimal.xml +++ b/tests/networkxml2xmlout/dhcp6-network.xml @@ -6,22 +6,15 @@ - - - - + + - - - + + + + + + - - - - - - - - diff --git a/tests/networkxml2xmlout/nat-network-dns-forwarders.xml b/tests= /networkxml2xmlout/nat-network-dns-forwarders.xml index 170b043d09..ee8ba7b1dd 100644 --- a/tests/networkxml2xmlout/nat-network-dns-forwarders.xml +++ b/tests/networkxml2xmlout/nat-network-dns-forwarders.xml @@ -9,7 +9,8 @@ - + + diff --git a/tests/networkxml2xmlout/nat-network-dns-hosts.xml b/tests/netw= orkxml2xmlout/nat-network-dns-hosts.xml index 548282e514..f8a609f9cb 100644 --- a/tests/networkxml2xmlout/nat-network-dns-hosts.xml +++ b/tests/networkxml2xmlout/nat-network-dns-hosts.xml @@ -6,6 +6,7 @@ + pudding diff --git a/tests/networkxml2xmlout/nat-network-dns-forwarders.xml b/tests= /networkxml2xmlout/nat-network-dns-local-domain.xml similarity index 62% copy from tests/networkxml2xmlout/nat-network-dns-forwarders.xml copy to tests/networkxml2xmlout/nat-network-dns-local-domain.xml index 170b043d09..33f4bbfc32 100644 --- a/tests/networkxml2xmlout/nat-network-dns-forwarders.xml +++ b/tests/networkxml2xmlout/nat-network-dns-local-domain.xml @@ -6,12 +6,7 @@ - - - - - - + diff --git a/tests/networkxml2xmlout/nat-network-dns-srv-record-minimal.xml= b/tests/networkxml2xmlout/nat-network-dns-srv-record-minimal.xml index 50e968be9d..16032c9af2 100644 --- a/tests/networkxml2xmlout/nat-network-dns-srv-record-minimal.xml +++ b/tests/networkxml2xmlout/nat-network-dns-srv-record-minimal.xml @@ -20,7 +20,7 @@ - + diff --git a/tests/networkxml2xmlout/nat-network-dns-srv-record.xml b/tests= /networkxml2xmlout/nat-network-dns-srv-record.xml index 1486fc3224..0f54a72f95 100644 --- a/tests/networkxml2xmlout/nat-network-dns-srv-record.xml +++ b/tests/networkxml2xmlout/nat-network-dns-srv-record.xml @@ -8,6 +8,12 @@ + + + + + + diff --git a/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.x= ml b/tests/networkxml2xmlout/nat-network-name-with-quotes.xml similarity index 90% copy from tests/networkxml2confdata/nat-network-dns-srv-record-minimal.xml copy to tests/networkxml2xmlout/nat-network-name-with-quotes.xml index 13b1c247d5..c0a9cedc7d 100644 --- a/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.xml +++ b/tests/networkxml2xmlout/nat-network-name-with-quotes.xml @@ -1,10 +1,11 @@ - default + default"with"quotes" 81ff0d90-c91e-6742-64da-4a736edb9a9b + diff --git a/tests/networkxml2xmlout/nat-network-dns-srv-record-minimal.xml= b/tests/networkxml2xmlout/ptr-domains-auto.xml similarity index 79% copy from tests/networkxml2xmlout/nat-network-dns-srv-record-minimal.xml copy to tests/networkxml2xmlout/ptr-domains-auto.xml index 50e968be9d..fe2047b708 100644 --- a/tests/networkxml2xmlout/nat-network-dns-srv-record-minimal.xml +++ b/tests/networkxml2xmlout/ptr-domains-auto.xml @@ -6,19 +6,16 @@ - - - - + - + - + diff --git a/tests/networkxml2xmltest.c b/tests/networkxml2xmltest.c index 4a4cf329e4..a8dacfe0f3 100644 --- a/tests/networkxml2xmltest.c +++ b/tests/networkxml2xmltest.c @@ -144,6 +144,8 @@ mymain(void) #define DO_TEST_VALIDATE_ERROR(name) \ DO_TEST_FULL(name, 0, TEST_COMPARE_NET_XML2XML_RESULT_FAIL_VALIDATE) =20 + DO_TEST("dhcp6-network"); + DO_TEST("dhcp6-nat-network"); DO_TEST("dhcp6host-routed-network"); DO_TEST("empty-allow-ipv6"); DO_TEST("isolated-network"); @@ -164,9 +166,11 @@ mymain(void) DO_TEST("nat-network-dns-forward-plain"); DO_TEST("nat-network-dns-forwarders"); DO_TEST("nat-network-dns-forwarder-no-resolv"); + DO_TEST("nat-network-dns-local-domain"); DO_TEST("nat-network-forward-nat-ipv6"); DO_TEST("nat-network-forward-nat-address"); DO_TEST("nat-network-forward-nat-no-address"); + DO_TEST("nat-network-name-with-quotes"); DO_TEST("nat-network-mtu"); DO_TEST("8021Qbh-net"); DO_TEST("direct-net"); @@ -178,7 +182,7 @@ mymain(void) DO_TEST("hostdev"); DO_TEST_FLAGS("hostdev-pf", VIR_NETWORK_XML_INACTIVE); DO_TEST_FLAGS("hostdev-pf-driver-model", VIR_NETWORK_XML_INACTIVE); - + DO_TEST("ptr-domains-auto"); DO_TEST_VALIDATE_ERROR("passthrough-address-crash"); DO_TEST("nat-network-explicit-flood"); DO_TEST("host-bridge-no-flood"); diff --git a/tests/networkxml2xmlupdatein/srv-record-protocol.xml b/tests/n= etworkxml2xmlupdatein/srv-record-protocol.xml index 87478d033b..934a36a9be 100644 --- a/tests/networkxml2xmlupdatein/srv-record-protocol.xml +++ b/tests/networkxml2xmlupdatein/srv-record-protocol.xml @@ -1 +1 @@ - + diff --git a/tests/networkxml2xmlupdateout/nat-network-dns-hosts-modified.x= ml b/tests/networkxml2xmlupdateout/nat-network-dns-hosts-modified.xml index 8fcaad15d1..3183671376 100644 --- a/tests/networkxml2xmlupdateout/nat-network-dns-hosts-modified.xml +++ b/tests/networkxml2xmlupdateout/nat-network-dns-hosts-modified.xml @@ -5,6 +5,7 @@ + pudding diff --git a/tests/networkxml2xmlupdateout/nat-network-dns-more-hosts.xml b= /tests/networkxml2xmlupdateout/nat-network-dns-more-hosts.xml index 7b8a451b67..21e4ebde5f 100644 --- a/tests/networkxml2xmlupdateout/nat-network-dns-more-hosts.xml +++ b/tests/networkxml2xmlupdateout/nat-network-dns-more-hosts.xml @@ -5,6 +5,7 @@ + pudding diff --git a/tests/networkxml2xmlupdateout/nat-network-dns-srv-records.xml = b/tests/networkxml2xmlupdateout/nat-network-dns-srv-records.xml index eda9e20333..2bdd9321ff 100644 --- a/tests/networkxml2xmlupdateout/nat-network-dns-srv-records.xml +++ b/tests/networkxml2xmlupdateout/nat-network-dns-srv-records.xml @@ -7,6 +7,12 @@ + + + + + + diff --git a/tests/networkxml2xmlupdateout/nat-network-forward-ifaces.xml b= /tests/networkxml2xmlupdateout/nat-network-forward-ifaces.xml index 6b87cd8789..13d1fdfa6d 100644 --- a/tests/networkxml2xmlupdateout/nat-network-forward-ifaces.xml +++ b/tests/networkxml2xmlupdateout/nat-network-forward-ifaces.xml @@ -8,6 +8,12 @@ + + + + + + diff --git a/tests/networkxml2xmlupdateout/nat-network-no-forward-ifaces.xm= l b/tests/networkxml2xmlupdateout/nat-network-no-forward-ifaces.xml index ae49a3034e..79c97a508f 100644 --- a/tests/networkxml2xmlupdateout/nat-network-no-forward-ifaces.xml +++ b/tests/networkxml2xmlupdateout/nat-network-no-forward-ifaces.xml @@ -5,6 +5,12 @@ + + + + + + diff --git a/tests/networkxml2xmlupdateout/nat-network-no-hosts.xml b/tests= /networkxml2xmlupdateout/nat-network-no-hosts.xml index 679575973c..e3c88ff534 100644 --- a/tests/networkxml2xmlupdateout/nat-network-no-hosts.xml +++ b/tests/networkxml2xmlupdateout/nat-network-no-hosts.xml @@ -5,6 +5,7 @@ + pudding diff --git a/tests/networkxml2xmlupdateout/nat-network.xml b/tests/networkx= ml2xmlupdateout/nat-network.xml index 93bc7db51d..741352ef14 100644 --- a/tests/networkxml2xmlupdateout/nat-network.xml +++ b/tests/networkxml2xmlupdateout/nat-network.xml @@ -5,6 +5,14 @@ + + + + + + + + --=20 2.52.0 From nobody Mon Feb 2 05:55:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769612069; cv=none; d=zohomail.com; s=zohoarc; b=H+xwqxowHb2SreVR4TgYY3I07dyg9aIk2ABijK9YEiEVr04jCQPfAwC5YRJ60Hz8knzdXwMUpvuT2bxYelqof/Hruq4Pmo9C/2BIwOUBFelWjOWVkCH58vK93U8Y1F8jKpe6VqB5+2dw9fMQza0SG9/KoU5Rh9JfJnceBzYJk98= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769612069; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=GffwCIrcCkVoBk3VaTNyfxer2Vix1Kt4PLvB6ftPrEA=; b=OQv39ztVAi2s83r7rLofDq2Ik/YA3Ehc3eAQamaBcsTrF1NiIL9/61srehgZTHnfIzAHL0E8+J5/dENjMOA/d4ZsREQ2VgB++EE1r2di8xsNftrLHKnYe7qD89CK7l2zTdmgTEkhPUm+dYIsA6F2Ei1UmRWn+eystnjRBjHuc9c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769612069983625.6879750496386; Wed, 28 Jan 2026 06:54:29 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 2477541AEE; Wed, 28 Jan 2026 09:54:29 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 93D0E441C8; Wed, 28 Jan 2026 09:38:56 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 7C6F943EF0; Wed, 28 Jan 2026 09:38:50 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 22CAE43E5A for ; Wed, 28 Jan 2026 09:31:09 -0500 (EST) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-100-zVOe5O06O0G-FNUffwct7A-1; Wed, 28 Jan 2026 09:31:06 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 30EA01956096 for ; Wed, 28 Jan 2026 14:31:05 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 757E11956095 for ; Wed, 28 Jan 2026 14:31:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769610668; h=from:from: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; bh=GffwCIrcCkVoBk3VaTNyfxer2Vix1Kt4PLvB6ftPrEA=; b=bHCSj6SaPrVI2gpUoVR1urltF+nkg9HcNn21RRQS3QhuqD9RdmhXYbroCRHI5V1AgUrsXu FcgPTD6gj8ZD7NW3xE3a1NNYE+ricDyqp4qlNgNGWfr9AZDZHZs/3tiKi2qawj3McVN6eB nmZFiBtwxNqJwMNFEM4yT+UnyvnWWTE= X-MC-Unique: zVOe5O06O0G-FNUffwct7A-1 X-Mimecast-MFC-AGG-ID: zVOe5O06O0G-FNUffwct7A_1769610665 To: devel@lists.libvirt.org Subject: [PATCH 18/20] networkxml2xmltest: Do conf test Date: Wed, 28 Jan 2026 15:30:39 +0100 Message-ID: <53502d2416e8d537933427d96b7277b68de128b8.1769610369.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: -207zJLo0AOf6GLiYlPK9CeCRmMUMN3ucviuiS_RMlo_1769610665 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: F4PIOK5S3KJHII42HOF4CCRWBSRMARGI X-Message-ID-Hash: F4PIOK5S3KJHII42HOF4CCRWBSRMARGI X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769612070533158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/network/bridge_driver.c | 2 +- .../bandwidth-network.conf | 16 +++ .../nat-network-dns-srv-records.conf | 20 +++ .../nat-network-dns-srv-records.hostsfile | 2 + .../nat-network-explicit-flood.conf | 18 +++ .../nat-network-explicit-flood.hostsfile | 2 + .../nat-network-forward-nat-address.conf | 18 +++ .../nat-network-forward-nat-address.hostsfile | 2 + .../nat-network-forward-nat-ipv6.conf | 12 ++ .../nat-network-forward-nat-no-address.conf | 18 +++ ...t-network-forward-nat-no-address.hostsfile | 2 + tests/networkxml2confdata/passthrough-pf.conf | 11 ++ tests/networkxml2confdata/set-mtu.conf | 20 +++ tests/networkxml2xmltest.c | 136 +++++++++++++++++- 14 files changed, 277 insertions(+), 2 deletions(-) create mode 100644 tests/networkxml2confdata/bandwidth-network.conf create mode 100644 tests/networkxml2confdata/nat-network-dns-srv-records.c= onf create mode 100644 tests/networkxml2confdata/nat-network-dns-srv-records.h= ostsfile create mode 100644 tests/networkxml2confdata/nat-network-explicit-flood.co= nf create mode 100644 tests/networkxml2confdata/nat-network-explicit-flood.ho= stsfile create mode 100644 tests/networkxml2confdata/nat-network-forward-nat-addre= ss.conf create mode 100644 tests/networkxml2confdata/nat-network-forward-nat-addre= ss.hostsfile create mode 100644 tests/networkxml2confdata/nat-network-forward-nat-ipv6.= conf create mode 100644 tests/networkxml2confdata/nat-network-forward-nat-no-ad= dress.conf create mode 100644 tests/networkxml2confdata/nat-network-forward-nat-no-ad= dress.hostsfile create mode 100644 tests/networkxml2confdata/passthrough-pf.conf create mode 100644 tests/networkxml2confdata/set-mtu.conf diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 9636984390..104c298683 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -1178,7 +1178,7 @@ networkDnsmasqConfContents(virNetworkObj *obj, =20 /* create dnsmasq config file appropriate for this network */ =20 - /* Don't forget to update networkxml2conftest :-) */ + /* Don't forget to update networkxml2conftest and networkxml2xmltest := -) */ virBufferAsprintf(&configbuf, "##WARNING: THIS IS AN AUTO-GENERATED FILE. " "CHANGES TO IT ARE LIKELY TO BE\n" diff --git a/tests/networkxml2confdata/bandwidth-network.conf b/tests/netwo= rkxml2confdata/bandwidth-network.conf new file mode 100644 index 0000000000..d45b23ad7a --- /dev/null +++ b/tests/networkxml2confdata/bandwidth-network.conf @@ -0,0 +1,16 @@ +##WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE +##OVERWRITTEN AND LOST. Changes to this configuration should be made usin= g: +## virsh net-edit test-net +## or other application using the libvirt API. +## +## dnsmasq conf file created by libvirt +strict-order +except-interface=3Dlo +bind-dynamic +interface=3Dvirbr1 +dhcp-range=3D192.168.120.2,192.168.120.254,255.255.255.0 +dhcp-no-override +dhcp-authoritative +dhcp-lease-max=3D253 +dhcp-hostsfile=3D/var/lib/libvirt/dnsmasq/test-net.hostsfile +addn-hosts=3D/var/lib/libvirt/dnsmasq/test-net.addnhosts diff --git a/tests/networkxml2confdata/nat-network-dns-srv-records.conf b/t= ests/networkxml2confdata/nat-network-dns-srv-records.conf new file mode 100644 index 0000000000..b85eb85af3 --- /dev/null +++ b/tests/networkxml2confdata/nat-network-dns-srv-records.conf @@ -0,0 +1,20 @@ +##WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE +##OVERWRITTEN AND LOST. Changes to this configuration should be made usin= g: +## virsh net-edit default +## or other application using the libvirt API. +## +## dnsmasq conf file created by libvirt +strict-order +except-interface=3Dlo +bind-dynamic +interface=3Dvirbr0 +srv-host=3D_name._tcp.test-domain-name +srv-host=3D_name._tcp.donkey +dhcp-range=3D192.168.122.2,192.168.122.254,255.255.255.0 +dhcp-no-override +dhcp-authoritative +dhcp-lease-max=3D253 +dhcp-hostsfile=3D/var/lib/libvirt/dnsmasq/default.hostsfile +addn-hosts=3D/var/lib/libvirt/dnsmasq/default.addnhosts +dhcp-range=3D2001:db8:ac10:fe01::1,ra-only +dhcp-range=3D2001:db8:ac10:fd01::1,ra-only diff --git a/tests/networkxml2confdata/nat-network-dns-srv-records.hostsfil= e b/tests/networkxml2confdata/nat-network-dns-srv-records.hostsfile new file mode 100644 index 0000000000..deb3f00ac1 --- /dev/null +++ b/tests/networkxml2confdata/nat-network-dns-srv-records.hostsfile @@ -0,0 +1,2 @@ +00:16:3e:77:e2:ed,192.168.122.10,a.example.com +00:16:3e:3e:a9:1a,192.168.122.11,b.example.com diff --git a/tests/networkxml2confdata/nat-network-explicit-flood.conf b/te= sts/networkxml2confdata/nat-network-explicit-flood.conf new file mode 100644 index 0000000000..873a360acc --- /dev/null +++ b/tests/networkxml2confdata/nat-network-explicit-flood.conf @@ -0,0 +1,18 @@ +##WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE +##OVERWRITTEN AND LOST. Changes to this configuration should be made usin= g: +## virsh net-edit default +## or other application using the libvirt API. +## +## dnsmasq conf file created by libvirt +strict-order +except-interface=3Dlo +bind-dynamic +interface=3Dvirbr0 +dhcp-range=3D192.168.122.2,192.168.122.254,255.255.255.0 +dhcp-no-override +dhcp-authoritative +dhcp-lease-max=3D253 +dhcp-hostsfile=3D/var/lib/libvirt/dnsmasq/default.hostsfile +addn-hosts=3D/var/lib/libvirt/dnsmasq/default.addnhosts +dhcp-range=3D2001:db8:ac10:fe01::1,ra-only +dhcp-range=3D2001:db8:ac10:fd01::1,ra-only diff --git a/tests/networkxml2confdata/nat-network-explicit-flood.hostsfile= b/tests/networkxml2confdata/nat-network-explicit-flood.hostsfile new file mode 100644 index 0000000000..deb3f00ac1 --- /dev/null +++ b/tests/networkxml2confdata/nat-network-explicit-flood.hostsfile @@ -0,0 +1,2 @@ +00:16:3e:77:e2:ed,192.168.122.10,a.example.com +00:16:3e:3e:a9:1a,192.168.122.11,b.example.com diff --git a/tests/networkxml2confdata/nat-network-forward-nat-address.conf= b/tests/networkxml2confdata/nat-network-forward-nat-address.conf new file mode 100644 index 0000000000..873a360acc --- /dev/null +++ b/tests/networkxml2confdata/nat-network-forward-nat-address.conf @@ -0,0 +1,18 @@ +##WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE +##OVERWRITTEN AND LOST. Changes to this configuration should be made usin= g: +## virsh net-edit default +## or other application using the libvirt API. +## +## dnsmasq conf file created by libvirt +strict-order +except-interface=3Dlo +bind-dynamic +interface=3Dvirbr0 +dhcp-range=3D192.168.122.2,192.168.122.254,255.255.255.0 +dhcp-no-override +dhcp-authoritative +dhcp-lease-max=3D253 +dhcp-hostsfile=3D/var/lib/libvirt/dnsmasq/default.hostsfile +addn-hosts=3D/var/lib/libvirt/dnsmasq/default.addnhosts +dhcp-range=3D2001:db8:ac10:fe01::1,ra-only +dhcp-range=3D2001:db8:ac10:fd01::1,ra-only diff --git a/tests/networkxml2confdata/nat-network-forward-nat-address.host= sfile b/tests/networkxml2confdata/nat-network-forward-nat-address.hostsfile new file mode 100644 index 0000000000..deb3f00ac1 --- /dev/null +++ b/tests/networkxml2confdata/nat-network-forward-nat-address.hostsfile @@ -0,0 +1,2 @@ +00:16:3e:77:e2:ed,192.168.122.10,a.example.com +00:16:3e:3e:a9:1a,192.168.122.11,b.example.com diff --git a/tests/networkxml2confdata/nat-network-forward-nat-ipv6.conf b/= tests/networkxml2confdata/nat-network-forward-nat-ipv6.conf new file mode 100644 index 0000000000..3627bbaf1d --- /dev/null +++ b/tests/networkxml2confdata/nat-network-forward-nat-ipv6.conf @@ -0,0 +1,12 @@ +##WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE +##OVERWRITTEN AND LOST. Changes to this configuration should be made usin= g: +## virsh net-edit default +## or other application using the libvirt API. +## +## dnsmasq conf file created by libvirt +strict-order +except-interface=3Dlo +bind-dynamic +interface=3Dvirbr0 +addn-hosts=3D/var/lib/libvirt/dnsmasq/default.addnhosts +dhcp-range=3D2001:db8:ac10:fe01::1,ra-only diff --git a/tests/networkxml2confdata/nat-network-forward-nat-no-address.c= onf b/tests/networkxml2confdata/nat-network-forward-nat-no-address.conf new file mode 100644 index 0000000000..873a360acc --- /dev/null +++ b/tests/networkxml2confdata/nat-network-forward-nat-no-address.conf @@ -0,0 +1,18 @@ +##WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE +##OVERWRITTEN AND LOST. Changes to this configuration should be made usin= g: +## virsh net-edit default +## or other application using the libvirt API. +## +## dnsmasq conf file created by libvirt +strict-order +except-interface=3Dlo +bind-dynamic +interface=3Dvirbr0 +dhcp-range=3D192.168.122.2,192.168.122.254,255.255.255.0 +dhcp-no-override +dhcp-authoritative +dhcp-lease-max=3D253 +dhcp-hostsfile=3D/var/lib/libvirt/dnsmasq/default.hostsfile +addn-hosts=3D/var/lib/libvirt/dnsmasq/default.addnhosts +dhcp-range=3D2001:db8:ac10:fe01::1,ra-only +dhcp-range=3D2001:db8:ac10:fd01::1,ra-only diff --git a/tests/networkxml2confdata/nat-network-forward-nat-no-address.h= ostsfile b/tests/networkxml2confdata/nat-network-forward-nat-no-address.hos= tsfile new file mode 100644 index 0000000000..deb3f00ac1 --- /dev/null +++ b/tests/networkxml2confdata/nat-network-forward-nat-no-address.hostsfile @@ -0,0 +1,2 @@ +00:16:3e:77:e2:ed,192.168.122.10,a.example.com +00:16:3e:3e:a9:1a,192.168.122.11,b.example.com diff --git a/tests/networkxml2confdata/passthrough-pf.conf b/tests/networkx= ml2confdata/passthrough-pf.conf new file mode 100644 index 0000000000..1957dc8011 --- /dev/null +++ b/tests/networkxml2confdata/passthrough-pf.conf @@ -0,0 +1,11 @@ +##WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE +##OVERWRITTEN AND LOST. Changes to this configuration should be made usin= g: +## virsh net-edit local +## or other application using the libvirt API. +## +## dnsmasq conf file created by libvirt +strict-order +except-interface=3Dlo +bind-dynamic +interface=3D(null) +addn-hosts=3D/var/lib/libvirt/dnsmasq/local.addnhosts diff --git a/tests/networkxml2confdata/set-mtu.conf b/tests/networkxml2conf= data/set-mtu.conf new file mode 100644 index 0000000000..011a288a5b --- /dev/null +++ b/tests/networkxml2confdata/set-mtu.conf @@ -0,0 +1,20 @@ +##WARNING: THIS IS AN AUTO-GENERATED FILE. CHANGES TO IT ARE LIKELY TO BE +##OVERWRITTEN AND LOST. Changes to this configuration should be made usin= g: +## virsh net-edit private +## or other application using the libvirt API. +## +## dnsmasq conf file created by libvirt +strict-order +except-interface=3Dlo +bind-dynamic +interface=3Dvirbr2 +dhcp-option=3D3 +no-resolv +ra-param=3D*,0,0 +dhcp-range=3D192.168.152.2,192.168.152.254,255.255.255.0 +dhcp-no-override +dhcp-authoritative +dhcp-lease-max=3D253 +dhcp-hostsfile=3D/var/lib/libvirt/dnsmasq/private.hostsfile +addn-hosts=3D/var/lib/libvirt/dnsmasq/private.addnhosts +dhcp-option=3Doption:mtu,9000 diff --git a/tests/networkxml2xmltest.c b/tests/networkxml2xmltest.c index a8dacfe0f3..1d897c1fe4 100644 --- a/tests/networkxml2xmltest.c +++ b/tests/networkxml2xmltest.c @@ -11,6 +11,8 @@ #include "bridge_driver.h" #define LIBVIRT_BRIDGE_DRIVER_PRIV_H_ALLOW #include "bridge_driver_priv.h" +#define LIBVIRT_VIRCOMMANDPRIV_H_ALLOW +#include "vircommandpriv.h" =20 #define VIR_FROM_THIS VIR_FROM_NONE =20 @@ -27,9 +29,12 @@ struct _testInfo { unsigned int flags; testCompareNetXML2XMLResult expectResult; virNetworkXMLOption *xmlopt; /* borrowed, immutable */ + dnsmasqCaps *caps; virNetworkDef *def; char *inxml; char *outxml; + char *outconf; + char *outhostsfile; }; =20 typedef struct _testInfo testInfo; @@ -44,6 +49,8 @@ void testInfoFree(testInfo *info) virNetworkDefFree(info->def); VIR_FREE(info->inxml); VIR_FREE(info->outxml); + VIR_FREE(info->outconf); + VIR_FREE(info->outhostsfile); VIR_FREE(info); } =20 @@ -104,37 +111,163 @@ testCompareXMLToXMLFiles(const void *data) } =20 =20 +static int +testCompareXMLToConfFiles(const void *data) +{ + testInfo *info =3D (void *) data; + char *confactual =3D NULL; + g_autofree char *hostsfileactual =3D NULL; + int ret =3D -1; + virNetworkDef *def =3D NULL; + virNetworkObj *obj =3D NULL; + g_autofree char *pidfile =3D NULL; + g_autoptr(dnsmasqContext) dctx =3D NULL; + bool compareFailed =3D false; + + if (!(obj =3D virNetworkObjNew())) + goto fail; + + if (!(def =3D g_steal_pointer(&info->def))) { + /* Previous test wasn't executed. */ + if (!(def =3D virNetworkDefParse(NULL, info->inxml, info->xmlopt, = false))) + goto fail; + + if (networkValidateTests(def) < 0) { + virNetworkDefFree(def); + goto fail; + } + } + + virNetworkObjSetDef(obj, def); + + if (!networkNeedsDnsmasq(def)) + return EXIT_AM_SKIP; + + dctx =3D dnsmasqContextNew(def->name, "/var/lib/libvirt/dnsmasq"); + + if (dctx =3D=3D NULL) + goto fail; + + if (networkDnsmasqConfContents(obj, pidfile, &confactual, + &hostsfileactual, dctx, info->caps) < 0) + goto fail; + + /* Any changes to this function ^^ should be reflected here too. */ +#ifndef __linux__ + { + char * tmp; + + if (!(tmp =3D virStringReplace(confactual, + "except-interface=3Dlo0\n", + "except-interface=3Dlo\n"))) + goto fail; + VIR_FREE(confactual); + confactual =3D g_steal_pointer(&tmp); + } +#endif + + if (virTestCompareToFile(confactual, info->outconf) < 0) + compareFailed =3D true; + + if (hostsfileactual) { + if (virTestCompareToFile(hostsfileactual, info->outhostsfile) < 0)= { + compareFailed =3D true; + } + } else { + if (virFileExists(info->outhostsfile)) { + VIR_TEST_DEBUG("%s: hostsfile exists but the configuration did= not specify any host", + info->outhostsfile); + compareFailed =3D true; + } + } + + if (compareFailed) + goto fail; + + ret =3D 0; + + fail: + VIR_FREE(confactual); + virNetworkObjEndAPI(&obj); + return ret; +} + +static void +buildCapsCallback(const char *const*args, + const char *const*env G_GNUC_UNUSED, + const char *input G_GNUC_UNUSED, + char **output, + char **error G_GNUC_UNUSED, + int *status, + void *opaque G_GNUC_UNUSED) +{ + if (STREQ(args[0], "/usr/sbin/dnsmasq") && STREQ(args[1], "--version")= ) { + *output =3D g_strdup("Dnsmasq version 2.67\n"); + *status =3D EXIT_SUCCESS; + } else { + *status =3D EXIT_FAILURE; + } +} + + +static dnsmasqCaps * +buildCaps(void) +{ + g_autoptr(dnsmasqCaps) caps =3D NULL; + g_autoptr(virCommandDryRunToken) dryRunToken =3D virCommandDryRunToken= New(); + + virCommandSetDryRun(dryRunToken, NULL, true, true, buildCapsCallback, = NULL); + + caps =3D dnsmasqCapsNewFromBinary(); + + return g_steal_pointer(&caps); +} + + static void testRun(const char *name, int *ret, virNetworkXMLOption *xmlopt, + dnsmasqCaps *caps, testCompareNetXML2XMLResult expectResult, unsigned int flags) { g_autofree char *name_xml2xml =3D g_strdup_printf("Network XML-2-XML %= s", name); + g_autofree char *name_xml2conf =3D g_strdup_printf("Network XML-2-Conf= %s", name); g_autoptr(testInfo) info =3D g_new0(testInfo, 1); =20 info->name =3D name; info->flags =3D flags; info->expectResult =3D expectResult; info->xmlopt =3D xmlopt; + info->caps =3D caps; info->inxml =3D g_strdup_printf("%s/networkxml2xmlin/%s.xml", abs_srcd= ir, name); info->outxml =3D g_strdup_printf("%s/networkxml2xmlout/%s.xml", abs_sr= cdir, name); + /* Temporarily use conf files from networkxml2confdata/ */ + info->outconf =3D g_strdup_printf("%s/networkxml2confdata/%s.conf", ab= s_srcdir, name); + info->outhostsfile =3D g_strdup_printf("%s/networkxml2confdata/%s.host= sfile", abs_srcdir, name); =20 virTestRunLog(ret, name_xml2xml, testCompareXMLToXMLFiles, info); + + if (expectResult =3D=3D TEST_COMPARE_NET_XML2XML_RESULT_SUCCESS) + virTestRunLog(ret, name_xml2conf, testCompareXMLToConfFiles, info); } =20 static int mymain(void) { g_autoptr(virNetworkXMLOption) xmlopt =3D NULL; + g_autoptr(dnsmasqCaps) caps =3D NULL; int ret =3D 0; =20 if (!(xmlopt =3D networkDnsmasqCreateXMLConf())) return -1; =20 + if (!(caps =3D buildCaps())) + return -1; + #define DO_TEST_FULL(name, flags, expectResult) \ - testRun(name, &ret, xmlopt, expectResult, flags) + testRun(name, &ret, xmlopt, caps, expectResult, flags) #define DO_TEST(name) \ DO_TEST_FULL(name, 0, TEST_COMPARE_NET_XML2XML_RESULT_SUCCESS) #define DO_TEST_FLAGS(name, flags) \ @@ -202,4 +335,5 @@ mymain(void) =20 VIR_TEST_MAIN_PRELOAD(mymain, VIR_TEST_MOCK("virpci"), + VIR_TEST_MOCK("virdnsmasq"), VIR_TEST_MOCK("virrandom")) --=20 2.52.0 From nobody Mon Feb 2 05:55:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769611987; cv=none; d=zohomail.com; s=zohoarc; b=QbV59t8KOyPHFqq6CMKlyWLklrjmdoxcJpWM1XjTneEA0+S25NTJy0EanbbuhHCFJgW5qV2km7gV+n/Msdo8JX8Bot8ztAJJpP3eUvIafiu/07rsJdswSgDGKtA9/QJuJR4LQOYW/DMlI2Yb3670mxqnBp1NXDZrAXodxjWbJms= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769611987; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=w0bGwzy6Z+h0cDMEu7Q/Lj5CenbT7BwDZy9eR+KHk8s=; b=je/ny3tYLobqWdqTb4PJa+aVsxJPZx+UCUUpdIRYT5M74iYmXJaaHIRZv5e/mU2XArG0dnKCD33y+WIF9hVFHCOjJ3Rd33GK9/TK/q6H4Uzo/1SAlSlbSI9fDm7xcuDRs0Vnx/IMl1xEeCmQnKQOMWlqF79dhjQqBvpHyVOWeYU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769611987209274.78425062660904; Wed, 28 Jan 2026 06:53:07 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 8D6A94195C; Wed, 28 Jan 2026 09:53:06 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id C29444418D; Wed, 28 Jan 2026 09:38:54 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 633FB43EF2; Wed, 28 Jan 2026 09:38:50 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 34BEC43F22 for ; Wed, 28 Jan 2026 09:31:10 -0500 (EST) Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-518-bR9XZLQLPg-MVjIEX_O3ig-1; Wed, 28 Jan 2026 09:31:07 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1836C19373DA for ; Wed, 28 Jan 2026 14:31:06 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 74B7619541AA for ; Wed, 28 Jan 2026 14:31:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769610669; h=from:from: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; bh=w0bGwzy6Z+h0cDMEu7Q/Lj5CenbT7BwDZy9eR+KHk8s=; b=NoDT1BNa7y6qL8Xp/NK25idgoZg91TC8H9avxq2muLoZqLSCvrn1waJhSWVuE6ds8OFRLZ TAsY6mNQqAmzLMkzMYt26yqbTOcnQrvUrtwL6TYtN0ZUX3QHV7Z1OG7XekO5ci2eO0/4lB 6Cnc8shz4DNkXYM34Diobp8ssBGs2iA= X-MC-Unique: bR9XZLQLPg-MVjIEX_O3ig-1 X-Mimecast-MFC-AGG-ID: bR9XZLQLPg-MVjIEX_O3ig_1769610666 To: devel@lists.libvirt.org Subject: [PATCH 19/20] tests: Drop networkxml2conftest Date: Wed, 28 Jan 2026 15:30:40 +0100 Message-ID: <34f013dfcffa04e472426035db0bf6114b8f3faa.1769610369.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: -JcatlXyUHEcKFukeGhCp1YmMrl4SbfWKLyiTz8FfEQ_1769610666 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: NQJC722FZQVAL2KPZ2UMPFQVZDDHCUCI X-Message-ID-Hash: NQJC722FZQVAL2KPZ2UMPFQVZDDHCUCI X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769611987969154100 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Now that networkxml2xmltest does XML->conf tests the networkxml2conftest is redundant. Drop it. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/network/bridge_driver.c | 2 +- tests/meson.build | 1 - tests/networkxml2conftest.c | 213 ------------------------------------ 3 files changed, 1 insertion(+), 215 deletions(-) delete mode 100644 tests/networkxml2conftest.c diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 104c298683..665eeecedb 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -1178,7 +1178,7 @@ networkDnsmasqConfContents(virNetworkObj *obj, =20 /* create dnsmasq config file appropriate for this network */ =20 - /* Don't forget to update networkxml2conftest and networkxml2xmltest := -) */ + /* Don't forget to update networkxml2xmltest :-) */ virBufferAsprintf(&configbuf, "##WARNING: THIS IS AN AUTO-GENERATED FILE. " "CHANGES TO IT ARE LIKELY TO BE\n" diff --git a/tests/meson.build b/tests/meson.build index 4b93fb405a..00c81877af 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -407,7 +407,6 @@ endif =20 if conf.has('WITH_NETWORK') tests +=3D [ - { 'name': 'networkxml2conftest', 'include': [ network_inc_dir ], 'link= _with': [ network_driver_impl ] }, { 'name': 'networkxml2firewalltest', 'include': [ network_inc_dir ], '= link_with': [ network_driver_impl ] }, { 'name': 'networkxml2xmltest', 'include': [ network_inc_dir ], 'link_= with': [ network_driver_impl ], }, ] diff --git a/tests/networkxml2conftest.c b/tests/networkxml2conftest.c deleted file mode 100644 index c7534773a3..0000000000 --- a/tests/networkxml2conftest.c +++ /dev/null @@ -1,213 +0,0 @@ -#include - -#include - -#include -#include - -#include "internal.h" -#include "testutils.h" -#include "network_conf.h" -#include "viralloc.h" -#include "bridge_driver.h" -#define LIBVIRT_BRIDGE_DRIVER_PRIV_H_ALLOW -#include "bridge_driver_priv.h" -#define LIBVIRT_VIRCOMMANDPRIV_H_ALLOW -#include "vircommandpriv.h" - -#define VIR_FROM_THIS VIR_FROM_NONE - -static int -testCompareXMLToConfFiles(const char *inxml, const char *outconf, - char *outhostsfile, dnsmasqCaps *caps) -{ - char *confactual =3D NULL; - g_autofree char *hostsfileactual =3D NULL; - int ret =3D -1; - virNetworkDef *def =3D NULL; - virNetworkObj *obj =3D NULL; - g_autofree char *pidfile =3D NULL; - g_autoptr(dnsmasqContext) dctx =3D NULL; - g_autoptr(virNetworkXMLOption) xmlopt =3D NULL; - bool compareFailed =3D false; - - if (!(xmlopt =3D networkDnsmasqCreateXMLConf())) - goto fail; - - if (!(obj =3D virNetworkObjNew())) - goto fail; - - if (!(def =3D virNetworkDefParse(NULL, inxml, xmlopt, false))) - goto fail; - - virNetworkObjSetDef(obj, def); - - if (networkValidateTests(def) < 0) - goto fail; - - if (!networkNeedsDnsmasq(def)) { - VIR_TEST_VERBOSE("spurious request to generate conf files. Would n= ot start dnsmasq in real life scenario"); - goto fail; - } - - dctx =3D dnsmasqContextNew(def->name, "/var/lib/libvirt/dnsmasq"); - - if (dctx =3D=3D NULL) - goto fail; - - if (networkDnsmasqConfContents(obj, pidfile, &confactual, - &hostsfileactual, dctx, caps) < 0) - goto fail; - - /* Any changes to this function ^^ should be reflected here too. */ -#ifndef __linux__ - { - char * tmp; - - if (!(tmp =3D virStringReplace(confactual, - "except-interface=3Dlo0\n", - "except-interface=3Dlo\n"))) - goto fail; - VIR_FREE(confactual); - confactual =3D g_steal_pointer(&tmp); - } -#endif - - if (virTestCompareToFile(confactual, outconf) < 0) - compareFailed =3D true; - - if (hostsfileactual) { - if (virTestCompareToFile(hostsfileactual, outhostsfile) < 0) { - compareFailed =3D true; - } - } else { - if (virFileExists(outhostsfile)) { - VIR_TEST_DEBUG("%s: hostsfile exists but the configuration did= not specify any host", - outhostsfile); - compareFailed =3D true; - } - } - - if (compareFailed) - goto fail; - - ret =3D 0; - - fail: - VIR_FREE(confactual); - virNetworkObjEndAPI(&obj); - return ret; -} - -typedef struct { - const char *name; - dnsmasqCaps *caps; -} testInfo; - -static int -testCompareXMLToConfHelper(const void *data) -{ - int result =3D -1; - const testInfo *info =3D data; - g_autofree char *inxml =3D NULL; - g_autofree char *outconf =3D NULL; - g_autofree char *outhostsfile =3D NULL; - - inxml =3D g_strdup_printf("%s/networkxml2confdata/%s.xml", abs_srcdir,= info->name); - outconf =3D g_strdup_printf("%s/networkxml2confdata/%s.conf", abs_srcd= ir, info->name); - outhostsfile =3D g_strdup_printf("%s/networkxml2confdata/%s.hostsfile"= , abs_srcdir, info->name); - - result =3D testCompareXMLToConfFiles(inxml, outconf, outhostsfile, inf= o->caps); - - return result; -} - -static void -buildCapsCallback(const char *const*args, - const char *const*env G_GNUC_UNUSED, - const char *input G_GNUC_UNUSED, - char **output, - char **error G_GNUC_UNUSED, - int *status, - void *opaque G_GNUC_UNUSED) -{ - if (STREQ(args[0], "/usr/sbin/dnsmasq") && STREQ(args[1], "--version")= ) { - *output =3D g_strdup("Dnsmasq version 2.67\n"); - *status =3D EXIT_SUCCESS; - } else { - *status =3D EXIT_FAILURE; - } -} - -static dnsmasqCaps * -buildCaps(void) -{ - g_autoptr(dnsmasqCaps) caps =3D NULL; - g_autoptr(virCommandDryRunToken) dryRunToken =3D virCommandDryRunToken= New(); - - virCommandSetDryRun(dryRunToken, NULL, true, true, buildCapsCallback, = NULL); - - caps =3D dnsmasqCapsNewFromBinary(); - - return g_steal_pointer(&caps); -} - - -static int -mymain(void) -{ - int ret =3D 0; - g_autoptr(dnsmasqCaps) full =3D NULL; - - if (!(full =3D buildCaps())) { - fprintf(stderr, "failed to create the fake capabilities: %s", - virGetLastErrorMessage()); - return EXIT_FAILURE; - } - -#define DO_TEST(xname, xcaps) \ - do { \ - static testInfo info; \ - \ - info.name =3D xname; \ - info.caps =3D xcaps; \ - if (virTestRun("Network XML-2-Conf " xname, \ - testCompareXMLToConfHelper, &info) < 0) { \ - ret =3D -1; \ - } \ - } while (0) - - DO_TEST("isolated-network", full); - DO_TEST("netboot-network", full); - DO_TEST("netboot-proxy-network", full); - DO_TEST("netboot-tftp", full); - DO_TEST("nat-network-dns-srv-record-minimal", full); - DO_TEST("nat-network-name-with-quotes", full); - DO_TEST("routed-network", full); - DO_TEST("open-network", full); - DO_TEST("nat-network", full); - DO_TEST("nat-network-dns-txt-record", full); - DO_TEST("nat-network-dns-srv-record", full); - DO_TEST("nat-network-dns-hosts", full); - DO_TEST("nat-network-dns-forward-plain", full); - DO_TEST("nat-network-dns-forwarders", full); - DO_TEST("nat-network-dns-forwarder-no-resolv", full); - DO_TEST("nat-network-dns-local-domain", full); - DO_TEST("nat-network-mtu", full); - DO_TEST("dhcp6-network", full); - DO_TEST("dhcp6-nat-network", full); - DO_TEST("dhcp6host-routed-network", full); - DO_TEST("ptr-domains-auto", full); - DO_TEST("dnsmasq-options", full); - DO_TEST("leasetime-seconds", full); - DO_TEST("leasetime-minutes", full); - DO_TEST("leasetime-hours", full); - DO_TEST("leasetime-infinite", full); - - return ret =3D=3D 0 ? EXIT_SUCCESS : EXIT_FAILURE; -} - -VIR_TEST_MAIN_PRELOAD(mymain, - VIR_TEST_MOCK("virpci"), - VIR_TEST_MOCK("virrandom"), - VIR_TEST_MOCK("virdnsmasq")) --=20 2.52.0 From nobody Mon Feb 2 05:55:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1769612249; cv=none; d=zohomail.com; s=zohoarc; b=NMNb9Z2/GXhr1ZBGZWq2iVMleu1+mnZjNfMybzVK0GN6AsTmVyzCw4rWMc9LZLCq/czBnXkFrqQfFqtoG2LgPdif7wKoZPlPzWq4KXd3LQdMoFNNHraz5Q2RRLCoc4iaHdu23cgCRv84t38spWOfEeStrnuC51Opk5seJDHwTC0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1769612249; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=6yYoHiD+iq80okkkgBqi+IvVxkSBoC7j1fFIhJ2bBuQ=; b=aqdjGnNcTjM0hvnYxgVi8vQGnphft/uZ07Qz8i5bUANCkoHkrowRrkZhgW0A6jC3exPepSLKHYdxs4aNFE9qqhIhSDcpEMnj5Br0nhYYv4jXxkGSO4NNWmnuLLPINUvfPicPm4P2IaxT2l3HsQYllt0oaIArKyw8LlEljA9ZQq0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1769612249121987.5607972774608; Wed, 28 Jan 2026 06:57:29 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id E84F73F89F; Wed, 28 Jan 2026 09:57:27 -0500 (EST) Received: from [172.19.199.3] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 85841441FD; Wed, 28 Jan 2026 09:39:00 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id 20959418F3; Wed, 28 Jan 2026 09:38:54 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id B8CE343F1B for ; Wed, 28 Jan 2026 09:31:11 -0500 (EST) Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-537-gUfeTDTnNGu2ljtEeqOe4Q-1; Wed, 28 Jan 2026 09:31:07 -0500 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 244C318005AD for ; Wed, 28 Jan 2026 14:31:07 +0000 (UTC) Received: from moe (unknown [10.43.3.236]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7B69E195419A for ; Wed, 28 Jan 2026 14:31:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1769610671; h=from:from: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; bh=6yYoHiD+iq80okkkgBqi+IvVxkSBoC7j1fFIhJ2bBuQ=; b=LC6n7qHPNeKoLACnO9YvzkVMn2RC3xPha2VesggQWnmFuc8hMtWzh+ghYFhqnkqPhzDtCQ AQIvnAPgcpYi6MGU6LUftdg9eEoGeihHcZ70b5uMCZq/89hdGBE0BCItyDDe1j163FzmZM ioJxtth7HL74ul5nIaX1kkhIKdUmCq0= X-MC-Unique: gUfeTDTnNGu2ljtEeqOe4Q-1 X-Mimecast-MFC-AGG-ID: gUfeTDTnNGu2ljtEeqOe4Q_1769610667 To: devel@lists.libvirt.org Subject: [PATCH 20/20] tests: Rename networkxml2xmltest to networkxmlconftest Date: Wed, 28 Jan 2026 15:30:41 +0100 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: d9jTp8NHMBwrXA8E4etGxVGpAR7IbpkKNcgPxa2cghI_1769610667 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: TKPVUIAM6ZOB7TZXPUPEJA3KDEO4M65B X-Message-ID-Hash: TKPVUIAM6ZOB7TZXPUPEJA3KDEO4M65B X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1769612251521158500 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik Now that networkxml2xmltest does both XML -> XML and XML -> conf tests its name became misleading. Rename it to networkxmlconftest and move its data into networkxmlconfdata/ dir. Signed-off-by: Michal Privoznik Reviewed-by: J=C3=A1n Tomko --- src/network/bridge_driver.c | 2 +- tests/meson.build | 2 +- .../dhcp6host-routed-network.xml | 22 ------------- .../networkxml2confdata/isolated-network.xml | 11 ------- .../nat-network-dns-forwarders.xml | 15 --------- .../nat-network-dns-hosts.xml | 15 --------- tests/networkxml2confdata/nat-network-mtu.xml | 22 ------------- tests/networkxml2confdata/nat-network.xml | 21 ------------ tests/networkxml2confdata/netboot-network.xml | 14 -------- .../netboot-proxy-network.xml | 13 -------- tests/networkxml2confdata/open-network.xml | 9 ------ tests/networkxml2confdata/routed-network.xml | 9 ------ tests/networkxml2xmlin/dhcp6-nat-network.xml | 27 ---------------- tests/networkxml2xmlin/dhcp6-network.xml | 17 ---------- tests/networkxml2xmlin/dnsmasq-options.xml | 15 --------- tests/networkxml2xmlin/leasetime-hours.xml | 1 - tests/networkxml2xmlin/leasetime-infinite.xml | 1 - tests/networkxml2xmlin/leasetime-minutes.xml | 1 - tests/networkxml2xmlin/leasetime-seconds.xml | 1 - .../nat-network-dns-forward-plain.xml | 9 ------ .../nat-network-dns-forwarder-no-resolv.xml | 11 ------- .../nat-network-dns-local-domain.xml | 9 ------ .../nat-network-dns-srv-record-minimal.xml | 26 --------------- .../nat-network-dns-srv-record.xml | 32 ------------------- .../nat-network-dns-txt-record.xml | 24 -------------- .../nat-network-name-with-quotes.xml | 26 --------------- tests/networkxml2xmlin/netboot-tftp.xml | 1 - tests/networkxml2xmlin/ptr-domains-auto.xml | 21 ------------ tests/networkxml2xmlout/leasetime-hours.xml | 1 - .../networkxml2xmlout/leasetime-infinite.xml | 1 - tests/networkxml2xmlout/leasetime-minutes.xml | 1 - tests/networkxml2xmlout/leasetime-seconds.xml | 1 - tests/networkxml2xmlout/netboot-tftp.xml | 1 - tests/networkxml2xmlupdatetest.c | 2 +- .../8021Qbh-net.expect.xml} | 0 .../8021Qbh-net.xml | 0 .../bandwidth-network.conf | 0 .../bandwidth-network.expect.xml} | 0 .../bandwidth-network.xml | 0 .../dhcp6-nat-network.conf | 0 .../dhcp6-nat-network.expect.xml} | 0 .../dhcp6-nat-network.hostsfile | 0 .../dhcp6-nat-network.xml | 0 .../dhcp6-network.conf | 0 .../dhcp6-network.expect.xml} | 0 .../dhcp6-network.hostsfile | 0 .../dhcp6-network.xml | 0 .../dhcp6host-routed-network.conf | 0 .../dhcp6host-routed-network.expect.xml} | 0 .../dhcp6host-routed-network.hostsfile | 0 .../dhcp6host-routed-network.xml | 0 .../direct-net.expect.xml} | 0 .../direct-net.xml | 0 .../dnsmasq-options.conf | 0 .../dnsmasq-options.expect.xml} | 0 .../dnsmasq-options.xml | 0 .../empty-allow-ipv6.expect.xml} | 0 .../empty-allow-ipv6.xml | 0 .../host-bridge-net.expect.xml} | 0 .../host-bridge-net.xml | 0 .../host-bridge-no-flood.expect.xml} | 0 .../host-bridge-no-flood.xml | 0 .../hostdev-duplicate.xml | 0 .../hostdev-pf-driver-model.expect.xml} | 0 .../hostdev-pf-driver-model.xml | 0 .../hostdev-pf.expect.xml} | 0 .../hostdev-pf.xml | 0 .../hostdev.expect.xml} | 0 .../hostdev.xml | 0 .../isolated-network.conf | 0 .../isolated-network.expect.xml} | 0 .../isolated-network.xml | 0 .../isolated-ports.expect.xml} | 0 .../isolated-ports.xml | 0 .../leasetime-hours.conf | 0 .../leasetime-hours.expect.xml | 1 + .../leasetime-hours.hostsfile | 0 .../leasetime-hours.xml | 0 .../leasetime-infinite.conf | 0 .../leasetime-infinite.expect.xml | 1 + .../leasetime-infinite.hostsfile | 0 .../leasetime-infinite.xml | 0 .../leasetime-minutes.conf | 0 .../leasetime-minutes.expect.xml | 1 + .../leasetime-minutes.hostsfile | 0 .../leasetime-minutes.xml | 0 .../leasetime-seconds.conf | 0 .../leasetime-seconds.expect.xml | 1 + .../leasetime-seconds.hostsfile | 0 .../leasetime-seconds.xml | 0 .../metadata.expect.xml} | 0 .../metadata.xml | 0 .../nat-network-dns-forward-plain.conf | 0 .../nat-network-dns-forward-plain.expect.xml} | 0 .../nat-network-dns-forward-plain.xml | 0 .../nat-network-dns-forwarder-no-resolv.conf | 0 ...etwork-dns-forwarder-no-resolv.expect.xml} | 0 .../nat-network-dns-forwarder-no-resolv.xml | 0 .../nat-network-dns-forwarders.conf | 0 .../nat-network-dns-forwarders.expect.xml} | 0 .../nat-network-dns-forwarders.xml | 0 .../nat-network-dns-hosts.conf | 0 .../nat-network-dns-hosts.expect.xml} | 0 .../nat-network-dns-hosts.xml | 0 .../nat-network-dns-local-domain.conf | 0 .../nat-network-dns-local-domain.expect.xml} | 0 .../nat-network-dns-local-domain.xml | 0 .../nat-network-dns-srv-record-minimal.conf | 0 ...network-dns-srv-record-minimal.expect.xml} | 0 ...t-network-dns-srv-record-minimal.hostsfile | 0 .../nat-network-dns-srv-record-minimal.xml | 0 .../nat-network-dns-srv-record.conf | 0 .../nat-network-dns-srv-record.expect.xml} | 0 .../nat-network-dns-srv-record.hostsfile | 0 .../nat-network-dns-srv-record.xml | 0 .../nat-network-dns-srv-records.conf | 0 .../nat-network-dns-srv-records.expect.xml} | 0 .../nat-network-dns-srv-records.hostsfile | 0 .../nat-network-dns-srv-records.xml | 0 .../nat-network-dns-txt-record.conf | 0 .../nat-network-dns-txt-record.expect.xml} | 0 .../nat-network-dns-txt-record.hostsfile | 0 .../nat-network-dns-txt-record.xml | 0 .../nat-network-explicit-flood.conf | 0 .../nat-network-explicit-flood.expect.xml} | 0 .../nat-network-explicit-flood.hostsfile | 0 .../nat-network-explicit-flood.xml | 0 .../nat-network-forward-nat-address.conf | 0 ...at-network-forward-nat-address.expect.xml} | 0 .../nat-network-forward-nat-address.hostsfile | 0 .../nat-network-forward-nat-address.xml | 0 .../nat-network-forward-nat-ipv6.conf | 0 .../nat-network-forward-nat-ipv6.expect.xml} | 0 .../nat-network-forward-nat-ipv6.xml | 0 .../nat-network-forward-nat-no-address.conf | 0 ...network-forward-nat-no-address.expect.xml} | 0 ...t-network-forward-nat-no-address.hostsfile | 0 .../nat-network-forward-nat-no-address.xml | 0 .../nat-network-mtu.conf | 0 .../nat-network-mtu.expect.xml} | 0 .../nat-network-mtu.hostsfile | 0 .../nat-network-mtu.xml | 0 .../nat-network-name-with-quotes.conf | 0 .../nat-network-name-with-quotes.expect.xml} | 0 .../nat-network-name-with-quotes.hostsfile | 0 .../nat-network-name-with-quotes.xml | 0 .../nat-network.conf | 0 .../nat-network.expect.xml} | 0 .../nat-network.hostsfile | 0 .../nat-network.xml | 0 .../netboot-network.conf | 0 .../netboot-network.expect.xml} | 0 .../netboot-network.xml | 0 .../netboot-proxy-network.conf | 0 .../netboot-proxy-network.expect.xml} | 0 .../netboot-proxy-network.xml | 0 .../netboot-tftp.conf | 0 .../netboot-tftp.expect.xml | 1 + .../netboot-tftp.xml | 0 .../open-network-with-forward-dev.xml | 0 .../open-network.conf | 0 .../open-network.expect.xml} | 0 .../open-network.xml | 0 .../openvswitch-net.expect.xml} | 0 .../openvswitch-net.xml | 0 .../passthrough-address-crash.xml | 0 .../passthrough-duplicate.xml | 0 .../passthrough-pf.conf | 0 .../passthrough-pf.xml | 0 .../ptr-domains-auto.conf | 0 .../ptr-domains-auto.expect.xml} | 0 .../ptr-domains-auto.hostsfile | 0 .../ptr-domains-auto.xml | 0 .../routed-network-no-dns-extra-elements.xml | 0 .../routed-network-no-dns.expect.xml} | 0 .../routed-network-no-dns.xml | 0 .../routed-network.conf | 0 .../routed-network.expect.xml} | 0 .../routed-network.xml | 0 .../set-mtu.conf | 0 .../set-mtu.expect.xml} | 0 .../set-mtu.xml | 0 .../vepa-net.expect.xml} | 0 .../vepa-net.xml | 0 ...workxml2xmltest.c =3D> networkxmlconftest.c} | 9 +++--- tests/qemuxmlconftest.c | 6 ++-- tests/virschematest.c | 4 +-- 187 files changed, 16 insertions(+), 392 deletions(-) delete mode 100644 tests/networkxml2confdata/dhcp6host-routed-network.xml delete mode 100644 tests/networkxml2confdata/isolated-network.xml delete mode 100644 tests/networkxml2confdata/nat-network-dns-forwarders.xml delete mode 100644 tests/networkxml2confdata/nat-network-dns-hosts.xml delete mode 100644 tests/networkxml2confdata/nat-network-mtu.xml delete mode 100644 tests/networkxml2confdata/nat-network.xml delete mode 100644 tests/networkxml2confdata/netboot-network.xml delete mode 100644 tests/networkxml2confdata/netboot-proxy-network.xml delete mode 100644 tests/networkxml2confdata/open-network.xml delete mode 100644 tests/networkxml2confdata/routed-network.xml delete mode 100644 tests/networkxml2xmlin/dhcp6-nat-network.xml delete mode 100644 tests/networkxml2xmlin/dhcp6-network.xml delete mode 100644 tests/networkxml2xmlin/dnsmasq-options.xml delete mode 120000 tests/networkxml2xmlin/leasetime-hours.xml delete mode 120000 tests/networkxml2xmlin/leasetime-infinite.xml delete mode 120000 tests/networkxml2xmlin/leasetime-minutes.xml delete mode 120000 tests/networkxml2xmlin/leasetime-seconds.xml delete mode 100644 tests/networkxml2xmlin/nat-network-dns-forward-plain.xml delete mode 100644 tests/networkxml2xmlin/nat-network-dns-forwarder-no-res= olv.xml delete mode 100644 tests/networkxml2xmlin/nat-network-dns-local-domain.xml delete mode 100644 tests/networkxml2xmlin/nat-network-dns-srv-record-minim= al.xml delete mode 100644 tests/networkxml2xmlin/nat-network-dns-srv-record.xml delete mode 100644 tests/networkxml2xmlin/nat-network-dns-txt-record.xml delete mode 100644 tests/networkxml2xmlin/nat-network-name-with-quotes.xml delete mode 120000 tests/networkxml2xmlin/netboot-tftp.xml delete mode 100644 tests/networkxml2xmlin/ptr-domains-auto.xml delete mode 120000 tests/networkxml2xmlout/leasetime-hours.xml delete mode 120000 tests/networkxml2xmlout/leasetime-infinite.xml delete mode 120000 tests/networkxml2xmlout/leasetime-minutes.xml delete mode 120000 tests/networkxml2xmlout/leasetime-seconds.xml delete mode 120000 tests/networkxml2xmlout/netboot-tftp.xml rename tests/{networkxml2xmlout/8021Qbh-net.xml =3D> networkxmlconfdata/80= 21Qbh-net.expect.xml} (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/8021Qbh-net.xml (1= 00%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/bandwidth-netwo= rk.conf (100%) rename tests/{networkxml2xmlout/bandwidth-network.xml =3D> networkxmlconfd= ata/bandwidth-network.expect.xml} (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/bandwidth-network.= xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/dhcp6-nat-netwo= rk.conf (100%) rename tests/{networkxml2xmlout/dhcp6-nat-network.xml =3D> networkxmlconfd= ata/dhcp6-nat-network.expect.xml} (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/dhcp6-nat-netwo= rk.hostsfile (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/dhcp6-nat-netwo= rk.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/dhcp6-network.c= onf (100%) rename tests/{networkxml2xmlout/dhcp6-network.xml =3D> networkxmlconfdata/= dhcp6-network.expect.xml} (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/dhcp6-network.h= ostsfile (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/dhcp6-network.x= ml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/dhcp6host-route= d-network.conf (100%) rename tests/{networkxml2xmlout/dhcp6host-routed-network.xml =3D> networkx= mlconfdata/dhcp6host-routed-network.expect.xml} (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/dhcp6host-route= d-network.hostsfile (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/dhcp6host-routed-n= etwork.xml (100%) rename tests/{networkxml2xmlout/direct-net.xml =3D> networkxmlconfdata/dir= ect-net.expect.xml} (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/direct-net.xml (10= 0%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/dnsmasq-options= .conf (100%) rename tests/{networkxml2xmlout/dnsmasq-options.xml =3D> networkxmlconfdat= a/dnsmasq-options.expect.xml} (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/dnsmasq-options= .xml (100%) rename tests/{networkxml2xmlout/empty-allow-ipv6.xml =3D> networkxmlconfda= ta/empty-allow-ipv6.expect.xml} (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/empty-allow-ipv6.x= ml (100%) rename tests/{networkxml2xmlout/host-bridge-net.xml =3D> networkxmlconfdat= a/host-bridge-net.expect.xml} (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/host-bridge-net.xm= l (100%) rename tests/{networkxml2xmlout/host-bridge-no-flood.xml =3D> networkxmlco= nfdata/host-bridge-no-flood.expect.xml} (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/host-bridge-no-flo= od.xml (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/hostdev-duplicate.= xml (100%) rename tests/{networkxml2xmlin/hostdev-pf-driver-model.xml =3D> networkxml= confdata/hostdev-pf-driver-model.expect.xml} (100%) rename tests/{networkxml2xmlout =3D> networkxmlconfdata}/hostdev-pf-driver= -model.xml (100%) rename tests/{networkxml2xmlin/hostdev-pf.xml =3D> networkxmlconfdata/host= dev-pf.expect.xml} (100%) rename tests/{networkxml2xmlout =3D> networkxmlconfdata}/hostdev-pf.xml (1= 00%) rename tests/{networkxml2xmlin/hostdev.xml =3D> networkxmlconfdata/hostdev= .expect.xml} (100%) rename tests/{networkxml2xmlout =3D> networkxmlconfdata}/hostdev.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/isolated-networ= k.conf (100%) rename tests/{networkxml2xmlout/isolated-network.xml =3D> networkxmlconfda= ta/isolated-network.expect.xml} (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/isolated-network.x= ml (100%) rename tests/{networkxml2xmlout/isolated-ports.xml =3D> networkxmlconfdata= /isolated-ports.expect.xml} (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/isolated-ports.xml= (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/leasetime-hours= .conf (100%) create mode 120000 tests/networkxmlconfdata/leasetime-hours.expect.xml rename tests/{networkxml2confdata =3D> networkxmlconfdata}/leasetime-hours= .hostsfile (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/leasetime-hours= .xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/leasetime-infin= ite.conf (100%) create mode 120000 tests/networkxmlconfdata/leasetime-infinite.expect.xml rename tests/{networkxml2confdata =3D> networkxmlconfdata}/leasetime-infin= ite.hostsfile (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/leasetime-infin= ite.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/leasetime-minut= es.conf (100%) create mode 120000 tests/networkxmlconfdata/leasetime-minutes.expect.xml rename tests/{networkxml2confdata =3D> networkxmlconfdata}/leasetime-minut= es.hostsfile (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/leasetime-minut= es.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/leasetime-secon= ds.conf (100%) create mode 120000 tests/networkxmlconfdata/leasetime-seconds.expect.xml rename tests/{networkxml2confdata =3D> networkxmlconfdata}/leasetime-secon= ds.hostsfile (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/leasetime-secon= ds.xml (100%) rename tests/{networkxml2xmlout/metadata.xml =3D> networkxmlconfdata/metad= ata.expect.xml} (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/metadata.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-dns= -forward-plain.conf (100%) rename tests/{networkxml2xmlout/nat-network-dns-forward-plain.xml =3D> net= workxmlconfdata/nat-network-dns-forward-plain.expect.xml} (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-dns= -forward-plain.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-dns= -forwarder-no-resolv.conf (100%) rename tests/{networkxml2xmlout/nat-network-dns-forwarder-no-resolv.xml = =3D> networkxmlconfdata/nat-network-dns-forwarder-no-resolv.expect.xml} (10= 0%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-dns= -forwarder-no-resolv.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-dns= -forwarders.conf (100%) rename tests/{networkxml2xmlout/nat-network-dns-forwarders.xml =3D> networ= kxmlconfdata/nat-network-dns-forwarders.expect.xml} (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/nat-network-dns-fo= rwarders.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-dns= -hosts.conf (100%) rename tests/{networkxml2xmlout/nat-network-dns-hosts.xml =3D> networkxmlc= onfdata/nat-network-dns-hosts.expect.xml} (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/nat-network-dns-ho= sts.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-dns= -local-domain.conf (100%) rename tests/{networkxml2xmlout/nat-network-dns-local-domain.xml =3D> netw= orkxmlconfdata/nat-network-dns-local-domain.expect.xml} (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-dns= -local-domain.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-dns= -srv-record-minimal.conf (100%) rename tests/{networkxml2xmlout/nat-network-dns-srv-record-minimal.xml =3D= > networkxmlconfdata/nat-network-dns-srv-record-minimal.expect.xml} (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-dns= -srv-record-minimal.hostsfile (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-dns= -srv-record-minimal.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-dns= -srv-record.conf (100%) rename tests/{networkxml2xmlout/nat-network-dns-srv-record.xml =3D> networ= kxmlconfdata/nat-network-dns-srv-record.expect.xml} (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-dns= -srv-record.hostsfile (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-dns= -srv-record.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-dns= -srv-records.conf (100%) rename tests/{networkxml2xmlout/nat-network-dns-srv-records.xml =3D> netwo= rkxmlconfdata/nat-network-dns-srv-records.expect.xml} (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-dns= -srv-records.hostsfile (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/nat-network-dns-sr= v-records.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-dns= -txt-record.conf (100%) rename tests/{networkxml2xmlout/nat-network-dns-txt-record.xml =3D> networ= kxmlconfdata/nat-network-dns-txt-record.expect.xml} (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-dns= -txt-record.hostsfile (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-dns= -txt-record.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-exp= licit-flood.conf (100%) rename tests/{networkxml2xmlout/nat-network-explicit-flood.xml =3D> networ= kxmlconfdata/nat-network-explicit-flood.expect.xml} (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-exp= licit-flood.hostsfile (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/nat-network-explic= it-flood.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-for= ward-nat-address.conf (100%) rename tests/{networkxml2xmlout/nat-network-forward-nat-address.xml =3D> n= etworkxmlconfdata/nat-network-forward-nat-address.expect.xml} (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-for= ward-nat-address.hostsfile (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/nat-network-forwar= d-nat-address.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-for= ward-nat-ipv6.conf (100%) rename tests/{networkxml2xmlout/nat-network-forward-nat-ipv6.xml =3D> netw= orkxmlconfdata/nat-network-forward-nat-ipv6.expect.xml} (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/nat-network-forwar= d-nat-ipv6.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-for= ward-nat-no-address.conf (100%) rename tests/{networkxml2xmlout/nat-network-forward-nat-no-address.xml =3D= > networkxmlconfdata/nat-network-forward-nat-no-address.expect.xml} (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-for= ward-nat-no-address.hostsfile (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/nat-network-forwar= d-nat-no-address.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-mtu= .conf (100%) rename tests/{networkxml2xmlout/nat-network-mtu.xml =3D> networkxmlconfdat= a/nat-network-mtu.expect.xml} (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-mtu= .hostsfile (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/nat-network-mtu.xm= l (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-nam= e-with-quotes.conf (100%) rename tests/{networkxml2xmlout/nat-network-name-with-quotes.xml =3D> netw= orkxmlconfdata/nat-network-name-with-quotes.expect.xml} (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-nam= e-with-quotes.hostsfile (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network-nam= e-with-quotes.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network.con= f (100%) rename tests/{networkxml2xmlout/nat-network.xml =3D> networkxmlconfdata/na= t-network.expect.xml} (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/nat-network.hos= tsfile (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/nat-network.xml (1= 00%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/netboot-network= .conf (100%) rename tests/{networkxml2xmlout/netboot-network.xml =3D> networkxmlconfdat= a/netboot-network.expect.xml} (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/netboot-network.xm= l (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/netboot-proxy-n= etwork.conf (100%) rename tests/{networkxml2xmlout/netboot-proxy-network.xml =3D> networkxmlc= onfdata/netboot-proxy-network.expect.xml} (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/netboot-proxy-netw= ork.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/netboot-tftp.co= nf (100%) create mode 120000 tests/networkxmlconfdata/netboot-tftp.expect.xml rename tests/{networkxml2confdata =3D> networkxmlconfdata}/netboot-tftp.xm= l (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/open-network-with-= forward-dev.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/open-network.co= nf (100%) rename tests/{networkxml2xmlout/open-network.xml =3D> networkxmlconfdata/o= pen-network.expect.xml} (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/open-network.xml (= 100%) rename tests/{networkxml2xmlin/openvswitch-net.xml =3D> networkxmlconfdata= /openvswitch-net.expect.xml} (100%) rename tests/{networkxml2xmlout =3D> networkxmlconfdata}/openvswitch-net.x= ml (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/passthrough-addres= s-crash.xml (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/passthrough-duplic= ate.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/passthrough-pf.= conf (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/passthrough-pf.xml= (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/ptr-domains-aut= o.conf (100%) rename tests/{networkxml2xmlout/ptr-domains-auto.xml =3D> networkxmlconfda= ta/ptr-domains-auto.expect.xml} (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/ptr-domains-aut= o.hostsfile (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/ptr-domains-aut= o.xml (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/routed-network-no-= dns-extra-elements.xml (100%) rename tests/{networkxml2xmlout/routed-network-no-dns.xml =3D> networkxmlc= onfdata/routed-network-no-dns.expect.xml} (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/routed-network-no-= dns.xml (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/routed-network.= conf (100%) rename tests/{networkxml2xmlout/routed-network.xml =3D> networkxmlconfdata= /routed-network.expect.xml} (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/routed-network.xml= (100%) rename tests/{networkxml2confdata =3D> networkxmlconfdata}/set-mtu.conf (1= 00%) rename tests/{networkxml2xmlout/set-mtu.xml =3D> networkxmlconfdata/set-mt= u.expect.xml} (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/set-mtu.xml (100%) rename tests/{networkxml2xmlout/vepa-net.xml =3D> networkxmlconfdata/vepa-= net.expect.xml} (100%) rename tests/{networkxml2xmlin =3D> networkxmlconfdata}/vepa-net.xml (100%) rename tests/{networkxml2xmltest.c =3D> networkxmlconftest.c} (96%) diff --git a/src/network/bridge_driver.c b/src/network/bridge_driver.c index 665eeecedb..d50d42c98c 100644 --- a/src/network/bridge_driver.c +++ b/src/network/bridge_driver.c @@ -1178,7 +1178,7 @@ networkDnsmasqConfContents(virNetworkObj *obj, =20 /* create dnsmasq config file appropriate for this network */ =20 - /* Don't forget to update networkxml2xmltest :-) */ + /* Don't forget to update networkxmlconftest :-) */ virBufferAsprintf(&configbuf, "##WARNING: THIS IS AN AUTO-GENERATED FILE. " "CHANGES TO IT ARE LIKELY TO BE\n" diff --git a/tests/meson.build b/tests/meson.build index 00c81877af..b28ad4a65b 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -408,7 +408,7 @@ endif if conf.has('WITH_NETWORK') tests +=3D [ { 'name': 'networkxml2firewalltest', 'include': [ network_inc_dir ], '= link_with': [ network_driver_impl ] }, - { 'name': 'networkxml2xmltest', 'include': [ network_inc_dir ], 'link_= with': [ network_driver_impl ], }, + { 'name': 'networkxmlconftest', 'include': [ network_inc_dir ], 'link_= with': [ network_driver_impl ], }, ] endif =20 diff --git a/tests/networkxml2confdata/dhcp6host-routed-network.xml b/tests= /networkxml2confdata/dhcp6host-routed-network.xml deleted file mode 100644 index 42b9d3f16a..0000000000 --- a/tests/networkxml2confdata/dhcp6host-routed-network.xml +++ /dev/null @@ -1,22 +0,0 @@ - - local - 81ff0d90-c91e-6742-64da-4a736edb9a9b - - - - - - - - - - - - - - - - - - - diff --git a/tests/networkxml2confdata/isolated-network.xml b/tests/network= xml2confdata/isolated-network.xml deleted file mode 100644 index b22d4ea775..0000000000 --- a/tests/networkxml2confdata/isolated-network.xml +++ /dev/null @@ -1,11 +0,0 @@ - - private - 81ff0d90-c91e-6742-64da-4a736edb9a9b - - - - - - - - diff --git a/tests/networkxml2confdata/nat-network-dns-forwarders.xml b/tes= ts/networkxml2confdata/nat-network-dns-forwarders.xml deleted file mode 100644 index d84576b1b3..0000000000 --- a/tests/networkxml2confdata/nat-network-dns-forwarders.xml +++ /dev/null @@ -1,15 +0,0 @@ - - default - 81ff0d90-c91e-6742-64da-4a736edb9a9c - - - - - - - - - - - - diff --git a/tests/networkxml2confdata/nat-network-dns-hosts.xml b/tests/ne= tworkxml2confdata/nat-network-dns-hosts.xml deleted file mode 100644 index 9add45656a..0000000000 --- a/tests/networkxml2confdata/nat-network-dns-hosts.xml +++ /dev/null @@ -1,15 +0,0 @@ - - default - 81ff0d90-c91e-6742-64da-4a736edb9a9c - - - - - - host - gateway - - - - - diff --git a/tests/networkxml2confdata/nat-network-mtu.xml b/tests/networkx= ml2confdata/nat-network-mtu.xml deleted file mode 100644 index 87b214e95c..0000000000 --- a/tests/networkxml2confdata/nat-network-mtu.xml +++ /dev/null @@ -1,22 +0,0 @@ - - default - 81ff0d90-c91e-6742-64da-4a736edb9a9b - - - - - - - - - - - - - - - - - - - diff --git a/tests/networkxml2confdata/nat-network.xml b/tests/networkxml2c= onfdata/nat-network.xml deleted file mode 100644 index e44d35d83d..0000000000 --- a/tests/networkxml2confdata/nat-network.xml +++ /dev/null @@ -1,21 +0,0 @@ - - default - 81ff0d90-c91e-6742-64da-4a736edb9a9b - - - - - - - - - - - - - - - - - - diff --git a/tests/networkxml2confdata/netboot-network.xml b/tests/networkx= ml2confdata/netboot-network.xml deleted file mode 100644 index ec06c30050..0000000000 --- a/tests/networkxml2confdata/netboot-network.xml +++ /dev/null @@ -1,14 +0,0 @@ - - netboot - 81ff0d90-c91e-6742-64da-4a736edb9a9b - - - - - - - - - - - diff --git a/tests/networkxml2confdata/netboot-proxy-network.xml b/tests/ne= tworkxml2confdata/netboot-proxy-network.xml deleted file mode 100644 index a5b7c1e4e6..0000000000 --- a/tests/networkxml2confdata/netboot-proxy-network.xml +++ /dev/null @@ -1,13 +0,0 @@ - - netboot - 81ff0d90-c91e-6742-64da-4a736edb9a9b - - - - - - - - - - diff --git a/tests/networkxml2confdata/open-network.xml b/tests/networkxml2= confdata/open-network.xml deleted file mode 100644 index e0b3f039f4..0000000000 --- a/tests/networkxml2confdata/open-network.xml +++ /dev/null @@ -1,9 +0,0 @@ - - open - 81ff0d90-c91e-6742-64da-4a736edb9a9b - - - - - - diff --git a/tests/networkxml2confdata/routed-network.xml b/tests/networkxm= l2confdata/routed-network.xml deleted file mode 100644 index 6b0853a0b4..0000000000 --- a/tests/networkxml2confdata/routed-network.xml +++ /dev/null @@ -1,9 +0,0 @@ - - local - 81ff0d90-c91e-6742-64da-4a736edb9a9b - - - - - - diff --git a/tests/networkxml2xmlin/dhcp6-nat-network.xml b/tests/networkxm= l2xmlin/dhcp6-nat-network.xml deleted file mode 100644 index cab0700f2b..0000000000 --- a/tests/networkxml2xmlin/dhcp6-nat-network.xml +++ /dev/null @@ -1,27 +0,0 @@ - - default - 81ff0d90-c91e-6742-64da-4a736edb9a9b - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/networkxml2xmlin/dhcp6-network.xml b/tests/networkxml2xm= lin/dhcp6-network.xml deleted file mode 100644 index ae9ff1f32c..0000000000 --- a/tests/networkxml2xmlin/dhcp6-network.xml +++ /dev/null @@ -1,17 +0,0 @@ - - default - 81ff0d90-c91e-6742-64da-4a736edb9a9b - - - - - - - - - - - - - - diff --git a/tests/networkxml2xmlin/dnsmasq-options.xml b/tests/networkxml2= xmlin/dnsmasq-options.xml deleted file mode 100644 index 35a87b8e3e..0000000000 --- a/tests/networkxml2xmlin/dnsmasq-options.xml +++ /dev/null @@ -1,15 +0,0 @@ - - default - 81ff0d90-c91e-6742-64da-4a736edb9a9b - - - - - - - - - - - - diff --git a/tests/networkxml2xmlin/leasetime-hours.xml b/tests/networkxml2= xmlin/leasetime-hours.xml deleted file mode 120000 index 5a6bed3d5f..0000000000 --- a/tests/networkxml2xmlin/leasetime-hours.xml +++ /dev/null @@ -1 +0,0 @@ -../networkxml2confdata/leasetime-hours.xml \ No newline at end of file diff --git a/tests/networkxml2xmlin/leasetime-infinite.xml b/tests/networkx= ml2xmlin/leasetime-infinite.xml deleted file mode 120000 index 706e4cdf11..0000000000 --- a/tests/networkxml2xmlin/leasetime-infinite.xml +++ /dev/null @@ -1 +0,0 @@ -../networkxml2confdata/leasetime-infinite.xml \ No newline at end of file diff --git a/tests/networkxml2xmlin/leasetime-minutes.xml b/tests/networkxm= l2xmlin/leasetime-minutes.xml deleted file mode 120000 index 2c19b06a8a..0000000000 --- a/tests/networkxml2xmlin/leasetime-minutes.xml +++ /dev/null @@ -1 +0,0 @@ -../networkxml2confdata/leasetime-minutes.xml \ No newline at end of file diff --git a/tests/networkxml2xmlin/leasetime-seconds.xml b/tests/networkxm= l2xmlin/leasetime-seconds.xml deleted file mode 120000 index f182cfa2f1..0000000000 --- a/tests/networkxml2xmlin/leasetime-seconds.xml +++ /dev/null @@ -1 +0,0 @@ -../networkxml2confdata/leasetime-seconds.xml \ No newline at end of file diff --git a/tests/networkxml2xmlin/nat-network-dns-forward-plain.xml b/tes= ts/networkxml2xmlin/nat-network-dns-forward-plain.xml deleted file mode 100644 index 10bacb5cbb..0000000000 --- a/tests/networkxml2xmlin/nat-network-dns-forward-plain.xml +++ /dev/null @@ -1,9 +0,0 @@ - - default - 81ff0d90-c91e-6742-64da-4a736edb9a9c - - - - - - diff --git a/tests/networkxml2xmlin/nat-network-dns-forwarder-no-resolv.xml= b/tests/networkxml2xmlin/nat-network-dns-forwarder-no-resolv.xml deleted file mode 100644 index 9661ce561e..0000000000 --- a/tests/networkxml2xmlin/nat-network-dns-forwarder-no-resolv.xml +++ /dev/null @@ -1,11 +0,0 @@ - - default - 81ff0d90-c91e-6742-64da-4a736edb9a9c - - - - - - - - diff --git a/tests/networkxml2xmlin/nat-network-dns-local-domain.xml b/test= s/networkxml2xmlin/nat-network-dns-local-domain.xml deleted file mode 100644 index a92d71f1f2..0000000000 --- a/tests/networkxml2xmlin/nat-network-dns-local-domain.xml +++ /dev/null @@ -1,9 +0,0 @@ - - default - 81ff0d90-c91e-6742-64da-4a736edb9a9c - - - - - - diff --git a/tests/networkxml2xmlin/nat-network-dns-srv-record-minimal.xml = b/tests/networkxml2xmlin/nat-network-dns-srv-record-minimal.xml deleted file mode 100644 index 83838d01d3..0000000000 --- a/tests/networkxml2xmlin/nat-network-dns-srv-record-minimal.xml +++ /dev/null @@ -1,26 +0,0 @@ - - default - 81ff0d90-c91e-6742-64da-4a736edb9a9b - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/networkxml2xmlin/nat-network-dns-srv-record.xml b/tests/= networkxml2xmlin/nat-network-dns-srv-record.xml deleted file mode 100644 index 0369f4caa9..0000000000 --- a/tests/networkxml2xmlin/nat-network-dns-srv-record.xml +++ /dev/null @@ -1,32 +0,0 @@ - - default - 81ff0d90-c91e-6742-64da-4a736edb9a9b - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/networkxml2xmlin/nat-network-dns-txt-record.xml b/tests/= networkxml2xmlin/nat-network-dns-txt-record.xml deleted file mode 100644 index 0a6bd595ae..0000000000 --- a/tests/networkxml2xmlin/nat-network-dns-txt-record.xml +++ /dev/null @@ -1,24 +0,0 @@ - - default - 81ff0d90-c91e-6742-64da-4a736edb9a9b - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/networkxml2xmlin/nat-network-name-with-quotes.xml b/test= s/networkxml2xmlin/nat-network-name-with-quotes.xml deleted file mode 100644 index eba75d2e2d..0000000000 --- a/tests/networkxml2xmlin/nat-network-name-with-quotes.xml +++ /dev/null @@ -1,26 +0,0 @@ - - default"with"quotes" - 81ff0d90-c91e-6742-64da-4a736edb9a9b - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/networkxml2xmlin/netboot-tftp.xml b/tests/networkxml2xml= in/netboot-tftp.xml deleted file mode 120000 index 1487de558b..0000000000 --- a/tests/networkxml2xmlin/netboot-tftp.xml +++ /dev/null @@ -1 +0,0 @@ -../networkxml2confdata/netboot-tftp.xml \ No newline at end of file diff --git a/tests/networkxml2xmlin/ptr-domains-auto.xml b/tests/networkxml= 2xmlin/ptr-domains-auto.xml deleted file mode 100644 index 7fe12dc671..0000000000 --- a/tests/networkxml2xmlin/ptr-domains-auto.xml +++ /dev/null @@ -1,21 +0,0 @@ - - default - 81ff0d90-c91e-6742-64da-4a736edb9a9b - - - - - - - - - - - - - - - - - - diff --git a/tests/networkxml2xmlout/leasetime-hours.xml b/tests/networkxml= 2xmlout/leasetime-hours.xml deleted file mode 120000 index d3cf0fb342..0000000000 --- a/tests/networkxml2xmlout/leasetime-hours.xml +++ /dev/null @@ -1 +0,0 @@ -../networkxml2xmlin/leasetime-hours.xml \ No newline at end of file diff --git a/tests/networkxml2xmlout/leasetime-infinite.xml b/tests/network= xml2xmlout/leasetime-infinite.xml deleted file mode 120000 index 2390f7a3a7..0000000000 --- a/tests/networkxml2xmlout/leasetime-infinite.xml +++ /dev/null @@ -1 +0,0 @@ -../networkxml2xmlin/leasetime-infinite.xml \ No newline at end of file diff --git a/tests/networkxml2xmlout/leasetime-minutes.xml b/tests/networkx= ml2xmlout/leasetime-minutes.xml deleted file mode 120000 index 09ebdb9c14..0000000000 --- a/tests/networkxml2xmlout/leasetime-minutes.xml +++ /dev/null @@ -1 +0,0 @@ -../networkxml2xmlin/leasetime-minutes.xml \ No newline at end of file diff --git a/tests/networkxml2xmlout/leasetime-seconds.xml b/tests/networkx= ml2xmlout/leasetime-seconds.xml deleted file mode 120000 index 7036ca6713..0000000000 --- a/tests/networkxml2xmlout/leasetime-seconds.xml +++ /dev/null @@ -1 +0,0 @@ -../networkxml2xmlin/leasetime-seconds.xml \ No newline at end of file diff --git a/tests/networkxml2xmlout/netboot-tftp.xml b/tests/networkxml2xm= lout/netboot-tftp.xml deleted file mode 120000 index 1487de558b..0000000000 --- a/tests/networkxml2xmlout/netboot-tftp.xml +++ /dev/null @@ -1 +0,0 @@ -../networkxml2confdata/netboot-tftp.xml \ No newline at end of file diff --git a/tests/networkxml2xmlupdatetest.c b/tests/networkxml2xmlupdatet= est.c index 60931a2eba..b017922d94 100644 --- a/tests/networkxml2xmlupdatetest.c +++ b/tests/networkxml2xmlupdatetest.c @@ -76,7 +76,7 @@ testCompareXMLToXMLHelper(const void *data) g_autofree char *updatexml =3D NULL; g_autofree char *outxml =3D NULL; =20 - netxml =3D g_strdup_printf("%s/networkxml2xmlin/%s.xml", + netxml =3D g_strdup_printf("%s/networkxmlconfdata/%s.xml", abs_srcdir, info->netxml); updatexml =3D g_strdup_printf("%s/networkxml2xmlupdatein/%s.xml", abs_srcdir, info->updatexml); diff --git a/tests/networkxml2xmlout/8021Qbh-net.xml b/tests/networkxmlconf= data/8021Qbh-net.expect.xml similarity index 100% rename from tests/networkxml2xmlout/8021Qbh-net.xml rename to tests/networkxmlconfdata/8021Qbh-net.expect.xml diff --git a/tests/networkxml2xmlin/8021Qbh-net.xml b/tests/networkxmlconfd= ata/8021Qbh-net.xml similarity index 100% rename from tests/networkxml2xmlin/8021Qbh-net.xml rename to tests/networkxmlconfdata/8021Qbh-net.xml diff --git a/tests/networkxml2confdata/bandwidth-network.conf b/tests/netwo= rkxmlconfdata/bandwidth-network.conf similarity index 100% rename from tests/networkxml2confdata/bandwidth-network.conf rename to tests/networkxmlconfdata/bandwidth-network.conf diff --git a/tests/networkxml2xmlout/bandwidth-network.xml b/tests/networkx= mlconfdata/bandwidth-network.expect.xml similarity index 100% rename from tests/networkxml2xmlout/bandwidth-network.xml rename to tests/networkxmlconfdata/bandwidth-network.expect.xml diff --git a/tests/networkxml2xmlin/bandwidth-network.xml b/tests/networkxm= lconfdata/bandwidth-network.xml similarity index 100% rename from tests/networkxml2xmlin/bandwidth-network.xml rename to tests/networkxmlconfdata/bandwidth-network.xml diff --git a/tests/networkxml2confdata/dhcp6-nat-network.conf b/tests/netwo= rkxmlconfdata/dhcp6-nat-network.conf similarity index 100% rename from tests/networkxml2confdata/dhcp6-nat-network.conf rename to tests/networkxmlconfdata/dhcp6-nat-network.conf diff --git a/tests/networkxml2xmlout/dhcp6-nat-network.xml b/tests/networkx= mlconfdata/dhcp6-nat-network.expect.xml similarity index 100% rename from tests/networkxml2xmlout/dhcp6-nat-network.xml rename to tests/networkxmlconfdata/dhcp6-nat-network.expect.xml diff --git a/tests/networkxml2confdata/dhcp6-nat-network.hostsfile b/tests/= networkxmlconfdata/dhcp6-nat-network.hostsfile similarity index 100% rename from tests/networkxml2confdata/dhcp6-nat-network.hostsfile rename to tests/networkxmlconfdata/dhcp6-nat-network.hostsfile diff --git a/tests/networkxml2confdata/dhcp6-nat-network.xml b/tests/networ= kxmlconfdata/dhcp6-nat-network.xml similarity index 100% rename from tests/networkxml2confdata/dhcp6-nat-network.xml rename to tests/networkxmlconfdata/dhcp6-nat-network.xml diff --git a/tests/networkxml2confdata/dhcp6-network.conf b/tests/networkxm= lconfdata/dhcp6-network.conf similarity index 100% rename from tests/networkxml2confdata/dhcp6-network.conf rename to tests/networkxmlconfdata/dhcp6-network.conf diff --git a/tests/networkxml2xmlout/dhcp6-network.xml b/tests/networkxmlco= nfdata/dhcp6-network.expect.xml similarity index 100% rename from tests/networkxml2xmlout/dhcp6-network.xml rename to tests/networkxmlconfdata/dhcp6-network.expect.xml diff --git a/tests/networkxml2confdata/dhcp6-network.hostsfile b/tests/netw= orkxmlconfdata/dhcp6-network.hostsfile similarity index 100% rename from tests/networkxml2confdata/dhcp6-network.hostsfile rename to tests/networkxmlconfdata/dhcp6-network.hostsfile diff --git a/tests/networkxml2confdata/dhcp6-network.xml b/tests/networkxml= confdata/dhcp6-network.xml similarity index 100% rename from tests/networkxml2confdata/dhcp6-network.xml rename to tests/networkxmlconfdata/dhcp6-network.xml diff --git a/tests/networkxml2confdata/dhcp6host-routed-network.conf b/test= s/networkxmlconfdata/dhcp6host-routed-network.conf similarity index 100% rename from tests/networkxml2confdata/dhcp6host-routed-network.conf rename to tests/networkxmlconfdata/dhcp6host-routed-network.conf diff --git a/tests/networkxml2xmlout/dhcp6host-routed-network.xml b/tests/n= etworkxmlconfdata/dhcp6host-routed-network.expect.xml similarity index 100% rename from tests/networkxml2xmlout/dhcp6host-routed-network.xml rename to tests/networkxmlconfdata/dhcp6host-routed-network.expect.xml diff --git a/tests/networkxml2confdata/dhcp6host-routed-network.hostsfile b= /tests/networkxmlconfdata/dhcp6host-routed-network.hostsfile similarity index 100% rename from tests/networkxml2confdata/dhcp6host-routed-network.hostsfile rename to tests/networkxmlconfdata/dhcp6host-routed-network.hostsfile diff --git a/tests/networkxml2xmlin/dhcp6host-routed-network.xml b/tests/ne= tworkxmlconfdata/dhcp6host-routed-network.xml similarity index 100% rename from tests/networkxml2xmlin/dhcp6host-routed-network.xml rename to tests/networkxmlconfdata/dhcp6host-routed-network.xml diff --git a/tests/networkxml2xmlout/direct-net.xml b/tests/networkxmlconfd= ata/direct-net.expect.xml similarity index 100% rename from tests/networkxml2xmlout/direct-net.xml rename to tests/networkxmlconfdata/direct-net.expect.xml diff --git a/tests/networkxml2xmlin/direct-net.xml b/tests/networkxmlconfda= ta/direct-net.xml similarity index 100% rename from tests/networkxml2xmlin/direct-net.xml rename to tests/networkxmlconfdata/direct-net.xml diff --git a/tests/networkxml2confdata/dnsmasq-options.conf b/tests/network= xmlconfdata/dnsmasq-options.conf similarity index 100% rename from tests/networkxml2confdata/dnsmasq-options.conf rename to tests/networkxmlconfdata/dnsmasq-options.conf diff --git a/tests/networkxml2xmlout/dnsmasq-options.xml b/tests/networkxml= confdata/dnsmasq-options.expect.xml similarity index 100% rename from tests/networkxml2xmlout/dnsmasq-options.xml rename to tests/networkxmlconfdata/dnsmasq-options.expect.xml diff --git a/tests/networkxml2confdata/dnsmasq-options.xml b/tests/networkx= mlconfdata/dnsmasq-options.xml similarity index 100% rename from tests/networkxml2confdata/dnsmasq-options.xml rename to tests/networkxmlconfdata/dnsmasq-options.xml diff --git a/tests/networkxml2xmlout/empty-allow-ipv6.xml b/tests/networkxm= lconfdata/empty-allow-ipv6.expect.xml similarity index 100% rename from tests/networkxml2xmlout/empty-allow-ipv6.xml rename to tests/networkxmlconfdata/empty-allow-ipv6.expect.xml diff --git a/tests/networkxml2xmlin/empty-allow-ipv6.xml b/tests/networkxml= confdata/empty-allow-ipv6.xml similarity index 100% rename from tests/networkxml2xmlin/empty-allow-ipv6.xml rename to tests/networkxmlconfdata/empty-allow-ipv6.xml diff --git a/tests/networkxml2xmlout/host-bridge-net.xml b/tests/networkxml= confdata/host-bridge-net.expect.xml similarity index 100% rename from tests/networkxml2xmlout/host-bridge-net.xml rename to tests/networkxmlconfdata/host-bridge-net.expect.xml diff --git a/tests/networkxml2xmlin/host-bridge-net.xml b/tests/networkxmlc= onfdata/host-bridge-net.xml similarity index 100% rename from tests/networkxml2xmlin/host-bridge-net.xml rename to tests/networkxmlconfdata/host-bridge-net.xml diff --git a/tests/networkxml2xmlout/host-bridge-no-flood.xml b/tests/netwo= rkxmlconfdata/host-bridge-no-flood.expect.xml similarity index 100% rename from tests/networkxml2xmlout/host-bridge-no-flood.xml rename to tests/networkxmlconfdata/host-bridge-no-flood.expect.xml diff --git a/tests/networkxml2xmlin/host-bridge-no-flood.xml b/tests/networ= kxmlconfdata/host-bridge-no-flood.xml similarity index 100% rename from tests/networkxml2xmlin/host-bridge-no-flood.xml rename to tests/networkxmlconfdata/host-bridge-no-flood.xml diff --git a/tests/networkxml2xmlin/hostdev-duplicate.xml b/tests/networkxm= lconfdata/hostdev-duplicate.xml similarity index 100% rename from tests/networkxml2xmlin/hostdev-duplicate.xml rename to tests/networkxmlconfdata/hostdev-duplicate.xml diff --git a/tests/networkxml2xmlin/hostdev-pf-driver-model.xml b/tests/net= workxmlconfdata/hostdev-pf-driver-model.expect.xml similarity index 100% rename from tests/networkxml2xmlin/hostdev-pf-driver-model.xml rename to tests/networkxmlconfdata/hostdev-pf-driver-model.expect.xml diff --git a/tests/networkxml2xmlout/hostdev-pf-driver-model.xml b/tests/ne= tworkxmlconfdata/hostdev-pf-driver-model.xml similarity index 100% rename from tests/networkxml2xmlout/hostdev-pf-driver-model.xml rename to tests/networkxmlconfdata/hostdev-pf-driver-model.xml diff --git a/tests/networkxml2xmlin/hostdev-pf.xml b/tests/networkxmlconfda= ta/hostdev-pf.expect.xml similarity index 100% rename from tests/networkxml2xmlin/hostdev-pf.xml rename to tests/networkxmlconfdata/hostdev-pf.expect.xml diff --git a/tests/networkxml2xmlout/hostdev-pf.xml b/tests/networkxmlconfd= ata/hostdev-pf.xml similarity index 100% rename from tests/networkxml2xmlout/hostdev-pf.xml rename to tests/networkxmlconfdata/hostdev-pf.xml diff --git a/tests/networkxml2xmlin/hostdev.xml b/tests/networkxmlconfdata/= hostdev.expect.xml similarity index 100% rename from tests/networkxml2xmlin/hostdev.xml rename to tests/networkxmlconfdata/hostdev.expect.xml diff --git a/tests/networkxml2xmlout/hostdev.xml b/tests/networkxmlconfdata= /hostdev.xml similarity index 100% rename from tests/networkxml2xmlout/hostdev.xml rename to tests/networkxmlconfdata/hostdev.xml diff --git a/tests/networkxml2confdata/isolated-network.conf b/tests/networ= kxmlconfdata/isolated-network.conf similarity index 100% rename from tests/networkxml2confdata/isolated-network.conf rename to tests/networkxmlconfdata/isolated-network.conf diff --git a/tests/networkxml2xmlout/isolated-network.xml b/tests/networkxm= lconfdata/isolated-network.expect.xml similarity index 100% rename from tests/networkxml2xmlout/isolated-network.xml rename to tests/networkxmlconfdata/isolated-network.expect.xml diff --git a/tests/networkxml2xmlin/isolated-network.xml b/tests/networkxml= confdata/isolated-network.xml similarity index 100% rename from tests/networkxml2xmlin/isolated-network.xml rename to tests/networkxmlconfdata/isolated-network.xml diff --git a/tests/networkxml2xmlout/isolated-ports.xml b/tests/networkxmlc= onfdata/isolated-ports.expect.xml similarity index 100% rename from tests/networkxml2xmlout/isolated-ports.xml rename to tests/networkxmlconfdata/isolated-ports.expect.xml diff --git a/tests/networkxml2xmlin/isolated-ports.xml b/tests/networkxmlco= nfdata/isolated-ports.xml similarity index 100% rename from tests/networkxml2xmlin/isolated-ports.xml rename to tests/networkxmlconfdata/isolated-ports.xml diff --git a/tests/networkxml2confdata/leasetime-hours.conf b/tests/network= xmlconfdata/leasetime-hours.conf similarity index 100% rename from tests/networkxml2confdata/leasetime-hours.conf rename to tests/networkxmlconfdata/leasetime-hours.conf diff --git a/tests/networkxmlconfdata/leasetime-hours.expect.xml b/tests/ne= tworkxmlconfdata/leasetime-hours.expect.xml new file mode 120000 index 0000000000..9ba0abf62b --- /dev/null +++ b/tests/networkxmlconfdata/leasetime-hours.expect.xml @@ -0,0 +1 @@ +leasetime-hours.xml \ No newline at end of file diff --git a/tests/networkxml2confdata/leasetime-hours.hostsfile b/tests/ne= tworkxmlconfdata/leasetime-hours.hostsfile similarity index 100% rename from tests/networkxml2confdata/leasetime-hours.hostsfile rename to tests/networkxmlconfdata/leasetime-hours.hostsfile diff --git a/tests/networkxml2confdata/leasetime-hours.xml b/tests/networkx= mlconfdata/leasetime-hours.xml similarity index 100% rename from tests/networkxml2confdata/leasetime-hours.xml rename to tests/networkxmlconfdata/leasetime-hours.xml diff --git a/tests/networkxml2confdata/leasetime-infinite.conf b/tests/netw= orkxmlconfdata/leasetime-infinite.conf similarity index 100% rename from tests/networkxml2confdata/leasetime-infinite.conf rename to tests/networkxmlconfdata/leasetime-infinite.conf diff --git a/tests/networkxmlconfdata/leasetime-infinite.expect.xml b/tests= /networkxmlconfdata/leasetime-infinite.expect.xml new file mode 120000 index 0000000000..8862319079 --- /dev/null +++ b/tests/networkxmlconfdata/leasetime-infinite.expect.xml @@ -0,0 +1 @@ +leasetime-infinite.xml \ No newline at end of file diff --git a/tests/networkxml2confdata/leasetime-infinite.hostsfile b/tests= /networkxmlconfdata/leasetime-infinite.hostsfile similarity index 100% rename from tests/networkxml2confdata/leasetime-infinite.hostsfile rename to tests/networkxmlconfdata/leasetime-infinite.hostsfile diff --git a/tests/networkxml2confdata/leasetime-infinite.xml b/tests/netwo= rkxmlconfdata/leasetime-infinite.xml similarity index 100% rename from tests/networkxml2confdata/leasetime-infinite.xml rename to tests/networkxmlconfdata/leasetime-infinite.xml diff --git a/tests/networkxml2confdata/leasetime-minutes.conf b/tests/netwo= rkxmlconfdata/leasetime-minutes.conf similarity index 100% rename from tests/networkxml2confdata/leasetime-minutes.conf rename to tests/networkxmlconfdata/leasetime-minutes.conf diff --git a/tests/networkxmlconfdata/leasetime-minutes.expect.xml b/tests/= networkxmlconfdata/leasetime-minutes.expect.xml new file mode 120000 index 0000000000..ef86e9cf90 --- /dev/null +++ b/tests/networkxmlconfdata/leasetime-minutes.expect.xml @@ -0,0 +1 @@ +leasetime-minutes.xml \ No newline at end of file diff --git a/tests/networkxml2confdata/leasetime-minutes.hostsfile b/tests/= networkxmlconfdata/leasetime-minutes.hostsfile similarity index 100% rename from tests/networkxml2confdata/leasetime-minutes.hostsfile rename to tests/networkxmlconfdata/leasetime-minutes.hostsfile diff --git a/tests/networkxml2confdata/leasetime-minutes.xml b/tests/networ= kxmlconfdata/leasetime-minutes.xml similarity index 100% rename from tests/networkxml2confdata/leasetime-minutes.xml rename to tests/networkxmlconfdata/leasetime-minutes.xml diff --git a/tests/networkxml2confdata/leasetime-seconds.conf b/tests/netwo= rkxmlconfdata/leasetime-seconds.conf similarity index 100% rename from tests/networkxml2confdata/leasetime-seconds.conf rename to tests/networkxmlconfdata/leasetime-seconds.conf diff --git a/tests/networkxmlconfdata/leasetime-seconds.expect.xml b/tests/= networkxmlconfdata/leasetime-seconds.expect.xml new file mode 120000 index 0000000000..e7944dc429 --- /dev/null +++ b/tests/networkxmlconfdata/leasetime-seconds.expect.xml @@ -0,0 +1 @@ +leasetime-seconds.xml \ No newline at end of file diff --git a/tests/networkxml2confdata/leasetime-seconds.hostsfile b/tests/= networkxmlconfdata/leasetime-seconds.hostsfile similarity index 100% rename from tests/networkxml2confdata/leasetime-seconds.hostsfile rename to tests/networkxmlconfdata/leasetime-seconds.hostsfile diff --git a/tests/networkxml2confdata/leasetime-seconds.xml b/tests/networ= kxmlconfdata/leasetime-seconds.xml similarity index 100% rename from tests/networkxml2confdata/leasetime-seconds.xml rename to tests/networkxmlconfdata/leasetime-seconds.xml diff --git a/tests/networkxml2xmlout/metadata.xml b/tests/networkxmlconfdat= a/metadata.expect.xml similarity index 100% rename from tests/networkxml2xmlout/metadata.xml rename to tests/networkxmlconfdata/metadata.expect.xml diff --git a/tests/networkxml2xmlin/metadata.xml b/tests/networkxmlconfdata= /metadata.xml similarity index 100% rename from tests/networkxml2xmlin/metadata.xml rename to tests/networkxmlconfdata/metadata.xml diff --git a/tests/networkxml2confdata/nat-network-dns-forward-plain.conf b= /tests/networkxmlconfdata/nat-network-dns-forward-plain.conf similarity index 100% rename from tests/networkxml2confdata/nat-network-dns-forward-plain.conf rename to tests/networkxmlconfdata/nat-network-dns-forward-plain.conf diff --git a/tests/networkxml2xmlout/nat-network-dns-forward-plain.xml b/te= sts/networkxmlconfdata/nat-network-dns-forward-plain.expect.xml similarity index 100% rename from tests/networkxml2xmlout/nat-network-dns-forward-plain.xml rename to tests/networkxmlconfdata/nat-network-dns-forward-plain.expect.xml diff --git a/tests/networkxml2confdata/nat-network-dns-forward-plain.xml b/= tests/networkxmlconfdata/nat-network-dns-forward-plain.xml similarity index 100% rename from tests/networkxml2confdata/nat-network-dns-forward-plain.xml rename to tests/networkxmlconfdata/nat-network-dns-forward-plain.xml diff --git a/tests/networkxml2confdata/nat-network-dns-forwarder-no-resolv.= conf b/tests/networkxmlconfdata/nat-network-dns-forwarder-no-resolv.conf similarity index 100% rename from tests/networkxml2confdata/nat-network-dns-forwarder-no-resolv.c= onf rename to tests/networkxmlconfdata/nat-network-dns-forwarder-no-resolv.conf diff --git a/tests/networkxml2xmlout/nat-network-dns-forwarder-no-resolv.xm= l b/tests/networkxmlconfdata/nat-network-dns-forwarder-no-resolv.expect.xml similarity index 100% rename from tests/networkxml2xmlout/nat-network-dns-forwarder-no-resolv.xml rename to tests/networkxmlconfdata/nat-network-dns-forwarder-no-resolv.expe= ct.xml diff --git a/tests/networkxml2confdata/nat-network-dns-forwarder-no-resolv.= xml b/tests/networkxmlconfdata/nat-network-dns-forwarder-no-resolv.xml similarity index 100% rename from tests/networkxml2confdata/nat-network-dns-forwarder-no-resolv.x= ml rename to tests/networkxmlconfdata/nat-network-dns-forwarder-no-resolv.xml diff --git a/tests/networkxml2confdata/nat-network-dns-forwarders.conf b/te= sts/networkxmlconfdata/nat-network-dns-forwarders.conf similarity index 100% rename from tests/networkxml2confdata/nat-network-dns-forwarders.conf rename to tests/networkxmlconfdata/nat-network-dns-forwarders.conf diff --git a/tests/networkxml2xmlout/nat-network-dns-forwarders.xml b/tests= /networkxmlconfdata/nat-network-dns-forwarders.expect.xml similarity index 100% rename from tests/networkxml2xmlout/nat-network-dns-forwarders.xml rename to tests/networkxmlconfdata/nat-network-dns-forwarders.expect.xml diff --git a/tests/networkxml2xmlin/nat-network-dns-forwarders.xml b/tests/= networkxmlconfdata/nat-network-dns-forwarders.xml similarity index 100% rename from tests/networkxml2xmlin/nat-network-dns-forwarders.xml rename to tests/networkxmlconfdata/nat-network-dns-forwarders.xml diff --git a/tests/networkxml2confdata/nat-network-dns-hosts.conf b/tests/n= etworkxmlconfdata/nat-network-dns-hosts.conf similarity index 100% rename from tests/networkxml2confdata/nat-network-dns-hosts.conf rename to tests/networkxmlconfdata/nat-network-dns-hosts.conf diff --git a/tests/networkxml2xmlout/nat-network-dns-hosts.xml b/tests/netw= orkxmlconfdata/nat-network-dns-hosts.expect.xml similarity index 100% rename from tests/networkxml2xmlout/nat-network-dns-hosts.xml rename to tests/networkxmlconfdata/nat-network-dns-hosts.expect.xml diff --git a/tests/networkxml2xmlin/nat-network-dns-hosts.xml b/tests/netwo= rkxmlconfdata/nat-network-dns-hosts.xml similarity index 100% rename from tests/networkxml2xmlin/nat-network-dns-hosts.xml rename to tests/networkxmlconfdata/nat-network-dns-hosts.xml diff --git a/tests/networkxml2confdata/nat-network-dns-local-domain.conf b/= tests/networkxmlconfdata/nat-network-dns-local-domain.conf similarity index 100% rename from tests/networkxml2confdata/nat-network-dns-local-domain.conf rename to tests/networkxmlconfdata/nat-network-dns-local-domain.conf diff --git a/tests/networkxml2xmlout/nat-network-dns-local-domain.xml b/tes= ts/networkxmlconfdata/nat-network-dns-local-domain.expect.xml similarity index 100% rename from tests/networkxml2xmlout/nat-network-dns-local-domain.xml rename to tests/networkxmlconfdata/nat-network-dns-local-domain.expect.xml diff --git a/tests/networkxml2confdata/nat-network-dns-local-domain.xml b/t= ests/networkxmlconfdata/nat-network-dns-local-domain.xml similarity index 100% rename from tests/networkxml2confdata/nat-network-dns-local-domain.xml rename to tests/networkxmlconfdata/nat-network-dns-local-domain.xml diff --git a/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.c= onf b/tests/networkxmlconfdata/nat-network-dns-srv-record-minimal.conf similarity index 100% rename from tests/networkxml2confdata/nat-network-dns-srv-record-minimal.co= nf rename to tests/networkxmlconfdata/nat-network-dns-srv-record-minimal.conf diff --git a/tests/networkxml2xmlout/nat-network-dns-srv-record-minimal.xml= b/tests/networkxmlconfdata/nat-network-dns-srv-record-minimal.expect.xml similarity index 100% rename from tests/networkxml2xmlout/nat-network-dns-srv-record-minimal.xml rename to tests/networkxmlconfdata/nat-network-dns-srv-record-minimal.expec= t.xml diff --git a/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.h= ostsfile b/tests/networkxmlconfdata/nat-network-dns-srv-record-minimal.host= sfile similarity index 100% rename from tests/networkxml2confdata/nat-network-dns-srv-record-minimal.ho= stsfile rename to tests/networkxmlconfdata/nat-network-dns-srv-record-minimal.hosts= file diff --git a/tests/networkxml2confdata/nat-network-dns-srv-record-minimal.x= ml b/tests/networkxmlconfdata/nat-network-dns-srv-record-minimal.xml similarity index 100% rename from tests/networkxml2confdata/nat-network-dns-srv-record-minimal.xml rename to tests/networkxmlconfdata/nat-network-dns-srv-record-minimal.xml diff --git a/tests/networkxml2confdata/nat-network-dns-srv-record.conf b/te= sts/networkxmlconfdata/nat-network-dns-srv-record.conf similarity index 100% rename from tests/networkxml2confdata/nat-network-dns-srv-record.conf rename to tests/networkxmlconfdata/nat-network-dns-srv-record.conf diff --git a/tests/networkxml2xmlout/nat-network-dns-srv-record.xml b/tests= /networkxmlconfdata/nat-network-dns-srv-record.expect.xml similarity index 100% rename from tests/networkxml2xmlout/nat-network-dns-srv-record.xml rename to tests/networkxmlconfdata/nat-network-dns-srv-record.expect.xml diff --git a/tests/networkxml2confdata/nat-network-dns-srv-record.hostsfile= b/tests/networkxmlconfdata/nat-network-dns-srv-record.hostsfile similarity index 100% rename from tests/networkxml2confdata/nat-network-dns-srv-record.hostsfile rename to tests/networkxmlconfdata/nat-network-dns-srv-record.hostsfile diff --git a/tests/networkxml2confdata/nat-network-dns-srv-record.xml b/tes= ts/networkxmlconfdata/nat-network-dns-srv-record.xml similarity index 100% rename from tests/networkxml2confdata/nat-network-dns-srv-record.xml rename to tests/networkxmlconfdata/nat-network-dns-srv-record.xml diff --git a/tests/networkxml2confdata/nat-network-dns-srv-records.conf b/t= ests/networkxmlconfdata/nat-network-dns-srv-records.conf similarity index 100% rename from tests/networkxml2confdata/nat-network-dns-srv-records.conf rename to tests/networkxmlconfdata/nat-network-dns-srv-records.conf diff --git a/tests/networkxml2xmlout/nat-network-dns-srv-records.xml b/test= s/networkxmlconfdata/nat-network-dns-srv-records.expect.xml similarity index 100% rename from tests/networkxml2xmlout/nat-network-dns-srv-records.xml rename to tests/networkxmlconfdata/nat-network-dns-srv-records.expect.xml diff --git a/tests/networkxml2confdata/nat-network-dns-srv-records.hostsfil= e b/tests/networkxmlconfdata/nat-network-dns-srv-records.hostsfile similarity index 100% rename from tests/networkxml2confdata/nat-network-dns-srv-records.hostsfile rename to tests/networkxmlconfdata/nat-network-dns-srv-records.hostsfile diff --git a/tests/networkxml2xmlin/nat-network-dns-srv-records.xml b/tests= /networkxmlconfdata/nat-network-dns-srv-records.xml similarity index 100% rename from tests/networkxml2xmlin/nat-network-dns-srv-records.xml rename to tests/networkxmlconfdata/nat-network-dns-srv-records.xml diff --git a/tests/networkxml2confdata/nat-network-dns-txt-record.conf b/te= sts/networkxmlconfdata/nat-network-dns-txt-record.conf similarity index 100% rename from tests/networkxml2confdata/nat-network-dns-txt-record.conf rename to tests/networkxmlconfdata/nat-network-dns-txt-record.conf diff --git a/tests/networkxml2xmlout/nat-network-dns-txt-record.xml b/tests= /networkxmlconfdata/nat-network-dns-txt-record.expect.xml similarity index 100% rename from tests/networkxml2xmlout/nat-network-dns-txt-record.xml rename to tests/networkxmlconfdata/nat-network-dns-txt-record.expect.xml diff --git a/tests/networkxml2confdata/nat-network-dns-txt-record.hostsfile= b/tests/networkxmlconfdata/nat-network-dns-txt-record.hostsfile similarity index 100% rename from tests/networkxml2confdata/nat-network-dns-txt-record.hostsfile rename to tests/networkxmlconfdata/nat-network-dns-txt-record.hostsfile diff --git a/tests/networkxml2confdata/nat-network-dns-txt-record.xml b/tes= ts/networkxmlconfdata/nat-network-dns-txt-record.xml similarity index 100% rename from tests/networkxml2confdata/nat-network-dns-txt-record.xml rename to tests/networkxmlconfdata/nat-network-dns-txt-record.xml diff --git a/tests/networkxml2confdata/nat-network-explicit-flood.conf b/te= sts/networkxmlconfdata/nat-network-explicit-flood.conf similarity index 100% rename from tests/networkxml2confdata/nat-network-explicit-flood.conf rename to tests/networkxmlconfdata/nat-network-explicit-flood.conf diff --git a/tests/networkxml2xmlout/nat-network-explicit-flood.xml b/tests= /networkxmlconfdata/nat-network-explicit-flood.expect.xml similarity index 100% rename from tests/networkxml2xmlout/nat-network-explicit-flood.xml rename to tests/networkxmlconfdata/nat-network-explicit-flood.expect.xml diff --git a/tests/networkxml2confdata/nat-network-explicit-flood.hostsfile= b/tests/networkxmlconfdata/nat-network-explicit-flood.hostsfile similarity index 100% rename from tests/networkxml2confdata/nat-network-explicit-flood.hostsfile rename to tests/networkxmlconfdata/nat-network-explicit-flood.hostsfile diff --git a/tests/networkxml2xmlin/nat-network-explicit-flood.xml b/tests/= networkxmlconfdata/nat-network-explicit-flood.xml similarity index 100% rename from tests/networkxml2xmlin/nat-network-explicit-flood.xml rename to tests/networkxmlconfdata/nat-network-explicit-flood.xml diff --git a/tests/networkxml2confdata/nat-network-forward-nat-address.conf= b/tests/networkxmlconfdata/nat-network-forward-nat-address.conf similarity index 100% rename from tests/networkxml2confdata/nat-network-forward-nat-address.conf rename to tests/networkxmlconfdata/nat-network-forward-nat-address.conf diff --git a/tests/networkxml2xmlout/nat-network-forward-nat-address.xml b/= tests/networkxmlconfdata/nat-network-forward-nat-address.expect.xml similarity index 100% rename from tests/networkxml2xmlout/nat-network-forward-nat-address.xml rename to tests/networkxmlconfdata/nat-network-forward-nat-address.expect.x= ml diff --git a/tests/networkxml2confdata/nat-network-forward-nat-address.host= sfile b/tests/networkxmlconfdata/nat-network-forward-nat-address.hostsfile similarity index 100% rename from tests/networkxml2confdata/nat-network-forward-nat-address.hosts= file rename to tests/networkxmlconfdata/nat-network-forward-nat-address.hostsfile diff --git a/tests/networkxml2xmlin/nat-network-forward-nat-address.xml b/t= ests/networkxmlconfdata/nat-network-forward-nat-address.xml similarity index 100% rename from tests/networkxml2xmlin/nat-network-forward-nat-address.xml rename to tests/networkxmlconfdata/nat-network-forward-nat-address.xml diff --git a/tests/networkxml2confdata/nat-network-forward-nat-ipv6.conf b/= tests/networkxmlconfdata/nat-network-forward-nat-ipv6.conf similarity index 100% rename from tests/networkxml2confdata/nat-network-forward-nat-ipv6.conf rename to tests/networkxmlconfdata/nat-network-forward-nat-ipv6.conf diff --git a/tests/networkxml2xmlout/nat-network-forward-nat-ipv6.xml b/tes= ts/networkxmlconfdata/nat-network-forward-nat-ipv6.expect.xml similarity index 100% rename from tests/networkxml2xmlout/nat-network-forward-nat-ipv6.xml rename to tests/networkxmlconfdata/nat-network-forward-nat-ipv6.expect.xml diff --git a/tests/networkxml2xmlin/nat-network-forward-nat-ipv6.xml b/test= s/networkxmlconfdata/nat-network-forward-nat-ipv6.xml similarity index 100% rename from tests/networkxml2xmlin/nat-network-forward-nat-ipv6.xml rename to tests/networkxmlconfdata/nat-network-forward-nat-ipv6.xml diff --git a/tests/networkxml2confdata/nat-network-forward-nat-no-address.c= onf b/tests/networkxmlconfdata/nat-network-forward-nat-no-address.conf similarity index 100% rename from tests/networkxml2confdata/nat-network-forward-nat-no-address.co= nf rename to tests/networkxmlconfdata/nat-network-forward-nat-no-address.conf diff --git a/tests/networkxml2xmlout/nat-network-forward-nat-no-address.xml= b/tests/networkxmlconfdata/nat-network-forward-nat-no-address.expect.xml similarity index 100% rename from tests/networkxml2xmlout/nat-network-forward-nat-no-address.xml rename to tests/networkxmlconfdata/nat-network-forward-nat-no-address.expec= t.xml diff --git a/tests/networkxml2confdata/nat-network-forward-nat-no-address.h= ostsfile b/tests/networkxmlconfdata/nat-network-forward-nat-no-address.host= sfile similarity index 100% rename from tests/networkxml2confdata/nat-network-forward-nat-no-address.ho= stsfile rename to tests/networkxmlconfdata/nat-network-forward-nat-no-address.hosts= file diff --git a/tests/networkxml2xmlin/nat-network-forward-nat-no-address.xml = b/tests/networkxmlconfdata/nat-network-forward-nat-no-address.xml similarity index 100% rename from tests/networkxml2xmlin/nat-network-forward-nat-no-address.xml rename to tests/networkxmlconfdata/nat-network-forward-nat-no-address.xml diff --git a/tests/networkxml2confdata/nat-network-mtu.conf b/tests/network= xmlconfdata/nat-network-mtu.conf similarity index 100% rename from tests/networkxml2confdata/nat-network-mtu.conf rename to tests/networkxmlconfdata/nat-network-mtu.conf diff --git a/tests/networkxml2xmlout/nat-network-mtu.xml b/tests/networkxml= confdata/nat-network-mtu.expect.xml similarity index 100% rename from tests/networkxml2xmlout/nat-network-mtu.xml rename to tests/networkxmlconfdata/nat-network-mtu.expect.xml diff --git a/tests/networkxml2confdata/nat-network-mtu.hostsfile b/tests/ne= tworkxmlconfdata/nat-network-mtu.hostsfile similarity index 100% rename from tests/networkxml2confdata/nat-network-mtu.hostsfile rename to tests/networkxmlconfdata/nat-network-mtu.hostsfile diff --git a/tests/networkxml2xmlin/nat-network-mtu.xml b/tests/networkxmlc= onfdata/nat-network-mtu.xml similarity index 100% rename from tests/networkxml2xmlin/nat-network-mtu.xml rename to tests/networkxmlconfdata/nat-network-mtu.xml diff --git a/tests/networkxml2confdata/nat-network-name-with-quotes.conf b/= tests/networkxmlconfdata/nat-network-name-with-quotes.conf similarity index 100% rename from tests/networkxml2confdata/nat-network-name-with-quotes.conf rename to tests/networkxmlconfdata/nat-network-name-with-quotes.conf diff --git a/tests/networkxml2xmlout/nat-network-name-with-quotes.xml b/tes= ts/networkxmlconfdata/nat-network-name-with-quotes.expect.xml similarity index 100% rename from tests/networkxml2xmlout/nat-network-name-with-quotes.xml rename to tests/networkxmlconfdata/nat-network-name-with-quotes.expect.xml diff --git a/tests/networkxml2confdata/nat-network-name-with-quotes.hostsfi= le b/tests/networkxmlconfdata/nat-network-name-with-quotes.hostsfile similarity index 100% rename from tests/networkxml2confdata/nat-network-name-with-quotes.hostsfile rename to tests/networkxmlconfdata/nat-network-name-with-quotes.hostsfile diff --git a/tests/networkxml2confdata/nat-network-name-with-quotes.xml b/t= ests/networkxmlconfdata/nat-network-name-with-quotes.xml similarity index 100% rename from tests/networkxml2confdata/nat-network-name-with-quotes.xml rename to tests/networkxmlconfdata/nat-network-name-with-quotes.xml diff --git a/tests/networkxml2confdata/nat-network.conf b/tests/networkxmlc= onfdata/nat-network.conf similarity index 100% rename from tests/networkxml2confdata/nat-network.conf rename to tests/networkxmlconfdata/nat-network.conf diff --git a/tests/networkxml2xmlout/nat-network.xml b/tests/networkxmlconf= data/nat-network.expect.xml similarity index 100% rename from tests/networkxml2xmlout/nat-network.xml rename to tests/networkxmlconfdata/nat-network.expect.xml diff --git a/tests/networkxml2confdata/nat-network.hostsfile b/tests/networ= kxmlconfdata/nat-network.hostsfile similarity index 100% rename from tests/networkxml2confdata/nat-network.hostsfile rename to tests/networkxmlconfdata/nat-network.hostsfile diff --git a/tests/networkxml2xmlin/nat-network.xml b/tests/networkxmlconfd= ata/nat-network.xml similarity index 100% rename from tests/networkxml2xmlin/nat-network.xml rename to tests/networkxmlconfdata/nat-network.xml diff --git a/tests/networkxml2confdata/netboot-network.conf b/tests/network= xmlconfdata/netboot-network.conf similarity index 100% rename from tests/networkxml2confdata/netboot-network.conf rename to tests/networkxmlconfdata/netboot-network.conf diff --git a/tests/networkxml2xmlout/netboot-network.xml b/tests/networkxml= confdata/netboot-network.expect.xml similarity index 100% rename from tests/networkxml2xmlout/netboot-network.xml rename to tests/networkxmlconfdata/netboot-network.expect.xml diff --git a/tests/networkxml2xmlin/netboot-network.xml b/tests/networkxmlc= onfdata/netboot-network.xml similarity index 100% rename from tests/networkxml2xmlin/netboot-network.xml rename to tests/networkxmlconfdata/netboot-network.xml diff --git a/tests/networkxml2confdata/netboot-proxy-network.conf b/tests/n= etworkxmlconfdata/netboot-proxy-network.conf similarity index 100% rename from tests/networkxml2confdata/netboot-proxy-network.conf rename to tests/networkxmlconfdata/netboot-proxy-network.conf diff --git a/tests/networkxml2xmlout/netboot-proxy-network.xml b/tests/netw= orkxmlconfdata/netboot-proxy-network.expect.xml similarity index 100% rename from tests/networkxml2xmlout/netboot-proxy-network.xml rename to tests/networkxmlconfdata/netboot-proxy-network.expect.xml diff --git a/tests/networkxml2xmlin/netboot-proxy-network.xml b/tests/netwo= rkxmlconfdata/netboot-proxy-network.xml similarity index 100% rename from tests/networkxml2xmlin/netboot-proxy-network.xml rename to tests/networkxmlconfdata/netboot-proxy-network.xml diff --git a/tests/networkxml2confdata/netboot-tftp.conf b/tests/networkxml= confdata/netboot-tftp.conf similarity index 100% rename from tests/networkxml2confdata/netboot-tftp.conf rename to tests/networkxmlconfdata/netboot-tftp.conf diff --git a/tests/networkxmlconfdata/netboot-tftp.expect.xml b/tests/netwo= rkxmlconfdata/netboot-tftp.expect.xml new file mode 120000 index 0000000000..eb3b28de25 --- /dev/null +++ b/tests/networkxmlconfdata/netboot-tftp.expect.xml @@ -0,0 +1 @@ +netboot-tftp.xml \ No newline at end of file diff --git a/tests/networkxml2confdata/netboot-tftp.xml b/tests/networkxmlc= onfdata/netboot-tftp.xml similarity index 100% rename from tests/networkxml2confdata/netboot-tftp.xml rename to tests/networkxmlconfdata/netboot-tftp.xml diff --git a/tests/networkxml2xmlin/open-network-with-forward-dev.xml b/tes= ts/networkxmlconfdata/open-network-with-forward-dev.xml similarity index 100% rename from tests/networkxml2xmlin/open-network-with-forward-dev.xml rename to tests/networkxmlconfdata/open-network-with-forward-dev.xml diff --git a/tests/networkxml2confdata/open-network.conf b/tests/networkxml= confdata/open-network.conf similarity index 100% rename from tests/networkxml2confdata/open-network.conf rename to tests/networkxmlconfdata/open-network.conf diff --git a/tests/networkxml2xmlout/open-network.xml b/tests/networkxmlcon= fdata/open-network.expect.xml similarity index 100% rename from tests/networkxml2xmlout/open-network.xml rename to tests/networkxmlconfdata/open-network.expect.xml diff --git a/tests/networkxml2xmlin/open-network.xml b/tests/networkxmlconf= data/open-network.xml similarity index 100% rename from tests/networkxml2xmlin/open-network.xml rename to tests/networkxmlconfdata/open-network.xml diff --git a/tests/networkxml2xmlin/openvswitch-net.xml b/tests/networkxmlc= onfdata/openvswitch-net.expect.xml similarity index 100% rename from tests/networkxml2xmlin/openvswitch-net.xml rename to tests/networkxmlconfdata/openvswitch-net.expect.xml diff --git a/tests/networkxml2xmlout/openvswitch-net.xml b/tests/networkxml= confdata/openvswitch-net.xml similarity index 100% rename from tests/networkxml2xmlout/openvswitch-net.xml rename to tests/networkxmlconfdata/openvswitch-net.xml diff --git a/tests/networkxml2xmlin/passthrough-address-crash.xml b/tests/n= etworkxmlconfdata/passthrough-address-crash.xml similarity index 100% rename from tests/networkxml2xmlin/passthrough-address-crash.xml rename to tests/networkxmlconfdata/passthrough-address-crash.xml diff --git a/tests/networkxml2xmlin/passthrough-duplicate.xml b/tests/netwo= rkxmlconfdata/passthrough-duplicate.xml similarity index 100% rename from tests/networkxml2xmlin/passthrough-duplicate.xml rename to tests/networkxmlconfdata/passthrough-duplicate.xml diff --git a/tests/networkxml2confdata/passthrough-pf.conf b/tests/networkx= mlconfdata/passthrough-pf.conf similarity index 100% rename from tests/networkxml2confdata/passthrough-pf.conf rename to tests/networkxmlconfdata/passthrough-pf.conf diff --git a/tests/networkxml2xmlin/passthrough-pf.xml b/tests/networkxmlco= nfdata/passthrough-pf.xml similarity index 100% rename from tests/networkxml2xmlin/passthrough-pf.xml rename to tests/networkxmlconfdata/passthrough-pf.xml diff --git a/tests/networkxml2confdata/ptr-domains-auto.conf b/tests/networ= kxmlconfdata/ptr-domains-auto.conf similarity index 100% rename from tests/networkxml2confdata/ptr-domains-auto.conf rename to tests/networkxmlconfdata/ptr-domains-auto.conf diff --git a/tests/networkxml2xmlout/ptr-domains-auto.xml b/tests/networkxm= lconfdata/ptr-domains-auto.expect.xml similarity index 100% rename from tests/networkxml2xmlout/ptr-domains-auto.xml rename to tests/networkxmlconfdata/ptr-domains-auto.expect.xml diff --git a/tests/networkxml2confdata/ptr-domains-auto.hostsfile b/tests/n= etworkxmlconfdata/ptr-domains-auto.hostsfile similarity index 100% rename from tests/networkxml2confdata/ptr-domains-auto.hostsfile rename to tests/networkxmlconfdata/ptr-domains-auto.hostsfile diff --git a/tests/networkxml2confdata/ptr-domains-auto.xml b/tests/network= xmlconfdata/ptr-domains-auto.xml similarity index 100% rename from tests/networkxml2confdata/ptr-domains-auto.xml rename to tests/networkxmlconfdata/ptr-domains-auto.xml diff --git a/tests/networkxml2xmlin/routed-network-no-dns-extra-elements.xm= l b/tests/networkxmlconfdata/routed-network-no-dns-extra-elements.xml similarity index 100% rename from tests/networkxml2xmlin/routed-network-no-dns-extra-elements.xml rename to tests/networkxmlconfdata/routed-network-no-dns-extra-elements.xml diff --git a/tests/networkxml2xmlout/routed-network-no-dns.xml b/tests/netw= orkxmlconfdata/routed-network-no-dns.expect.xml similarity index 100% rename from tests/networkxml2xmlout/routed-network-no-dns.xml rename to tests/networkxmlconfdata/routed-network-no-dns.expect.xml diff --git a/tests/networkxml2xmlin/routed-network-no-dns.xml b/tests/netwo= rkxmlconfdata/routed-network-no-dns.xml similarity index 100% rename from tests/networkxml2xmlin/routed-network-no-dns.xml rename to tests/networkxmlconfdata/routed-network-no-dns.xml diff --git a/tests/networkxml2confdata/routed-network.conf b/tests/networkx= mlconfdata/routed-network.conf similarity index 100% rename from tests/networkxml2confdata/routed-network.conf rename to tests/networkxmlconfdata/routed-network.conf diff --git a/tests/networkxml2xmlout/routed-network.xml b/tests/networkxmlc= onfdata/routed-network.expect.xml similarity index 100% rename from tests/networkxml2xmlout/routed-network.xml rename to tests/networkxmlconfdata/routed-network.expect.xml diff --git a/tests/networkxml2xmlin/routed-network.xml b/tests/networkxmlco= nfdata/routed-network.xml similarity index 100% rename from tests/networkxml2xmlin/routed-network.xml rename to tests/networkxmlconfdata/routed-network.xml diff --git a/tests/networkxml2confdata/set-mtu.conf b/tests/networkxmlconfd= ata/set-mtu.conf similarity index 100% rename from tests/networkxml2confdata/set-mtu.conf rename to tests/networkxmlconfdata/set-mtu.conf diff --git a/tests/networkxml2xmlout/set-mtu.xml b/tests/networkxmlconfdata= /set-mtu.expect.xml similarity index 100% rename from tests/networkxml2xmlout/set-mtu.xml rename to tests/networkxmlconfdata/set-mtu.expect.xml diff --git a/tests/networkxml2xmlin/set-mtu.xml b/tests/networkxmlconfdata/= set-mtu.xml similarity index 100% rename from tests/networkxml2xmlin/set-mtu.xml rename to tests/networkxmlconfdata/set-mtu.xml diff --git a/tests/networkxml2xmlout/vepa-net.xml b/tests/networkxmlconfdat= a/vepa-net.expect.xml similarity index 100% rename from tests/networkxml2xmlout/vepa-net.xml rename to tests/networkxmlconfdata/vepa-net.expect.xml diff --git a/tests/networkxml2xmlin/vepa-net.xml b/tests/networkxmlconfdata= /vepa-net.xml similarity index 100% rename from tests/networkxml2xmlin/vepa-net.xml rename to tests/networkxmlconfdata/vepa-net.xml diff --git a/tests/networkxml2xmltest.c b/tests/networkxmlconftest.c similarity index 96% rename from tests/networkxml2xmltest.c rename to tests/networkxmlconftest.c index 1d897c1fe4..69a060c57d 100644 --- a/tests/networkxml2xmltest.c +++ b/tests/networkxmlconftest.c @@ -241,11 +241,10 @@ testRun(const char *name, info->expectResult =3D expectResult; info->xmlopt =3D xmlopt; info->caps =3D caps; - info->inxml =3D g_strdup_printf("%s/networkxml2xmlin/%s.xml", abs_srcd= ir, name); - info->outxml =3D g_strdup_printf("%s/networkxml2xmlout/%s.xml", abs_sr= cdir, name); - /* Temporarily use conf files from networkxml2confdata/ */ - info->outconf =3D g_strdup_printf("%s/networkxml2confdata/%s.conf", ab= s_srcdir, name); - info->outhostsfile =3D g_strdup_printf("%s/networkxml2confdata/%s.host= sfile", abs_srcdir, name); + info->inxml =3D g_strdup_printf("%s/networkxmlconfdata/%s.xml", abs_sr= cdir, name); + info->outxml =3D g_strdup_printf("%s/networkxmlconfdata/%s.expect.xml"= , abs_srcdir, name); + info->outconf =3D g_strdup_printf("%s/networkxmlconfdata/%s.conf", abs= _srcdir, name); + info->outhostsfile =3D g_strdup_printf("%s/networkxmlconfdata/%s.hosts= file", abs_srcdir, name); =20 virTestRunLog(ret, name_xml2xml, testCompareXMLToXMLFiles, info); =20 diff --git a/tests/qemuxmlconftest.c b/tests/qemuxmlconftest.c index 6f1f816cba..486d3d47ec 100644 --- a/tests/qemuxmlconftest.c +++ b/tests/qemuxmlconftest.c @@ -263,7 +263,7 @@ static virNWFilterDriver fakeNWFilterDriver =3D { /* name of the fake network shall be constructed as: * NETWORKXMLNAME;NETWORKPORTXMLNAME * where: - * NETWORKXMLNAME resolves to abs_srcdir/networkxml2xmlin/NETWORKXMLNAME.= xml + * NETWORKXMLNAME resolves to abs_srcdir/networkxmlconfdata/NETWORKXMLNAM= E.xml * NETWORKPORTXMLNAME resolves to abs_srcdir/virnetworkportxml2xmldata/NE= TWORKPORTXMLNAME.xml */ static virNetworkPtr @@ -286,7 +286,7 @@ fakeNetworkLookupByName(virConnectPtr conn, return NULL; } =20 - path =3D g_strdup_printf(abs_srcdir "/networkxml2xmlin/%s.xml", netnam= e); + path =3D g_strdup_printf(abs_srcdir "/networkxmlconfdata/%s.xml", netn= ame); =20 if (!virFileExists(path)) { virReportError(VIR_ERR_NO_NETWORK, "fake network '%s' not found", = path); @@ -307,7 +307,7 @@ fakeNetworkGetXMLDesc(virNetworkPtr network, =20 *(strchr(netname, ';')) =3D '\0'; =20 - path =3D g_strdup_printf(abs_srcdir "/networkxml2xmlin/%s.xml", netnam= e); + path =3D g_strdup_printf(abs_srcdir "/networkxmlconfdata/%s.xml", netn= ame); =20 if (virFileReadAll(path, 4 * 1024, &xml) < 0) return NULL; diff --git a/tests/virschematest.c b/tests/virschematest.c index 57a49c270c..4faac8d976 100644 --- a/tests/virschematest.c +++ b/tests/virschematest.c @@ -303,9 +303,7 @@ static const struct testSchemaEntry schemaInterface[] = =3D { =20 static const struct testSchemaEntry schemaNetwork[] =3D { { .dir =3D "src/network" }, - { .dir =3D "tests/networkxml2xmlin" }, - { .dir =3D "tests/networkxml2xmlout" }, - { .dir =3D "tests/networkxml2confdata" }, + { .dir =3D "tests/networkxmlconfdata" }, { .dir =3D "examples/xml/test/", .dirRegex =3D "testnet.*" }, { .dir =3D "tests/networkxml2xmlupdateout" }, --=20 2.52.0