mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
qemuxml2argvtest: Fix type for faked chardev backing a TPM
The test filled the chardev type to VIR_DOMAIN_CHR_TYPE_FILE and thus set the 'data.emulator.source->data.file.path' pointer, but the commandline formatter is unconditionally expecting VIR_DOMAIN_CHR_TYPE_UNIX and thus reading 'data.emulator.source->data.nix.path'. Since it's an union it happened to land in the correct place. Fix the faked data. Signed-off-by: Peter Krempa <pkrempa@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
42b0000699
commit
2cb53c61cf
@ -450,9 +450,9 @@ testCompareXMLToArgvCreateArgs(virQEMUDriver *drv,
|
|||||||
if (vm->def->tpms[i]->type != VIR_DOMAIN_TPM_TYPE_EMULATOR)
|
if (vm->def->tpms[i]->type != VIR_DOMAIN_TPM_TYPE_EMULATOR)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
VIR_FREE(vm->def->tpms[i]->data.emulator.source->data.file.path);
|
VIR_FREE(vm->def->tpms[i]->data.emulator.source->data.nix.path);
|
||||||
vm->def->tpms[i]->data.emulator.source->data.file.path = g_strdup("/dev/test");
|
vm->def->tpms[i]->data.emulator.source->type = VIR_DOMAIN_CHR_TYPE_UNIX;
|
||||||
vm->def->tpms[i]->data.emulator.source->type = VIR_DOMAIN_CHR_TYPE_FILE;
|
vm->def->tpms[i]->data.emulator.source->data.nix.path = g_strdup("/dev/test");
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = 0; i < vm->def->nvideos; i++) {
|
for (i = 0; i < vm->def->nvideos; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user