[libvirt] [PATCH v2] test_driver: Add testDomainDestroyFlags

Katerina Koukiou posted 1 patch 6 years ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20180322184227.15368-1-kkoukiou@redhat.com
Test syntax-check passed
src/test/test_driver.c | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
[libvirt] [PATCH v2] test_driver: Add testDomainDestroyFlags
Posted by Katerina Koukiou 6 years ago
Adding this for completeness

Signed-off-by: Katerina Koukiou <kkoukiou@redhat.com>
---
Needed by the libvirt-dbus which is using test_driver for tests.

 src/test/test_driver.c | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 4de0cc533..99c27cc0a 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -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 */
-- 
2.15.0

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v2] test_driver: Add testDomainDestroyFlags
Posted by Ján Tomko 6 years ago
On Thu, Mar 22, 2018 at 07:42:27PM +0100, Katerina Koukiou wrote:
>Adding this for completeness
>
>Signed-off-by: Katerina Koukiou <kkoukiou@redhat.com>
>---
>Needed by the libvirt-dbus which is using test_driver for tests.
>
> src/test/test_driver.c | 11 ++++++++++-
> 1 file changed, 10 insertions(+), 1 deletion(-)
>

ACK & pushed

Jan
--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list