提交 3b78d289 编写于 作者: P Peter Krempa

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: NPeter Krempa <pkrempa@redhat.com>
Reviewed-by: NJán Tomko <jtomko@redhat.com>
上级 6866a324
...@@ -409,6 +409,7 @@ testQemuHotplugCpuDataFree(struct testQemuHotplugCpuData *data) ...@@ -409,6 +409,7 @@ testQemuHotplugCpuDataFree(struct testQemuHotplugCpuData *data)
static struct testQemuHotplugCpuData * static struct testQemuHotplugCpuData *
testQemuHotplugCpuPrepare(const char *test, testQemuHotplugCpuPrepare(const char *test,
bool modern, bool modern,
bool fail,
virHashTablePtr qmpschema) virHashTablePtr qmpschema)
{ {
qemuDomainObjPrivatePtr priv = NULL; qemuDomainObjPrivatePtr priv = NULL;
...@@ -453,7 +454,8 @@ testQemuHotplugCpuPrepare(const char *test, ...@@ -453,7 +454,8 @@ testQemuHotplugCpuPrepare(const char *test,
&driver, data->vm, qmpschema))) &driver, data->vm, qmpschema)))
goto error; goto error;
qemuMonitorTestAllowUnusedCommands(data->mon); if (fail)
qemuMonitorTestAllowUnusedCommands(data->mon);
priv->mon = qemuMonitorTestGetMonitor(data->mon); priv->mon = qemuMonitorTestGetMonitor(data->mon);
virObjectUnlock(priv->mon); virObjectUnlock(priv->mon);
...@@ -528,7 +530,7 @@ testQemuHotplugCpuGroup(const void *opaque) ...@@ -528,7 +530,7 @@ testQemuHotplugCpuGroup(const void *opaque)
int rc; int rc;
if (!(data = testQemuHotplugCpuPrepare(params->test, params->modern, if (!(data = testQemuHotplugCpuPrepare(params->test, params->modern,
params->schema))) params->fail, params->schema)))
return -1; return -1;
rc = qemuDomainSetVcpusInternal(&driver, data->vm, data->vm->def, rc = qemuDomainSetVcpusInternal(&driver, data->vm, data->vm->def,
...@@ -565,7 +567,7 @@ testQemuHotplugCpuIndividual(const void *opaque) ...@@ -565,7 +567,7 @@ testQemuHotplugCpuIndividual(const void *opaque)
int rc; int rc;
if (!(data = testQemuHotplugCpuPrepare(params->test, params->modern, if (!(data = testQemuHotplugCpuPrepare(params->test, params->modern,
params->schema))) params->fail, params->schema)))
return -1; return -1;
if (virBitmapParse(params->cpumap, &map, 128) < 0) if (virBitmapParse(params->cpumap, &map, 128) < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册