qemu with hax to log dma reads & writes
jcs.org/2018/11/12/vfio
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
11import logging
12
13from avocado_qemu import Test
14
15class QueryCPUModelExpansion(Test):
16 """
17 Run query-cpu-model-expansion for each CPU model, and validate results
18 """
19
20 def test(self):
21 """
22 :avocado: tags=arch:x86_64
23 :avocado: tags=machine:none
24 """
25 self.vm.add_args('-S')
26 self.vm.launch()
27
28 cpus = self.vm.command('query-cpu-definitions')
29 for c in cpus:
30 print(repr(c))
31 self.assertNotIn('', c['unavailable-features'], c['name'])
32
33 for c in cpus:
34 model = {'name': c['name']}
35 e = self.vm.command('query-cpu-model-expansion', model=model, type='full')
36 self.assertEquals(e['model']['name'], c['name'])