Signed-off-by: Ilias Stamatis <stamatis.iliass(a)gmail.com>
---
src/test/test_driver.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 906c9d5365..ebf6f84b58 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -2291,6 +2291,30 @@ testDomainSaveImageDefineXML(virConnectPtr conn,
}
+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,
@@ -7114,6 +7138,7 @@ static virHypervisorDriver testHypervisorDriver = {
.domainRestore = testDomainRestore, /* 0.3.2 */
.domainRestoreFlags = testDomainRestoreFlags, /* 0.9.4 */
.domainSaveImageDefineXML = testDomainSaveImageDefineXML, /* 5.5.0 */
+ .domainSaveImageGetXMLDesc = testDomainSaveImageGetXMLDesc, /* 5.5.0 */
.domainCoreDump = testDomainCoreDump, /* 0.3.2 */
.domainCoreDumpWithFormat = testDomainCoreDumpWithFormat, /* 1.2.3 */
.domainSetVcpus = testDomainSetVcpus, /* 0.1.4 */
--
2.21.0