diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2021-02-22 12:54:55 +0000 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2021-03-18 09:22:55 +0000 |
commit | 8af54b9172ff3b9bbdbb3191ed84994d275a0d81 (patch) | |
tree | c664dd47c9b01338d7266c2a71e7219702e66eb6 /tests | |
parent | cbde7be900d2a2279cbc4becb91d1ddd6a014def (diff) | |
download | qemu-8af54b9172ff3b9bbdbb3191ed84994d275a0d81.zip |
machine: remove 'query-cpus' QMP command
The newer 'query-cpus-fast' command avoids side effects on the guest
execution. Note that some of the field names are different in the
'query-cpus-fast' command.
Reviewed-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Tested-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/acceptance/pc_cpu_hotplug_props.py | 2 | ||||
-rw-r--r-- | tests/acceptance/x86_cpu_model_versions.py | 2 | ||||
-rw-r--r-- | tests/migration/guestperf/engine.py | 2 | ||||
-rw-r--r-- | tests/qtest/numa-test.c | 6 | ||||
-rw-r--r-- | tests/qtest/qmp-test.c | 6 | ||||
-rw-r--r-- | tests/qtest/test-x86-cpuid-compat.c | 4 |
6 files changed, 11 insertions, 11 deletions
diff --git a/tests/acceptance/pc_cpu_hotplug_props.py b/tests/acceptance/pc_cpu_hotplug_props.py index e49bf33fc5..f48f68fc6b 100644 --- a/tests/acceptance/pc_cpu_hotplug_props.py +++ b/tests/acceptance/pc_cpu_hotplug_props.py @@ -32,4 +32,4 @@ class OmittedCPUProps(Test): self.vm.add_args('-cpu', 'qemu64') self.vm.add_args('-device', 'qemu64-x86_64-cpu,socket-id=1,core-id=0,thread-id=0') self.vm.launch() - self.assertEquals(len(self.vm.command('query-cpus')), 2) + self.assertEquals(len(self.vm.command('query-cpus-fast')), 2) diff --git a/tests/acceptance/x86_cpu_model_versions.py b/tests/acceptance/x86_cpu_model_versions.py index 2b7461bb41..77ed8597a4 100644 --- a/tests/acceptance/x86_cpu_model_versions.py +++ b/tests/acceptance/x86_cpu_model_versions.py @@ -246,7 +246,7 @@ class CascadelakeArchCapabilities(avocado_qemu.Test): :avocado: tags=arch:x86_64 """ def get_cpu_prop(self, prop): - cpu_path = self.vm.command('query-cpus')[0].get('qom_path') + cpu_path = self.vm.command('query-cpus-fast')[0].get('qom-path') return self.vm.command('qom-get', path=cpu_path, property=prop) def test_4_1(self): diff --git a/tests/migration/guestperf/engine.py b/tests/migration/guestperf/engine.py index 5161e4ff81..5c965140f8 100644 --- a/tests/migration/guestperf/engine.py +++ b/tests/migration/guestperf/engine.py @@ -110,7 +110,7 @@ class Engine(object): src_vcpu_time = [] src_pid = src.get_pid() - vcpus = src.command("query-cpus") + vcpus = src.command("query-cpus-fast") src_threads = [] for vcpu in vcpus: src_threads.append(vcpu["thread_id"]) diff --git a/tests/qtest/numa-test.c b/tests/qtest/numa-test.c index b25ebf97d8..dc0ec571ca 100644 --- a/tests/qtest/numa-test.c +++ b/tests/qtest/numa-test.c @@ -72,7 +72,7 @@ static void test_mon_partial(const void *data) static QList *get_cpus(QTestState *qts, QDict **resp) { - *resp = qtest_qmp(qts, "{ 'execute': 'query-cpus' }"); + *resp = qtest_qmp(qts, "{ 'execute': 'query-cpus-fast' }"); g_assert(*resp); g_assert(qdict_haskey(*resp, "return")); return qdict_get_qlist(*resp, "return"); @@ -97,10 +97,10 @@ static void test_query_cpus(const void *data) int64_t cpu_idx, node; cpu = qobject_to(QDict, e); - g_assert(qdict_haskey(cpu, "CPU")); + g_assert(qdict_haskey(cpu, "cpu-index")); g_assert(qdict_haskey(cpu, "props")); - cpu_idx = qdict_get_int(cpu, "CPU"); + cpu_idx = qdict_get_int(cpu, "cpu-index"); props = qdict_get_qdict(cpu, "props"); g_assert(qdict_haskey(props, "node-id")); node = qdict_get_int(props, "node-id"); diff --git a/tests/qtest/qmp-test.c b/tests/qtest/qmp-test.c index 11614bf63f..cd27fae3de 100644 --- a/tests/qtest/qmp-test.c +++ b/tests/qtest/qmp-test.c @@ -252,7 +252,7 @@ static void test_qmp_oob(void) * Try any command that does not support OOB but with OOB flag. We * should get failure. */ - resp = qtest_qmp(qts, "{ 'exec-oob': 'query-cpus' }"); + resp = qtest_qmp(qts, "{ 'exec-oob': 'query-cpus-fast' }"); g_assert(qdict_haskey(resp, "error")); qobject_unref(resp); @@ -289,7 +289,7 @@ static void test_qmp_preconfig(void) g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-commands' }"))); /* forbidden commands, expected error */ - g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus' }"))); + g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus-fast' }"))); /* check that query-status returns preconfig state */ rsp = qtest_qmp(qs, "{ 'execute': 'query-status' }"); @@ -313,7 +313,7 @@ static void test_qmp_preconfig(void) g_assert(qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'x-exit-preconfig' }"))); /* enabled commands, no error expected */ - g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus' }"))); + g_assert(!qmp_rsp_is_err(qtest_qmp(qs, "{ 'execute': 'query-cpus-fast' }"))); qtest_quit(qs); } diff --git a/tests/qtest/test-x86-cpuid-compat.c b/tests/qtest/test-x86-cpuid-compat.c index 6470f0a85d..f28848e06e 100644 --- a/tests/qtest/test-x86-cpuid-compat.c +++ b/tests/qtest/test-x86-cpuid-compat.c @@ -13,12 +13,12 @@ static char *get_cpu0_qom_path(void) QDict *cpu0; char *path; - resp = qmp("{'execute': 'query-cpus', 'arguments': {}}"); + resp = qmp("{'execute': 'query-cpus-fast', 'arguments': {}}"); g_assert(qdict_haskey(resp, "return")); ret = qdict_get_qlist(resp, "return"); cpu0 = qobject_to(QDict, qlist_peek(ret)); - path = g_strdup(qdict_get_str(cpu0, "qom_path")); + path = g_strdup(qdict_get_str(cpu0, "qom-path")); qobject_unref(resp); return path; } |