From: Peter Krempa Date: Wed, 29 Apr 2020 16:27:00 +0000 (+0200) Subject: testQemuHotplugCpuPrepare: Allow unused monitor commands only on failure X-Git-Tag: v6.4.0-rc1~67 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3b78d28974a00513c869de71c6a153d4ca92612e;p=thirdparty%2Flibvirt.git testQemuHotplugCpuPrepare: Allow unused monitor commands only on failure Only tests expected to fail should allow unused commads as the normal tests will consume all of them. Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index cf87de187f..6f0bc98b43 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -409,6 +409,7 @@ testQemuHotplugCpuDataFree(struct testQemuHotplugCpuData *data) static struct testQemuHotplugCpuData * testQemuHotplugCpuPrepare(const char *test, bool modern, + bool fail, virHashTablePtr qmpschema) { qemuDomainObjPrivatePtr priv = NULL; @@ -453,7 +454,8 @@ testQemuHotplugCpuPrepare(const char *test, &driver, data->vm, qmpschema))) goto error; - qemuMonitorTestAllowUnusedCommands(data->mon); + if (fail) + qemuMonitorTestAllowUnusedCommands(data->mon); priv->mon = qemuMonitorTestGetMonitor(data->mon); virObjectUnlock(priv->mon); @@ -528,7 +530,7 @@ testQemuHotplugCpuGroup(const void *opaque) int rc; if (!(data = testQemuHotplugCpuPrepare(params->test, params->modern, - params->schema))) + params->fail, params->schema))) return -1; rc = qemuDomainSetVcpusInternal(&driver, data->vm, data->vm->def, @@ -565,7 +567,7 @@ testQemuHotplugCpuIndividual(const void *opaque) int rc; if (!(data = testQemuHotplugCpuPrepare(params->test, params->modern, - params->schema))) + params->fail, params->schema))) return -1; if (virBitmapParse(params->cpumap, &map, 128) < 0)