Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions qemu/tests/virtio_port_hotplug.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ def run(test, params, env):
"Unplug virtio port '%s' in %d tune(s)" % (port, repeat), test.log.info
)
vm.devices.simple_unplug(virtio_port, vm.monitor)
time.sleep(1)
if port_params.get("unplug_chardev") == "yes":
error_context.context(
"Unplug chardev '%s' for virtio port '%s'" % (port, chardev_qid),
Expand All @@ -87,6 +88,7 @@ def run(test, params, env):
time.sleep(0.5)
vm.devices.simple_hotplug(port_chardev, vm.monitor)
vm.devices.simple_hotplug(virtio_port, vm.monitor)
time.sleep(1)
if module and check_module:
error_context.context("Load module %s" % module, test.log.info)
session.cmd("modprobe %s" % module)
Expand All @@ -95,10 +97,10 @@ def run(test, params, env):
test_set = set(process.getoutput(check_pid_command).splitlines())
difference = test_set.difference(orig_set)
if difference:
test.log.info("Kill the first serial process on host")
result = process.system("kill -9 %s" % difference.pop(), shell=True)
test.log.info("Kill all serial processes on host")
result = process.system("kill -9 %s" % " ".join(difference), shell=True)
if result != 0:
test.log.error("Failed to kill the first serial process on host!")
test.log.error("Failed to kill all serial processes on host!")
if transfer_data(params, vm) is not True:
test.fail("Serial data transfter test failed.")
vm.reboot()
Expand Down