Update version for v6.1.0-rc0 release
[qemu.git] / tests / acceptance / cpu_queries.py
blobcc9e380cc7f6f24e335bdc792bf1125c162bec41
1 # Sanity check of query-cpu-* results
3 # Copyright (c) 2019 Red Hat, Inc.
5 # Author:
6 # Eduardo Habkost <ehabkost@redhat.com>
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.
11 from avocado_qemu import Test
13 class QueryCPUModelExpansion(Test):
14 """
15 Run query-cpu-model-expansion for each CPU model, and validate results
16 """
18 def test(self):
19 """
20 :avocado: tags=arch:x86_64
21 :avocado: tags=machine:none
22 """
23 self.vm.add_args('-S')
24 self.vm.launch()
26 cpus = self.vm.command('query-cpu-definitions')
27 for c in cpus:
28 self.log.info("Checking CPU: %s", c)
29 self.assertNotIn('', c['unavailable-features'], c['name'])
31 for c in cpus:
32 model = {'name': c['name']}
33 e = self.vm.command('query-cpu-model-expansion', model=model, type='full')
34 self.assertEquals(e['model']['name'], c['name'])