From: Peter Krempa Date: Wed, 29 Apr 2020 17:57:28 +0000 (+0200) Subject: qemumonitorjsontest: Allow use of deprecated 'query-cpus' X-Git-Tag: v6.4.0-rc1~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bad0d913a6a86fc233012d1daa3e08b68b19658;p=thirdparty%2Flibvirt.git qemumonitorjsontest: Allow use of deprecated 'query-cpus' 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 Reviewed-by: Ján Tomko --- diff --git a/tests/qemumonitorjsontest.c b/tests/qemumonitorjsontest.c index 7e0ab4609c..eaaabe9a47 100644 --- a/tests/qemumonitorjsontest.c +++ b/tests/qemumonitorjsontest.c @@ -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;