]> git.ipfire.org Git - thirdparty/libvirt.git/commit
test: wire up networkValidateTests()
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 27 Jan 2026 21:08:18 +0000 (22:08 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 29 Jan 2026 12:38:45 +0000 (13:38 +0100)
commitecb2e06bdf85ea174c32f89a996aad9a344dd3ad
treee1e3cd37992a1e515b43405e4ac128ce3952ea6a
parent4b98a649b3e96252fc460e4ea739ed0eef1c0cbd
test: wire up networkValidateTests()

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 <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
27 files changed:
tests/networkxml2confdata/leasetime-hours.xml
tests/networkxml2confdata/leasetime-infinite.xml
tests/networkxml2confdata/leasetime-minutes.xml
tests/networkxml2confdata/leasetime-seconds.xml
tests/networkxml2confdata/netboot-tftp.xml
tests/networkxml2conftest.c
tests/networkxml2firewalltest.c
tests/networkxml2xmlout/dnsmasq-options.xml
tests/networkxml2xmlout/nat-network-dns-forward-plain.xml
tests/networkxml2xmlout/nat-network-dns-forwarder-no-resolv.xml
tests/networkxml2xmlout/nat-network-dns-forwarders.xml
tests/networkxml2xmlout/nat-network-dns-hosts.xml
tests/networkxml2xmlout/nat-network-dns-srv-record-minimal.xml
tests/networkxml2xmlout/nat-network-dns-srv-record.xml
tests/networkxml2xmlout/nat-network-dns-srv-records.xml
tests/networkxml2xmlout/nat-network-dns-txt-record.xml
tests/networkxml2xmlout/nat-network-explicit-flood.xml
tests/networkxml2xmlout/nat-network-forward-nat-address.xml
tests/networkxml2xmlout/nat-network-forward-nat-ipv6.xml
tests/networkxml2xmlout/nat-network-forward-nat-no-address.xml
tests/networkxml2xmlout/nat-network-mtu.xml
tests/networkxml2xmlout/nat-network.xml
tests/networkxml2xmlout/netboot-network.xml
tests/networkxml2xmlout/netboot-proxy-network.xml
tests/networkxml2xmlout/passthrough-address-crash.xml [deleted file]
tests/networkxml2xmlout/passthrough-pf.xml [deleted file]
tests/networkxml2xmltest.c