Attaching to both live and config will soon be tested, so testQemuHotplugCheckResult will be used on both def and newDef. --- tests/qemuhotplugtest.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index a493200..c319ac1 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -175,7 +175,7 @@ testQemuHotplugUpdate(virDomainObjPtr vm, } static int -testQemuHotplugCheckResult(virDomainObjPtr vm, +testQemuHotplugCheckResult(virDomainDefPtr def, const char *expected, const char *expectedFile, bool fail) @@ -183,11 +183,11 @@ testQemuHotplugCheckResult(virDomainObjPtr vm, char *actual; int ret; - actual = virDomainDefFormat(vm->def, driver.caps, + actual = virDomainDefFormat(def, driver.caps, VIR_DOMAIN_DEF_FORMAT_SECURE); if (!actual) return -1; - vm->def->id = QEMU_HOTPLUG_TEST_DOMAIN_ID; + def->id = QEMU_HOTPLUG_TEST_DOMAIN_ID; if (STREQ(expected, actual)) { if (fail) @@ -299,14 +299,14 @@ testQemuHotplug(const void *data) VIR_FREE(dev); } if (ret == 0 || fail) - ret = testQemuHotplugCheckResult(vm, result_xml, + ret = testQemuHotplugCheckResult(vm->def, result_xml, result_filename, fail); break; case DETACH: ret = testQemuHotplugDetach(vm, dev); if (ret == 0 || fail) - ret = testQemuHotplugCheckResult(vm, domain_xml, + ret = testQemuHotplugCheckResult(vm->def, domain_xml, domain_filename, fail); break; -- 1.9.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list