All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] tests/avocado: configure acpi-bits to use avocado timeout
@ 2022-11-15 21:27 John Snow
  2022-11-15 22:47 ` Alex Bennée
  2022-11-16  3:24 ` Ani Sinha
  0 siblings, 2 replies; 14+ messages in thread
From: John Snow @ 2022-11-15 21:27 UTC (permalink / raw)
  To: qemu-devel
  Cc: Cleber Rosa, Wainer dos Santos Moschetta,
	Philippe Mathieu-Daudé, Ani Sinha, Beraldo Leal, John Snow

Instead of using a hardcoded timeout, just rely on Avocado's built-in
test case timeout. This helps avoid timeout issues on machines where 60
seconds is not sufficient.

Signed-off-by: John Snow <jsnow@redhat.com>
---
 tests/avocado/acpi-bits.py | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/tests/avocado/acpi-bits.py b/tests/avocado/acpi-bits.py
index 8745a58a766..ac13e22dc93 100644
--- a/tests/avocado/acpi-bits.py
+++ b/tests/avocado/acpi-bits.py
@@ -385,12 +385,6 @@ def test_acpi_smbios_bits(self):
         self._vm.launch()
         # biosbits has been configured to run all the specified test suites
         # in batch mode and then automatically initiate a vm shutdown.
-        # sleep for maximum of one minute
-        max_sleep_time = time.monotonic() + 60
-        while self._vm.is_running() and time.monotonic() < max_sleep_time:
-            time.sleep(1)
-
-        self.assertFalse(time.monotonic() > max_sleep_time,
-                         'The VM seems to have failed to shutdown in time')
-
+        # Rely on avocado's unit test timeout.
+        self._vm.wait(timeout=None)
         self.parse_log()
-- 
2.37.3



^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2022-11-18 16:20 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-15 21:27 [PATCH] tests/avocado: configure acpi-bits to use avocado timeout John Snow
2022-11-15 22:47 ` Alex Bennée
2022-11-15 22:52   ` John Snow
2022-11-16  4:06   ` Ani Sinha
2022-11-16  9:36     ` Alex Bennée
2022-11-16 12:32       ` Ani Sinha
2022-11-16 12:44         ` Ani Sinha
2022-11-16  3:24 ` Ani Sinha
2022-11-16 18:00   ` John Snow
2022-11-16 23:54     ` Ani Sinha
2022-11-17  7:39       ` Ani Sinha
2022-11-18  4:05   ` Ani Sinha
2022-11-18  8:03     ` Thomas Huth
2022-11-18 16:18       ` Ani Sinha

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.