[PATCH 18/23] qemuxml2argvtest: Add parsing of the input XML as separate test

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

 



Get clean separation between the parsing and argv conversion so that
it's obvious in the test output:

2409) QEMU XML def parse s390-async-teardown.s390x-6.0.0                ... libvirt: QEMU Driver error : unsupported configuration: asynchronous teardown is not available with this QEMU binary
OK
2410) QEMU XML def -> ARGV s390-async-teardown.s390x-6.0.0              ... SKIP

Signed-off-by: Peter Krempa <pkrempa@xxxxxxxxxx>
---
 tests/qemuxml2argvtest.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 6552c7f9c2..d06bed32cb 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -903,6 +903,18 @@ testConfXMLEnumerate(GHashTable *existingTestCases)
 }


+static int
+testXMLParse(const void *data)
+{
+    testQemuInfo *info = (void *) data;
+    int rc = 0;
+
+    testQemuConfXMLCommon(info, &rc);
+
+    return rc;
+}
+
+
 static void
 testRun(const char *name,
         const char *suffix,
@@ -910,7 +922,8 @@ testRun(const char *name,
         struct testQemuConf *testConf,
         ...)
 {
-    g_autofree char *testname = g_strdup_printf("QEMU XML-2-ARGV %s%s", name, suffix);
+    g_autofree char *name_parse = g_strdup_printf("QEMU XML def parse %s%s", name, suffix);
+    g_autofree char *name_argv = g_strdup_printf("QEMU XML def -> ARGV %s%s", name, suffix);
     g_autoptr(testQemuInfo) info = g_new0(testQemuInfo, 1);
     va_list ap;

@@ -925,7 +938,8 @@ testRun(const char *name,
     info->outfile = g_strdup_printf("%s/qemuxml2argvdata/%s%s.args", abs_srcdir, info->name, suffix);
     info->errfile = g_strdup_printf("%s/qemuxml2argvdata/%s%s.err", abs_srcdir, info->name, suffix);

-    virTestRunLog(ret, testname, testCompareXMLToArgv, info);
+    virTestRunLog(ret, name_parse, testXMLParse, info);
+    virTestRunLog(ret, name_argv, testCompareXMLToArgv, info);

     /* clear overriden host cpu */
     if (info->args.capsHostCPUModel)
-- 
2.43.0
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[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