]> git.proxmox.com Git - mirror_qemu.git/blame - tests/avocado/cpu_queries.py
tests/avocado/machine_aspeed.py: Update buildroot images to 2023.11
[mirror_qemu.git] / tests / avocado / cpu_queries.py
CommitLineData
bb4928c7
EH
1# Sanity check of query-cpu-* results
2#
3# Copyright (c) 2019 Red Hat, Inc.
4#
5# Author:
6# Eduardo Habkost <ehabkost@redhat.com>
7#
8# This work is licensed under the terms of the GNU GPL, version 2 or
9# later. See the COPYING file in the top-level directory.
10
2283b627 11from avocado_qemu import QemuSystemTest
bb4928c7 12
2283b627 13class QueryCPUModelExpansion(QemuSystemTest):
bb4928c7
EH
14 """
15 Run query-cpu-model-expansion for each CPU model, and validate results
16 """
17
18 def test(self):
ab486ea9
DG
19 """
20 :avocado: tags=arch:x86_64
ba21bde9 21 :avocado: tags=machine:none
ab486ea9 22 """
bb4928c7
EH
23 self.vm.add_args('-S')
24 self.vm.launch()
25
684750ab 26 cpus = self.vm.cmd('query-cpu-definitions')
bb4928c7 27 for c in cpus:
c4e2d499 28 self.log.info("Checking CPU: %s", c)
bb4928c7
EH
29 self.assertNotIn('', c['unavailable-features'], c['name'])
30
31 for c in cpus:
32 model = {'name': c['name']}
684750ab
VSO
33 e = self.vm.cmd('query-cpu-model-expansion', model=model,
34 type='full')
861f724d 35 self.assertEqual(e['model']['name'], c['name'])