tests: Rename networkxml2xmltest to networkxmlconftest

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 <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Michal Privoznik
2026-01-29 13:39:23 +01:00
parent 8f5e0903d6
commit 240deda72c
187 changed files with 16 additions and 392 deletions
+1 -1
View File
@@ -1178,7 +1178,7 @@ networkDnsmasqConfContents(virNetworkObj *obj,
/* create dnsmasq config file appropriate for this network */
/* 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"
+1 -1
View File
@@ -408,7 +408,7 @@ endif
if conf.has('WITH_NETWORK')
tests += [
{ '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
@@ -1,22 +0,0 @@
<network>
<name>local</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
<forward dev='eth1' mode='route'/>
<bridge name='virbr1' stp='on' delay='0'/>
<mac address='12:34:56:78:9A:BC'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<host mac='00:16:3e:77:e2:ed' name='a.example.com' ip='192.168.122.10'/>
<host mac='00:16:3e:3e:a9:1a' name='b.example.com' ip='192.168.122.11'/>
</dhcp>
</ip>
<ip family='ipv6' address='2001:db8:ac10:fd01::1' prefix='64'>
<dhcp>
<host id='0:4:7e:7d:f0:7d:a8:bc:c5:d2:13:32:11:ed:16:ea:84:63' ip='2001:db8:ac10:fd01::1:20'/>
<host name='paul' ip='2001:db8:ac10:fd01::1:21'/>
<host id='0:3:0:1:0:16:3e:11:22:33' name='peter.xyz' ip='2001:db8:ac10:fd01::1:22'/>
<host id='0:3:0:1:0:16:3e:44:55:33' ip='2001:db8:ac10:fd01::1:23'/>
<host id='0:1:0:1:18:aa:62:fe:0:16:3e:44:55:66' name='badbob' ip='2001:db8:ac10:fd01::1:24'/>
</dhcp>
</ip>
</network>
@@ -1,11 +0,0 @@
<network>
<name>private</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
<bridge name='virbr2' stp='on' delay='0'/>
<mac address='52:54:00:17:3F:37'/>
<ip address='192.168.152.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.152.2' end='192.168.152.254'/>
</dhcp>
</ip>
</network>
@@ -1,15 +0,0 @@
<network>
<name>default</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9c</uuid>
<forward dev='eth0' mode='nat'/>
<bridge name='virbr0' stp='on' delay='0'/>
<dns>
<forwarder addr='8.8.8.8'/>
<forwarder addr='8.8.4.4'/>
<forwarder domain='example.com' addr='192.168.1.1'/>
<forwarder domain='example2.com' addr='192.168.2.1' port='1234'/>
<forwarder domain='www.example.com'/>
</dns>
<ip address='192.168.122.1' netmask='255.255.255.0'>
</ip>
</network>
@@ -1,15 +0,0 @@
<network>
<name>default</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9c</uuid>
<forward dev='eth0' mode='nat'/>
<bridge name='virbr0' stp='on' delay='0'/>
<domain name="example.com"/>
<dns forwardPlainNames='no'>
<host ip='192.168.122.1'>
<hostname>host</hostname>
<hostname>gateway</hostname>
</host>
</dns>
<ip address='192.168.122.1' netmask='255.255.255.0'>
</ip>
</network>
@@ -1,22 +0,0 @@
<network>
<name>default</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
<forward dev='eth1' mode='nat'/>
<bridge name='virbr0' stp='on' delay='0'/>
<mtu size='7000'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254'/>
<host mac='00:16:3e:77:e2:ed' name='a.example.com' ip='192.168.122.10'/>
<host mac='00:16:3e:3e:a9:1a' name='b.example.com' ip='192.168.122.11'/>
</dhcp>
</ip>
<ip family='ipv4' address='192.168.123.1' netmask='255.255.255.0'>
</ip>
<ip family='ipv6' address='2001:db8:ac10:fe01::1' prefix='64'>
</ip>
<ip family='ipv6' address='2001:db8:ac10:fd01::1' prefix='64'>
</ip>
<ip family='ipv4' address='10.24.10.1'>
</ip>
</network>
-21
View File
@@ -1,21 +0,0 @@
<network>
<name>default</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
<forward dev='eth1' mode='nat'/>
<bridge name='virbr0' stp='on' delay='0'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254'/>
<host mac='00:16:3e:77:e2:ed' name='a.example.com' ip='192.168.122.10'/>
<host mac='00:16:3e:3e:a9:1a' name='b.example.com' ip='192.168.122.11'/>
</dhcp>
</ip>
<ip family='ipv4' address='192.168.123.1' netmask='255.255.255.0'>
</ip>
<ip family='ipv6' address='2001:db8:ac10:fe01::1' prefix='64'>
</ip>
<ip family='ipv6' address='2001:db8:ac10:fd01::1' prefix='64'>
</ip>
<ip family='ipv4' address='10.24.10.1'>
</ip>
</network>
@@ -1,14 +0,0 @@
<network>
<name>netboot</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
<forward mode='nat'/>
<bridge name='virbr1' stp='off' delay='1'/>
<domain name='example.com'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254'/>
<bootp file='pxeboot.img'/>
</dhcp>
<tftp root='/var/lib/tftproot'/>
</ip>
</network>
@@ -1,13 +0,0 @@
<network>
<name>netboot</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
<forward mode='nat'/>
<bridge name='virbr1' stp='off' delay='1'/>
<domain name='example.com'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254'/>
<bootp file='pxeboot.img' server='10.20.30.40'/>
</dhcp>
</ip>
</network>
@@ -1,9 +0,0 @@
<network>
<name>open</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
<forward mode='open'/>
<bridge name='virbr1' stp='on' delay='0'/>
<mac address='12:34:56:78:9A:BC'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
</ip>
</network>
@@ -1,9 +0,0 @@
<network>
<name>local</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
<forward dev='eth1' mode='route'/>
<bridge name='virbr1' stp='on' delay='0'/>
<mac address='12:34:56:78:9A:BC'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
</ip>
</network>
@@ -1,27 +0,0 @@
<network>
<name>default</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
<forward dev='eth1' mode='nat'/>
<bridge name='virbr0' stp='on' delay='0'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<host mac='00:16:3e:77:e2:ed' name='a.example.com' ip='192.168.122.10'/>
<host mac='00:16:3e:3e:a9:1a' name='b.example.com' ip='192.168.122.11'/>
<range start='192.168.122.2' end='192.168.122.254'/>
</dhcp>
</ip>
<ip family='ipv4' address='192.168.123.1' netmask='255.255.255.0'>
</ip>
<ip family='ipv6' address='2001:db8:ac10:fd01::1' prefix='64'>
<dhcp>
<range start='2001:db8:ac10:fd01::1:10' end='2001:db8:ac10:fd01::1:ff'/>
<host id='0:4:7e:7d:f0:7d:a8:bc:c5:d2:13:32:11:ed:16:ea:84:63' ip='2001:db8:ac10:fd01::1:20'/>
<host name='paul' ip='2001:db8:ac10:fd01::1:21'/>
<host id='0:3:0:1:0:16:3e:11:22:33' name='peter.xyz' ip='2001:db8:ac10:fd01::1:22'/>
<host id='0:3:0:1:0:16:3e:44:55:33' ip='2001:db8:ac10:fd01::1:23'/>
<host id='0:1:0:1:18:aa:62:fe:0:16:3e:44:55:66' name='badbob' ip='2001:db8:ac10:fd01::1:24'/>
</dhcp>
</ip>
<ip family='ipv4' address='10.24.10.1'>
</ip>
</network>
-17
View File
@@ -1,17 +0,0 @@
<network>
<name>default</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
<forward dev='eth1' mode='nat'/>
<bridge name='virbr0' stp='on' delay='0'/>
<domain name='mynet'/>
<ip family='ipv6' address='2001:db8:ac10:fd01::1' prefix='64'>
<dhcp>
<range start='2001:db8:ac10:fd01::1:10' end='2001:db8:ac10:fd01::1:ff'/>
<host id='0:4:7e:7d:f0:7d:a8:bc:c5:d2:13:32:11:ed:16:ea:84:63' ip='2001:db8:ac10:fd01::1:20'/>
<host name='paul' ip='2001:db8:ac10:fd01::1:21'/>
<host id='0:3:0:1:0:16:3e:11:22:33' name='peter.xyz' ip='2001:db8:ac10:fd01::1:22'/>
<host id='0:3:0:1:0:16:3e:44:55:33' ip='2001:db8:ac10:fd01::1:23'/>
<host id='0:1:0:1:18:aa:62:fe:0:16:3e:44:55:66' name='badbob' ip='2001:db8:ac10:fd01::1:24'/>
</dhcp>
</ip>
</network>
@@ -1,15 +0,0 @@
<network xmlns:dnsmasq="http://libvirt.org/schemas/network/dnsmasq/1.0">
<name>default</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
<bridge name="virbr0"/>
<forward mode="nat" dev="eth1"/>
<ip address="192.168.122.1" netmask="255.255.255.0">
<dhcp>
<range start="192.168.122.2" end="192.168.122.254"/>
</dhcp>
</ip>
<dnsmasq:options>
<dnsmasq:option value="foo=bar"/>
<dnsmasq:option value="cname=*.cloudapps.example.com,master.example.com"/>
</dnsmasq:options>
</network>
@@ -1 +0,0 @@
../networkxml2confdata/leasetime-hours.xml
@@ -1 +0,0 @@
../networkxml2confdata/leasetime-infinite.xml
@@ -1 +0,0 @@
../networkxml2confdata/leasetime-minutes.xml
@@ -1 +0,0 @@
../networkxml2confdata/leasetime-seconds.xml
@@ -1,9 +0,0 @@
<network>
<name>default</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9c</uuid>
<forward dev='eth0' mode='nat'/>
<bridge name='virbr0' stp='on' delay='0' />
<dns forwardPlainNames='yes'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
</ip>
</network>
@@ -1,11 +0,0 @@
<network>
<name>default</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9c</uuid>
<forward mode='nat'/>
<bridge name='virbr0' stp='on' delay='0'/>
<dns>
<forwarder domain='example.com' addr='192.168.1.1'/>
</dns>
<ip address='192.168.122.1' netmask='255.255.255.0'>
</ip>
</network>
@@ -1,9 +0,0 @@
<network>
<name>default</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9c</uuid>
<forward dev='eth0' mode='nat'/>
<bridge name='virbr0' stp='on' delay='0' />
<domain name='example.com' localOnly='yes'/>
<ip address='192.168.122.1' netmask='255.255.255.0'>
</ip>
</network>
@@ -1,26 +0,0 @@
<network>
<name>default</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
<forward dev='eth1' mode='nat'>
<interface dev='eth1'/>
</forward>
<bridge name='virbr0' stp='on' delay='0'/>
<dns>
<srv service='name' protocol='tcp'/>
</dns>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254'/>
<host mac='00:16:3e:77:e2:ed' name='a.example.com' ip='192.168.122.10'/>
<host mac='00:16:3e:3e:a9:1a' name='b.example.com' ip='192.168.122.11'/>
</dhcp>
</ip>
<ip family='ipv4' address='192.168.123.1' netmask='255.255.255.0'>
</ip>
<ip family='ipv6' address='2001:db8:ac10:fe01::1' prefix='64'>
</ip>
<ip family='ipv6' address='fc00:db8:ac10:fd01::1' prefix='64'>
</ip>
<ip family='ipv4' address='10.24.10.1'>
</ip>
</network>
@@ -1,32 +0,0 @@
<network>
<name>default</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
<forward dev='eth1' mode='nat'>
<interface dev='eth1'/>
</forward>
<bridge name='virbr0' stp='on' delay='0'/>
<dns>
<srv service='name' protocol='tcp' domain='test-domain-name' target='.' port='1024' priority='10' weight='10'/>
<srv service='name2' protocol='udp' target='test2.example.com' port='2222' priority='22' weight='222'/>
<srv service='name3' protocol='tcp' domain='test3.com' target='test3.example.com' port='3333' priority='33'/>
<srv service='name4' protocol='tcp' domain='test4.com' target='test4.example.com' port='4444'/>
<srv service='name5' protocol='udp' target='test5.example.com' priority='55' weight='555'/>
<srv service='name6' protocol='tcp' domain='test6.com' target='test6.example.com' port='6666' weight='666'/>
<srv service='name7' protocol='tcp' domain='test7.com' target='test7.example.com' weight='777'/>
</dns>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254'/>
<host mac='00:16:3e:77:e2:ed' name='a.example.com' ip='192.168.122.10'/>
<host mac='00:16:3e:3e:a9:1a' name='b.example.com' ip='192.168.122.11'/>
</dhcp>
</ip>
<ip family='ipv4' address='192.168.123.1' netmask='255.255.255.0'>
</ip>
<ip family='ipv6' address='2001:db8:ac10:fe01::1' prefix='64'>
</ip>
<ip family='ipv6' address='2001:db8:ac10:fd01::1' prefix='64'>
</ip>
<ip family='ipv4' address='10.24.10.1'>
</ip>
</network>
@@ -1,24 +0,0 @@
<network>
<name>default</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
<forward dev='eth1' mode='nat'/>
<bridge name='virbr0' stp='on' delay='0'/>
<dns>
<txt name='example' value='example value'/>
</dns>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254'/>
<host mac='00:16:3e:77:e2:ed' name='a.example.com' ip='192.168.122.10'/>
<host mac='00:16:3e:3e:a9:1a' name='b.example.com' ip='192.168.122.11'/>
</dhcp>
</ip>
<ip family='ipv4' address='192.168.123.1' netmask='255.255.255.0'>
</ip>
<ip family='ipv6' address='2001:db8:ac10:fe01::1' prefix='64'>
</ip>
<ip family='ipv6' address='2001:db8:ac10:fd01::1' prefix='64'>
</ip>
<ip family='ipv4' address='10.24.10.1'>
</ip>
</network>
@@ -1,26 +0,0 @@
<network>
<name>default"with"quotes"</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
<forward dev='eth1' mode='nat'>
<interface dev='eth1'/>
</forward>
<bridge name='virbr0' stp='on' delay='0'/>
<dns>
<srv service='name' protocol='tcp'/>
</dns>
<ip address='192.168.122.1' netmask='255.255.255.0'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254'/>
<host mac='00:16:3e:77:e2:ed' name='a.example.com' ip='192.168.122.10'/>
<host mac='00:16:3e:3e:a9:1a' name='b.example.com' ip='192.168.122.11'/>
</dhcp>
</ip>
<ip family='ipv4' address='192.168.123.1' netmask='255.255.255.0'>
</ip>
<ip family='ipv6' address='fc00:db8:ac10:fe01::1' prefix='64'>
</ip>
<ip family='ipv6' address='fc00:db8:ac10:fd01::1' prefix='64'>
</ip>
<ip family='ipv4' address='10.24.10.1'>
</ip>
</network>
-1
View File
@@ -1 +0,0 @@
../networkxml2confdata/netboot-tftp.xml
@@ -1,21 +0,0 @@
<network>
<name>default</name>
<uuid>81ff0d90-c91e-6742-64da-4a736edb9a9b</uuid>
<forward dev='eth1' mode='nat'/>
<bridge name='virbr0' stp='on' delay='0'/>
<ip address='192.168.122.1' netmask='255.255.255.0' localPtr='yes'>
<dhcp>
<range start='192.168.122.2' end='192.168.122.254'/>
<host mac='00:16:3e:77:e2:ed' name='a.example.com' ip='192.168.122.10'/>
<host mac='00:16:3e:3e:a9:1a' name='b.example.com' ip='192.168.122.11'/>
</dhcp>
</ip>
<ip family='ipv4' address='192.168.123.1' netmask='255.255.255.0' localPtr='no'>
</ip>
<ip family='ipv6' address='2001:db8:ac10:fe01::1' prefix='64' localPtr='yes'>
</ip>
<ip family='ipv6' address='2001:db8:ac10:fd01::1' prefix='64'>
</ip>
<ip family='ipv4' address='10.24.10.1'>
</ip>
</network>
@@ -1 +0,0 @@
../networkxml2xmlin/leasetime-hours.xml
@@ -1 +0,0 @@
../networkxml2xmlin/leasetime-infinite.xml
@@ -1 +0,0 @@
../networkxml2xmlin/leasetime-minutes.xml
@@ -1 +0,0 @@
../networkxml2xmlin/leasetime-seconds.xml
-1
View File
@@ -1 +0,0 @@
../networkxml2confdata/netboot-tftp.xml
+1 -1
View File
@@ -76,7 +76,7 @@ testCompareXMLToXMLHelper(const void *data)
g_autofree char *updatexml = NULL;
g_autofree char *outxml = NULL;
netxml = g_strdup_printf("%s/networkxml2xmlin/%s.xml",
netxml = g_strdup_printf("%s/networkxmlconfdata/%s.xml",
abs_srcdir, info->netxml);
updatexml = g_strdup_printf("%s/networkxml2xmlupdatein/%s.xml",
abs_srcdir, info->updatexml);
+1
View File
@@ -0,0 +1 @@
leasetime-hours.xml
@@ -0,0 +1 @@
leasetime-infinite.xml
@@ -0,0 +1 @@
leasetime-minutes.xml
@@ -0,0 +1 @@
leasetime-seconds.xml

Some files were not shown because too many files have changed in this diff Show More