提交 941ed7ed 编写于 作者: L Lukáš Doktor 提交者: Lucas Meneghel Rodrigues

qemu.tests.virtio_console: Fix sigio test crashes

When guest script is already running and the test only connects, every
signal destroys the daemon. This is complex problem of python, where
only the main thread accepts the signals. In order to fix this without
much pain I added test_delete_guest_script() at the test beginning thus
fresh instance of guest script is always executed. This solution seems
to work pretty well.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 e0bc5fa6
......@@ -299,10 +299,15 @@ def run_virtio_console(test, params, env):
@error.context_aware
def test_sigio():
"""
Test whether port use generates sigio signals correctly.
Test whether virtio port generates sigio signals correctly.
@param cfg: virtio_console_params - which type of virtio port to test
@param cfg: virtio_port_spread - how many devices per virt pci (0=all)
"""
# When the GW is already running and the thread only connects,
# every signal destroys the daemon. Fresh start solves the problem.
error.context("Reloading the GuestWorker before sigio test.",
logging.info)
test_delete_guest_script()
(vm, guest_worker, port) = get_vm_with_single_port(
params.get('virtio_console_params'))
if port.is_open():
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册