From: Michal Privoznik Date: Tue, 27 Jan 2026 20:25:41 +0000 (+0100) Subject: networkxml2conftest: Fail tests where no dnsmasq would be spawned X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d07d7a684295250de8cd47404e8f7dfe54e133df;p=thirdparty%2Flibvirt.git networkxml2conftest: Fail tests where no dnsmasq would be spawned 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án Tomko --- 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, virNetworkObjSetDef(obj, def); + if (!networkNeedsDnsmasq(def)) { + VIR_TEST_VERBOSE("spurious request to generate conf files. Would not start dnsmasq in real life scenario"); + goto fail; + } + dctx = dnsmasqContextNew(def->name, "/var/lib/libvirt/dnsmasq"); if (dctx == NULL)