From: "Michael S. Tsirkin" <mst@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Peter Maydell" <peter.maydell@linaro.org>,
"John Snow" <jsnow@redhat.com>, "Ani Sinha" <ani@anisinha.ca>,
"Cleber Rosa" <crosa@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Wainer dos Santos Moschetta" <wainersm@redhat.com>,
"Beraldo Leal" <bleal@redhat.com>
Subject: [PULL 6/8] tests/avocado: configure acpi-bits to use avocado timeout
Date: Tue, 22 Nov 2022 05:23:39 -0500 [thread overview]
Message-ID: <20221122102227.6603-7-mst@redhat.com> (raw)
In-Reply-To: <20221122102227.6603-1-mst@redhat.com>
From: John Snow <jsnow@redhat.com>
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>
Message-Id: <20221115212759.3095751-1-jsnow@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Ani Sinha <ani@anisinha.ca>
---
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 8745a58a76..ac13e22dc9 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()
--
MST
next prev parent reply other threads:[~2022-11-22 10:25 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-22 10:23 [PULL 0/8] pc,virtio: regression, test fixes Michael S. Tsirkin
2022-11-22 10:23 ` [PULL 1/8] vhost: mask VIRTIO_F_RING_RESET for vhost and vhost-user devices Michael S. Tsirkin
2022-11-22 10:23 ` [PULL 2/8] tests: acpi: whitelist DSDT before moving PRQx to _SB scope Michael S. Tsirkin
2022-11-22 10:23 ` [PULL 3/8] acpi: x86: move RPQx field back " Michael S. Tsirkin
2022-11-22 10:23 ` [PULL 4/8] tests: acpi: x86: update expected DSDT after moving PRQx fields in " Michael S. Tsirkin
2022-11-22 10:23 ` [PULL 5/8] MAINTAINERS: add mst to list of biosbits maintainers Michael S. Tsirkin
2022-11-22 10:23 ` Michael S. Tsirkin [this message]
2022-11-22 10:23 ` [PULL 7/8] acpi/tests/avocado/bits: keep the work directory when BITS_DEBUG is set in env Michael S. Tsirkin
2022-11-22 10:23 ` [PULL 8/8] virtio: disable error for out of spec queue-enable Michael S. Tsirkin
2022-11-22 17:09 ` [PULL 0/8] pc,virtio: regression, test fixes Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221122102227.6603-7-mst@redhat.com \
--to=mst@redhat.com \
--cc=ani@anisinha.ca \
--cc=bleal@redhat.com \
--cc=crosa@redhat.com \
--cc=jsnow@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=wainersm@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).