mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemuxml2argvtest: Add QAPI/QMP schema validation for -blockdev and -netdev
Our hotplug test cases are weak in comparison to the qemuxml2argvtest. Use all the the input data to also validate the arguments for -netdev and -blockdev against the appropriate commands of the QMP schema. Note that currently it's done just for the _CAPS versions of tests but commenting out a line in the test file allows to validate even cases which don't use real capabilities. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
@@ -770,6 +770,10 @@ testQemuInfoSetArgs(struct testQemuInfo *info,
|
||||
if (stripmachinealiases)
|
||||
virQEMUCapsStripMachineAliases(qemuCaps);
|
||||
info->flags |= FLAG_REAL_CAPS;
|
||||
|
||||
/* provide path to the replies file for schema testing */
|
||||
capsfile[strlen(capsfile) - 3] = '\0';
|
||||
info->schemafile = g_strdup_printf("%sreplies", capsfile);
|
||||
}
|
||||
|
||||
if (!qemuCaps) {
|
||||
@@ -796,5 +800,6 @@ testQemuInfoClear(struct testQemuInfo *info)
|
||||
{
|
||||
VIR_FREE(info->infile);
|
||||
VIR_FREE(info->outfile);
|
||||
VIR_FREE(info->schemafile);
|
||||
virObjectUnref(info->qemuCaps);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user