提交 e435f66b 编写于 作者: P Philippe Mathieu-Daudé

tests/acceptance/virtio_check_params: List machine being tested

Add logging for easier debugging of failures:

  $ avocado --show=machine run tests/acceptance/virtio_check_params.py
   (1/1) tests/acceptance/virtio_check_params.py:VirtioMaxSegSettingsCheck.test_machine_types:
  machine: {'name': 'pc-i440fx-2.12', 'seg_max_adjust': 'false', 'device': 'virtio-scsi-pci'}
  machine: {'name': 'pc-i440fx-2.0', 'seg_max_adjust': 'false', 'device': 'virtio-scsi-pci'}
  machine: {'name': 'pc-q35-4.2', 'seg_max_adjust': 'false', 'device': 'virtio-scsi-pci'}
  machine: {'name': 'pc-i440fx-2.5', 'seg_max_adjust': 'false', 'device': 'virtio-scsi-pci'}
  machine: {'name': 'pc-i440fx-4.2', 'seg_max_adjust': 'false', 'device': 'virtio-scsi-pci'}
  ...
Reviewed-by: NCornelia Huck <cohuck@redhat.com>
Message-Id: <20200129212345.20547-19-philmd@redhat.com>
Signed-off-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
上级 0400937b
......@@ -21,6 +21,7 @@
import sys
import os
import re
import logging
sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'python'))
from qemu.machine import QEMUMachine
......@@ -73,6 +74,9 @@ class VirtioMaxSegSettingsCheck(Test):
return query_ok, props, error
def check_mt(self, mt, dev_type_name):
mt['device'] = dev_type_name # Only for the debug() call.
logger = logging.getLogger('machine')
logger.debug(mt)
with QEMUMachine(self.qemu_bin) as vm:
vm.set_machine(mt["name"])
for s in VM_DEV_PARAMS[dev_type_name]:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册