Skip to contentSkip to conversation

acpi/tests/avocado/bits: wait for 200 seconds for SHUTDOWN event from bits VM

PATCH Superseded Ani Sinha 1 participant 1 message Jan 16, 2024

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Ani Sinha

author
#0 lore raw

PATCH 1/1 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 default timeout for the bits avocado test is 200 secs, we need to make event_wait() timeout the same value as well so that an early timeout is not triggered by the avocado framework.

CC: [email protected]
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2077

---
 tests/avocado/acpi-bits.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
tests/avocado/acpi-bits.py +3 -3
index 68b9e98d4e..870cd2e36c 100644
@@ -53,7 +53,7 @@
 
 deps = ["xorriso", "mformat"] # dependent tools needed in the test setup/box.
 supported_platforms = ['x86_64'] # supported test platforms.
-
+BITS_TIMEOUT = 200
 
 def which(tool):
     """ looks up the full path for @tool, returns None if not found
@@ -133,7 +133,7 @@ class AcpiBitsTest(QemuBaseTest): #pylint: disable=too-many-instance-attributes
 
     """
     # in slower systems the test can take as long as 3 minutes to complete.
-    timeout = 200
+    timeout = BITS_TIMEOUT
 
     def __init__(self, *args, **kwargs):
         super().__init__(*args, **kwargs)
@@ -401,6 +401,6 @@ def test_acpi_smbios_bits(self):
         # biosbits has been configured to run all the specified test suites
         # in batch mode and then automatically initiate a vm shutdown.
         # Rely on avocado's unit test timeout.
-        self._vm.event_wait('SHUTDOWN')
+        self._vm.event_wait('SHUTDOWN', timeout=BITS_TIMEOUT)
         self._vm.wait(timeout=None)
         self.parse_log()
Signature · 1 line
2.39.2