On Thu, Jul 12, 2018 at 09:37:47 +0200, Michal Privoznik wrote:
So far we are setting only fake secret and storage drivers.
Therefore if the code wants to call a public NWFilter API (like
qemuBuildInterfaceCommandLine() and qemuBuildNetCommandLine() are
doing) the virGetConnectNWFilter() function will try to actually
spawn session daemon because there's no connection object set to
handle NWFilter driver.
Even though I haven't experienced the same problem with the rest
of the drivers (interface, network and node dev), the reasoning
above can be applied to them as well.
At the same time, now that connection object is registered for
the drivers, the public APIs will throw
virReportUnsupportedError(). And since we don't provide any error
func the error is printed to stderr. Fix this by setting dummy
error func.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tests/qemuxml2argvtest.c | 6 ++++++
1 file changed, 6 insertions(+)
[...]
@@ -652,6 +656,8 @@ mymain(void)
return EXIT_FAILURE;
}
+ virTestQuiesceLibvirtErrors(true);
+
NACK, this suppresses legitimate errors in the testsuite.
I've mangled one of the XML files and ran the qemuxml2argvtest with
VIR_TEST_DEBUG=1 and got:
249) QEMU XML-2-startup-XML disk-drive-cache-directsync ... SKIP
250) QEMU XML-2-ARGV disk-drive-cache-unsafe ... FAILED
251) QEMU XML-2-startup-XML disk-drive-cache-unsafe ... SKIP
Without this patch I'd get:
249) QEMU XML-2-startup-XML disk-drive-cache-directsync ... SKIP
250) QEMU XML-2-ARGV disk-drive-cache-unsafe ... libvirt: Domain
Config error : unsupported configuration: unknown disk cache mode 'unafe'
FAILED
251) QEMU XML-2-startup-XML disk-drive-cache-unsafe ... SKIP
if (qemuTestDriverInit(&driver) < 0)
return EXIT_FAILURE;
--
2.16.4
--
libvir-list mailing list
libvir-list(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list