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

qemu.tests.virtio_console: New interrupted loopback mode

Currently qemu dies when we try to remove and plug the port couple of
times without delay.

This modification allows to execute x (virtio_console_micro_repeates)
interuptions, where we don't check anything, only do them as fast as
possible. After that we execute normal loop where the transfer is
checked after each interruption.

As the port might not be openable for some time, the guest_worker
supports multiple attemps to open the port. Don't forget to remove
the old /tmp/virtio_console_guest.py* files in order to use the new one.
Signed-off-by: NLukáš Doktor <ldoktor@redhat.com>
上级 d45d387f
......@@ -93,10 +93,19 @@
virtio_console_buflen = 7
virtio_console_debug = normal
variants:
- micro:
# following test's interruptions takes so
# long that this variant would be similar
# to the short one
no suspend, hibernate
virtio_console_micro_repeats = 60
virtio_console_no_repeats = 1
virtio_console_test_time = 10
virtio_console_intr_time = 0
- short:
virtio_console_no_repeats = 60
virtio_console_test_time = 0.1
virtio_console_intr_time = 0
virtio_console_test_time = 1
virtio_console_intr_time = 0.5
- long:
virtio_console_no_repeats = 1
virtio_console_test_time = 30
......
......@@ -987,6 +987,15 @@ def run_virtio_console(test, params, env):
raise error.TestFail("Sender thread died before interruption.")
if not threads[0].isAlive():
raise error.TestFail("Receiver thread died before interruption.")
# 0s interruption without any measurements
if params.get('virtio_console_micro_repeats'):
error.context("Micro interruptions", logging.info)
threads[1].sendidx = acceptable_loss
for i in xrange(int(params.get('virtio_console_micro_repeats'))):
interruption()
error.context("Normal interruptions", logging.info)
try:
for i in xrange(no_repeats):
error.context("Interruption nr. %s" % i)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册