提交 c5781e37 编写于 作者: J John Ferlan

test: Don't assume a configFile exists for Storage Pool tests

Fix a "bug" in the storage pool test driver code which "assumed"
testStoragePoolObjSetDefaults should fill in the configFile for
both the Define/Create (persistent) and CreateXML (transient) pools
by just VIR_FREE()'ing it during CreateXML.  Because the configFile
was filled in, during Destroy the pool wouldn't be free'd which
could cause issues for future patches which add tests to validate
vHBA creation for the storage pool using the same name.
上级 e3c37aa8
......@@ -4439,6 +4439,12 @@ testStoragePoolCreateXML(virConnectPtr conn,
pool = NULL;
goto cleanup;
}
/* *SetDefaults fills this in for the persistent pools, but this
* would be a transient pool so remove it; otherwise, the Destroy
* code will not Remove the pool */
VIR_FREE(pool->configFile);
pool->active = 1;
event = virStoragePoolEventLifecycleNew(pool->def->name, pool->def->uuid,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册