From: Cole Robinson Date: Tue, 3 Nov 2009 21:42:02 +0000 (-0500) Subject: test: Update inactive guest config on shutdown X-Git-Tag: v0.7.3~107 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fbad2e04989b866fc5c7615de807546fc69884c;p=thirdparty%2Flibvirt.git test: Update inactive guest config on shutdown This matches the expected behavior of state drivers such as QEMU. --- diff --git a/src/test/test_driver.c b/src/test/test_driver.c index 35299d5b45..343834c924 100644 --- a/src/test/test_driver.c +++ b/src/test/test_driver.c @@ -473,6 +473,12 @@ static void testDomainShutdownState(virDomainPtr domain, virDomainObjPtr privdom) { + if (privdom->newDef) { + virDomainDefFree(privdom->def); + privdom->def = privdom->newDef; + privdom->newDef = NULL; + } + privdom->state = VIR_DOMAIN_SHUTOFF; privdom->def->id = -1; domain->id = -1;