]> xenbits.xensource.com Git - libvirt.git/commitdiff
test_driver: Add testDomainDestroyFlags
authorKaterina Koukiou <kkoukiou@redhat.com>
Thu, 22 Mar 2018 18:42:27 +0000 (19:42 +0100)
committerJán Tomko <jtomko@redhat.com>
Thu, 22 Mar 2018 20:48:13 +0000 (21:48 +0100)
Adding this for completeness

Signed-off-by: Katerina Koukiou <kkoukiou@redhat.com>
src/test/test_driver.c

index 4de0cc5333b06543054dbeb8541afc7bb709b3ca..99c27cc0a05c49ea95cdf8869f667b661acfa262 100644 (file)
@@ -1782,13 +1782,16 @@ static int testConnectListDomains(virConnectPtr conn,
                                         NULL, NULL);
 }
 
-static int testDomainDestroy(virDomainPtr domain)
+static int testDomainDestroyFlags(virDomainPtr domain,
+                                  unsigned int flags)
 {
     testDriverPtr privconn = domain->conn->privateData;
     virDomainObjPtr privdom;
     virObjectEventPtr event = NULL;
     int ret = -1;
 
+    virCheckFlags(VIR_DOMAIN_DESTROY_GRACEFUL, -1);
+
     if (!(privdom = testDomObjFromDomain(domain)))
         goto cleanup;
 
@@ -1813,6 +1816,11 @@ static int testDomainDestroy(virDomainPtr domain)
     return ret;
 }
 
+static int testDomainDestroy(virDomainPtr domain)
+{
+    return testDomainDestroyFlags(domain, 0);
+}
+
 static int testDomainResume(virDomainPtr domain)
 {
     testDriverPtr privconn = domain->conn->privateData;
@@ -6872,6 +6880,7 @@ static virHypervisorDriver testHypervisorDriver = {
     .domainShutdownFlags = testDomainShutdownFlags, /* 0.9.10 */
     .domainReboot = testDomainReboot, /* 0.1.1 */
     .domainDestroy = testDomainDestroy, /* 0.1.1 */
+    .domainDestroyFlags = testDomainDestroyFlags, /* 4.2.0 */
     .domainGetOSType = testDomainGetOSType, /* 0.1.9 */
     .domainGetMaxMemory = testDomainGetMaxMemory, /* 0.1.4 */
     .domainSetMaxMemory = testDomainSetMaxMemory, /* 0.1.1 */