Some tests use the same VM state multiple times in a row. But if we
failed loading the VM XML, subsequent tests crash on the NULL def
pointer
Acked-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
if (test->vm) {
vm = test->vm;
+ if (!vm->def) {
+ VIR_TEST_VERBOSE("test skipped due to failure of dependent test\n");
+ goto cleanup;
+ }
} else {
if (qemuHotplugCreateObjects(driver.xmlopt, &vm, domain_xml,
test->deviceDeletedEvent) < 0)