mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
qemuhotplugtest: Make the test more useful by validating used commands against QMP schema
qemuhotplugtest validates only that a given command is used but not the arguments of the command. With this patch we'll validate the arguments against the QMP schema thus we can catch possible issues with deprecated commands. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
706cd47487
commit
6eee2de99f
@ -57,6 +57,7 @@ struct qemuHotplugTestData {
|
||||
GHashTable *capsLatestFiles;
|
||||
GHashTable *capsCache;
|
||||
GHashTable *schemaCache;
|
||||
GHashTable *schema;
|
||||
};
|
||||
|
||||
static int
|
||||
@ -342,7 +343,7 @@ testQemuHotplug(const void *data)
|
||||
if (qemuHotplugCreateObjects(driver.xmlopt, &vm, domain_xml,
|
||||
test->arch, test->capsLatestFiles,
|
||||
test->capsCache, test->schemaCache,
|
||||
NULL) < 0)
|
||||
&test->schema) < 0)
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
@ -356,7 +357,7 @@ testQemuHotplug(const void *data)
|
||||
|
||||
/* Now is the best time to feed the spoofed monitor with predefined
|
||||
* replies. */
|
||||
if (!(test_mon = qemuMonitorTestNew(driver.xmlopt, vm, NULL, NULL)))
|
||||
if (!(test_mon = qemuMonitorTestNew(driver.xmlopt, vm, NULL, test->schema)))
|
||||
goto cleanup;
|
||||
|
||||
tmp = test->mon;
|
||||
|
Loading…
x
Reference in New Issue
Block a user