From: Ján Tomko Date: Tue, 16 Dec 2014 07:46:44 +0000 (+0100) Subject: Mark the domain as active in qemuhotplugtest X-Git-Tag: v1.2.12-rc1~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5e5996b91129130863be8b5608d47d0ef01e326;p=thirdparty%2Flibvirt.git Mark the domain as active in qemuhotplugtest This will allow us to call qemuDomainObjIsActive() in the tested functions to check if the domain has crashed. --- diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 8bdd37f56b..1c18dbbc44 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -40,6 +40,8 @@ enum { UPDATE }; +#define QEMU_HOTPLUG_TEST_DOMAIN_ID 7 + struct qemuHotplugTestData { const char *domain_filename; const char *device_filename; @@ -90,6 +92,8 @@ qemuHotplugCreateObjects(virDomainXMLOptionPtr xmlopt, if (qemuAssignDeviceAliases((*vm)->def, priv->qemuCaps) < 0) goto cleanup; + (*vm)->def->id = QEMU_HOTPLUG_TEST_DOMAIN_ID; + ret = 0; cleanup: return ret; @@ -177,9 +181,11 @@ testQemuHotplugCheckResult(virDomainObjPtr vm, char *actual; int ret; + vm->def->id = -1; actual = virDomainDefFormat(vm->def, VIR_DOMAIN_DEF_FORMAT_SECURE); if (!actual) return -1; + vm->def->id = QEMU_HOTPLUG_TEST_DOMAIN_ID; if (STREQ(expected, actual)) { if (fail && virTestGetVerbose())