]> xenbits.xensource.com Git - libvirt.git/commitdiff
tests: qemumonitorjson: Do QMP schema validation for DO_TEST_GEN
authorPeter Krempa <pkrempa@redhat.com>
Thu, 12 Jul 2018 11:53:25 +0000 (13:53 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 13 Jul 2018 12:18:20 +0000 (14:18 +0200)
Test some more QMP commands against the schema.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
tests/qemumonitorjsontest.c

index 95b718ab3744930ef56b652aa419235bf82d4287..e9b26326551270e598089b090c90d1d33e999830 100644 (file)
@@ -1297,7 +1297,7 @@ testQemuMonitorJSON ## funcName(const void *opaque) \
 { \
     const testQemuMonitorJSONSimpleFuncData *data = opaque; \
     virDomainXMLOptionPtr xmlopt = data->xmlopt; \
-    qemuMonitorTestPtr test = qemuMonitorTestNewSimple(true, xmlopt); \
+    qemuMonitorTestPtr test = qemuMonitorTestNewSchema(xmlopt, data->schema); \
     const char *reply = data->reply; \
     int ret = -1; \
  \
@@ -2894,6 +2894,7 @@ mymain(void)
 
 #define DO_TEST_GEN(name, ...) \
     simpleFunc = (testQemuMonitorJSONSimpleFuncData) {.xmlopt = driver.xmlopt, \
+                                                      .schema = qapiData.schema \
                                                      __VA_ARGS__ }; \
     if (virTestRun(# name, testQemuMonitorJSON ## name, &simpleFunc) < 0) \
         ret = -1