On Thu, Mar 07, 2019 at 16:44:34 +0100, Andrea Bolognani wrote:
This removes the awkard escaping and will allow us to perform
some interesting refactoring later on.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
tests/qemucapabilitiestest.c | 40 +++++++++++++++++++++++++-----------
tests/qemucaps2xmltest.c | 28 ++++++++++++++++++-------
2 files changed, 49 insertions(+), 19 deletions(-)
diff --git a/tests/qemucapabilitiestest.c b/tests/qemucapabilitiestest.c
index 222ac05d79..b4ed081d3e 100644
--- a/tests/qemucapabilitiestest.c
+++ b/tests/qemucapabilitiestest.c
@@ -176,6 +176,32 @@ testQemuCapsCopy(const void *opaque)
}
+static int
+doCapsTest(const char *base,
+ const char *archName,
+ testQemuDataPtr data)
+{
+ VIR_AUTOFREE(char *) title = NULL;
+ VIR_AUTOFREE(char *) copyTitle = NULL;
+
+ if (virAsprintf(&title, "%s (%s)", base, archName) < 0 ||
+ virAsprintf(©Title, "copy %s (%s)", base, archName) < 0) {
+ return -1;
+ }
Single line body.
+
+ data->base = base;
+ data->archName = archName;
+
+ if (virTestRun(title, testQemuCaps, data) < 0)
+ data->ret = -1;
+
+ if (virTestRun(copyTitle, testQemuCapsCopy, data) < 0)
+ data->ret = -1;
+
+ return 0;
+}
ACK