[libvirt] PATCH: Fix save/restore for new KVM

Jim Meyering jim at meyering.net
Thu Jan 29 14:16:11 UTC 2009


"Daniel P. Berrange" <berrange at redhat.com> wrote:
> This is a repost of the patch from:
>
> http://www.redhat.com/archives/libvir-list/2009-January/msg00583.html
>
> updated to take account of the changes commited since I first posted it.

Thanks.

The fix looks right.
Glad you added those tests.
It's nice to have all of those constants documented, too.
ACK.

Since DO_TEST is now a trivial specialization of
the new DO_TEST_MIGRATE, you can simplify.
Plus, I added a "const".

>From f48aa04fe5cef250f7f505fecb3d101b87262481 Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering at redhat.com>
Date: Thu, 29 Jan 2009 14:39:43 +0100
Subject: [PATCH] DO_TEST: rewrite to use new DO_TEST_MIGRATE

---
 tests/qemuxml2argvtest.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index bbd04fc..0be9ac3 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -162,16 +162,11 @@ mymain(int argc, char **argv)
         return EXIT_FAILURE;

 #define DO_TEST(name, extraFlags)                                       \
-    do {                                                                \
-        struct testInfo info = { name, extraFlags, NULL };              \
-        if (virtTestRun("QEMU XML-2-ARGV " name,                        \
-                        1, testCompareXMLToArgvHelper, &info) < 0)      \
-            ret = -1;                                                   \
-    } while (0)
+    DO_TEST_MIGRATE(name, extraFlags, NULL)

 #define DO_TEST_MIGRATE(name, extraFlags, migrateFrom)                  \
     do {                                                                \
-        struct testInfo info = { name, extraFlags, migrateFrom };       \
+        const struct testInfo info = { name, extraFlags, migrateFrom }; \
         if (virtTestRun("QEMU XML-2-ARGV " name,                        \
                         1, testCompareXMLToArgvHelper, &info) < 0)      \
             ret = -1;                                                   \
--
1.6.1.1.423.gc2891




More information about the libvir-list mailing list