On 22.09.2015 08:27, Ján Tomko wrote: > On Mon, Sep 21, 2015 at 03:03:20PM +0200, Michal Privoznik wrote: >> On 15.09.2015 10:05, Ján Tomko wrote: >>> From: Pavel Fedin <p.fedin@xxxxxxxxxxx> >>> >>> Use the new API in order to correctly add capability sets to the cache >>> before parsing XML files >>> >>> Signed-off-by: Pavel Fedin <p.fedin@xxxxxxxxxxx> >> >> s/^/tests: / in $SUBJ. >> >>> --- >>> tests/qemuhotplugtest.c | 23 +++++++++++++++-------- >>> tests/qemuxml2argvtest.c | 6 ++++++ >>> tests/qemuxmlnstest.c | 6 ++++++ >>> 3 files changed, 27 insertions(+), 8 deletions(-) >>> >>> diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c >>> index 3cf7f36..109d820 100644 >>> --- a/tests/qemuhotplugtest.c >>> +++ b/tests/qemuhotplugtest.c >>> @@ -57,7 +57,7 @@ static int >>> qemuHotplugCreateObjects(virDomainXMLOptionPtr xmlopt, >>> virDomainObjPtr *vm, >>> const char *domxml, >>> - bool event) >>> + bool event, const char *testname) >>> { >>> int ret = -1; >>> qemuDomainObjPrivatePtr priv = NULL; >>> @@ -65,12 +65,6 @@ qemuHotplugCreateObjects(virDomainXMLOptionPtr xmlopt, >>> if (!(*vm = virDomainObjNew(xmlopt))) >>> goto cleanup; >>> >>> - if (!((*vm)->def = virDomainDefParseString(domxml, >>> - driver.caps, >>> - driver.xmlopt, >>> - VIR_DOMAIN_DEF_PARSE_INACTIVE))) >>> - goto cleanup; >>> - >>> priv = (*vm)->privateData; >>> >>> if (!(priv->qemuCaps = virQEMUCapsNew())) >>> @@ -85,6 +79,18 @@ qemuHotplugCreateObjects(virDomainXMLOptionPtr xmlopt, >>> if (event) >>> virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_DEL_EVENT); >>> >>> + qemuTestCapsName = testname; >>> + ret = qemuTestCapsCacheInsert(driver.qemuCapsCache, testname, >>> + priv->qemuCaps); >> >> >> I think that @qemuTestCapsName should be set in >> qemuTestCapsCacheInsert(). On its successful return. >> > > It makes sense since we always overwrite it. > > Anything else? > No, I think if you fix this locally, you're good to push it. ACK with my suggestion worked in. Michal -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list