aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEmanuele Giuseppe Esposito <eesposit@redhat.com>2021-08-09 11:01:09 +0200
committerHanna Reitz <hreitz@redhat.com>2021-09-01 12:57:31 +0200
commitd0c34326c89a6b1b839c61e6cc24d5befef7d38d (patch)
treedb5699790d32d94d1ae9673a8922bb1da4fc1573 /tests
parenta9b4c6bb64b2908eb2d074fbe6d682ee7ff599e0 (diff)
qemu-iotests: extend QMP socket timeout when using valgrind
As with gdbserver, valgrind delays the test execution, so the default QMP socket timeout and the generic class Timeout in iotests.py timeouts too soon. Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-Id: <20210809090114.64834-12-eesposit@redhat.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/qemu-iotests/iotests.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index 6aa1dc48ba..26c580f9e7 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -488,13 +488,13 @@ class Timeout:
self.seconds = seconds
self.errmsg = errmsg
def __enter__(self):
- if qemu_gdb:
+ if qemu_gdb or qemu_valgrind:
return self
signal.signal(signal.SIGALRM, self.timeout)
signal.setitimer(signal.ITIMER_REAL, self.seconds)
return self
def __exit__(self, exc_type, value, traceback):
- if qemu_gdb:
+ if qemu_gdb or qemu_valgrind:
return False
signal.setitimer(signal.ITIMER_REAL, 0)
return False
@@ -590,7 +590,7 @@ class VM(qtest.QEMUQtestMachine):
def __init__(self, path_suffix=''):
name = "qemu%s-%d" % (path_suffix, os.getpid())
- timer = 15.0 if not qemu_gdb else None
+ timer = 15.0 if not (qemu_gdb or qemu_valgrind) else None
super().__init__(qemu_prog, qemu_opts, wrapper=qemu_gdb,
name=name,
base_temp_dir=test_dir,