Signed-off-by: Ilias Stamatis <stamatis.iliass(a)gmail.com>
---
src/test/test_driver.c | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index b0195ac63d..719e956d99 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -2255,6 +2255,29 @@ testDomainSaveImageDefineXML(virConnectPtr conn,
return ret;
}
+static char *
+testDomainSaveImageGetXMLDesc(virConnectPtr conn,
+ const char *path,
+ unsigned int flags)
+{
+ int fd = -1;
+ char *ret = NULL;
+ virDomainDefPtr def = NULL;
+ testDriverPtr privconn = conn->privateData;
+
+ virCheckFlags(VIR_DOMAIN_SAVE_IMAGE_XML_SECURE, NULL);
+
+ if ((fd = testDomainSaveImageOpen(privconn, path, &def)) < 0)
+ goto cleanup;
+
+ ret = virDomainDefFormat(def, privconn->caps, VIR_DOMAIN_DEF_FORMAT_SECURE);
+
+ cleanup:
+ virDomainDefFree(def);
+ VIR_FORCE_CLOSE(fd);
+ return ret;
+}
+
static int testDomainCoreDumpWithFormat(virDomainPtr domain,
const char *to,
unsigned int dumpformat,
@@ -7038,6 +7061,7 @@ static virHypervisorDriver testHypervisorDriver = {
.domainRestore = testDomainRestore, /* 0.3.2 */
.domainRestoreFlags = testDomainRestoreFlags, /* 0.9.4 */
.domainSaveImageDefineXML = testDomainSaveImageDefineXML, /* 5.4.0 */
+ .domainSaveImageGetXMLDesc = testDomainSaveImageGetXMLDesc, /* 5.4.0 */
.domainCoreDump = testDomainCoreDump, /* 0.3.2 */
.domainCoreDumpWithFormat = testDomainCoreDumpWithFormat, /* 1.2.3 */
.domainSetVcpus = testDomainSetVcpus, /* 0.1.4 */
--
2.21.0