tests/acceptance/virtio_check_params: Improve exception logging

Message-Id: <20200129212345.20547-18-philmd@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
This commit is contained in:
Philippe Mathieu-Daudé 2020-01-29 22:23:33 +01:00
parent 47d4c6e696
commit 0400937be1

View File

@ -77,8 +77,12 @@ class VirtioMaxSegSettingsCheck(Test):
vm.set_machine(mt["name"])
for s in VM_DEV_PARAMS[dev_type_name]:
vm.add_args(s)
vm.launch()
query_ok, props, error = self.query_virtqueue(vm, dev_type_name)
try:
vm.launch()
query_ok, props, error = self.query_virtqueue(vm, dev_type_name)
except:
query_ok = False
error = sys.exc_info()[0]
if not query_ok:
self.fail('machine type {0}: {1}'.format(mt['name'], error))