Re: [PATCH 2/3] change virDomainObjIsActive with virDomainObjCheckIsActive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 02/24/2017 01:03 AM, Sagar Ghuge wrote:
Signed-off-by: Sagar Ghuge <ghugesss@xxxxxxxxx>
---
 src/test/test_driver.c | 35 +++++++----------------------------
 1 file changed, 7 insertions(+), 28 deletions(-)

The commit summary here should be prefixed with 'test'. E.g.

test: Use virDomainObjCheckIsActive


diff --git a/src/test/test_driver.c b/src/test/test_driver.c
index 5fef3f1..bbcaa44 100644
--- a/src/test/test_driver.c
+++ b/src/test/test_driver.c
@@ -1769,11 +1769,8 @@ static int testDomainDestroy(virDomainPtr domain)
     if (!(privdom = testDomObjFromDomain(domain)))
         goto cleanup;

-    if (!virDomainObjIsActive(privdom)) {
-        virReportError(VIR_ERR_OPERATION_INVALID,
-                       "%s", _("domain is not running"));
+    if (virDomainObjCheckIsActive(privdom) < 0)

If you change virDomainObjCheckIsActive to return a bool, you'll need to change all of these to

    if (!virDomainObjCheckIsActive(privdom))

Otherwise looking good.

Regards,
Jim

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



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux