]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
qemumonitorjsontest: Allow use of deprecated 'query-cpus'
authorPeter Krempa <pkrempa@redhat.com>
Wed, 29 Apr 2020 17:57:28 +0000 (19:57 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 20 May 2020 06:53:30 +0000 (08:53 +0200)
The command was replaced with 'query-cpus-fast' which is always used
when detected by the capabilities so we can allow our test usage of
the deprecated command even if it will be removed from the schema.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tests/qemumonitorjsontest.c

index 7e0ab4609cdc3af8b777776c63b6c62972796df5..eaaabe9a47365d069af009ca24deb953c6e1409d 100644 (file)
@@ -1440,6 +1440,8 @@ testQemuMonitorJSONqemuMonitorJSONQueryCPUs(const void *opaque)
     if (!(test = qemuMonitorTestNewSchema(xmlopt, data->schema)))
         return -1;
 
+    qemuMonitorTestSkipDeprecatedValidation(test, true);
+
     if (qemuMonitorTestAddItem(test, "query-cpus",
                                "{"
                                "    \"return\": ["
@@ -2696,10 +2698,12 @@ testQemuMonitorCPUInfo(const void *opaque)
                                queryHotpluggableStr) < 0)
         goto cleanup;
 
-    if (data->fast)
+    if (data->fast) {
         queryCpusFunction = "query-cpus-fast";
-    else
+    } else {
         queryCpusFunction = "query-cpus";
+        qemuMonitorTestSkipDeprecatedValidation(test, true);
+    }
 
     if (qemuMonitorTestAddItem(test, queryCpusFunction, queryCpusStr) < 0)
         goto cleanup;