mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 05:35:25 +00:00
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 <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
6866a324ab
commit
3b78d28974
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user