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>
This commit is contained in:
parent
a9b4c6bb64
commit
d0c34326c8
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user