Skip to content

Commit 3e601fb

Browse files
ani-sinhafiglesia-xilinx
authored andcommitted
acpi/tests/avocado/bits: wait for 200 seconds for SHUTDOWN event from bits VM
By default, the timeout to receive any specified event from the QEMU VM is 60 seconds set by the python avocado test framework. Please see event_wait() and events_wait() in python/qemu/machine/machine.py. If the matching event is not triggered within that interval, an asyncio.TimeoutError is generated. Since the timeout for the bits avocado test is 200 secs, we need to make event_wait() timeout of the same value as well so that an early timeout is not triggered by the avocado framework. CC: peter.maydell@linaro.org Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2077 Signed-off-by: Ani Sinha <anisinha@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-id: 20240117042556.3360190-1-anisinha@redhat.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org> (cherry picked from commit 7ef4c41e91d59d72a3b8bc022a6cb3e81787a50a) Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
1 parent 47678ee commit 3e601fb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

tests/avocado/acpi-bits.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
deps = ["xorriso", "mformat"] # dependent tools needed in the test setup/box.
5555
supported_platforms = ['x86_64'] # supported test platforms.
5656

57+
# default timeout of 120 secs is sometimes not enough for bits test.
58+
BITS_TIMEOUT = 200
5759

5860
def which(tool):
5961
""" looks up the full path for @tool, returns None if not found
@@ -133,7 +135,7 @@ class AcpiBitsTest(QemuBaseTest): #pylint: disable=too-many-instance-attributes
133135
134136
"""
135137
# in slower systems the test can take as long as 3 minutes to complete.
136-
timeout = 200
138+
timeout = BITS_TIMEOUT
137139

138140
def __init__(self, *args, **kwargs):
139141
super().__init__(*args, **kwargs)
@@ -400,7 +402,8 @@ def test_acpi_smbios_bits(self):
400402

401403
# biosbits has been configured to run all the specified test suites
402404
# in batch mode and then automatically initiate a vm shutdown.
403-
# Rely on avocado's unit test timeout.
404-
self._vm.event_wait('SHUTDOWN')
405+
# Set timeout to BITS_TIMEOUT for SHUTDOWN event from bits VM at par
406+
# with the avocado test timeout.
407+
self._vm.event_wait('SHUTDOWN', timeout=BITS_TIMEOUT)
405408
self._vm.wait(timeout=None)
406409
self.parse_log()

0 commit comments

Comments
 (0)