提交 b5dee026 编写于 作者: L Lin Ma

qemu.tests.virtio_console: modify the index value in test_hotplug_virtio_pci

The old setting of 'idx' doesn't make sense because there are already couple of
virtio-serial-pci devices attaching to VM for virtio consoles. So hotplugging
a pci virtio-serial with the conflict device id causeing 'Duplicate ID' error.

The patch calculates the number of existed virtio console, Then assigns it to
the 'idx' to avoid the above error.
Signed-off-by: NLin Ma <lma@suse.com>
上级 9ac0940c
......@@ -1652,7 +1652,7 @@ def run(test, params, env):
pause = float(params.get("virtio_console_pause", 0.1))
vm = get_vm_with_ports()
monitor = vm.monitors[0]
idx = 1
idx = len(get_virtio_ports(vm)[0])
err = ""
booted = False
error.context("Hotplug while booting", logging.info)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册