[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v3 16/29] tests/qtest: remove clock_steps from virtio tests
From: |
Alex Bennée |
Subject: |
[PATCH v3 16/29] tests/qtest: remove clock_steps from virtio tests |
Date: |
Tue, 7 Jan 2025 16:51:54 +0000 |
In the qtest environment time will not step forward if the system is
paused (timers disabled) or we have no timer events to fire. As a
result VirtIO events are responded to directly and we don't need to
step time forward.
We still do timeout processing to handle the fact the target QEMU may
not be ready to respond right away. This will usually be due to a slow
CI system or if QEMU is running under something like rr.
Future qtest patches will assert that time actually changes when a
step is requested.
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
v2
- s/with/when/
- drop clock_step entirely
---
tests/qtest/libqos/virtio.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/tests/qtest/libqos/virtio.c b/tests/qtest/libqos/virtio.c
index a21b6eee9c..2e7979652f 100644
--- a/tests/qtest/libqos/virtio.c
+++ b/tests/qtest/libqos/virtio.c
@@ -170,7 +170,6 @@ void qvirtio_wait_queue_isr(QTestState *qts, QVirtioDevice
*d,
gint64 start_time = g_get_monotonic_time();
for (;;) {
- qtest_clock_step(qts, 100);
if (d->bus->get_queue_isr_status(d, vq)) {
return;
}
@@ -192,7 +191,6 @@ uint8_t qvirtio_wait_status_byte_no_isr(QTestState *qts,
QVirtioDevice *d,
uint8_t val;
while ((val = qtest_readb(qts, addr)) == 0xff) {
- qtest_clock_step(qts, 100);
g_assert(!d->bus->get_queue_isr_status(d, vq));
g_assert(g_get_monotonic_time() - start_time <= timeout_us);
}
@@ -219,14 +217,12 @@ void qvirtio_wait_used_elem(QTestState *qts,
QVirtioDevice *d,
for (;;) {
uint32_t got_desc_idx;
- qtest_clock_step(qts, 100);
if (d->bus->get_queue_isr_status(d, vq) &&
qvirtqueue_get_buf(qts, vq, &got_desc_idx, len)) {
g_assert_cmpint(got_desc_idx, ==, desc_idx);
return;
}
-
g_assert(g_get_monotonic_time() - start_time <= timeout_us);
}
}
--
2.39.5
- [PATCH v3 05/29] tests/functional: update the mips32el tuxrun tests, (continued)
- [PATCH v3 05/29] tests/functional: update the mips32el tuxrun tests, Alex Bennée, 2025/01/07
- [PATCH v3 08/29] tests/functional: update the ppc32 tuxrun tests, Alex Bennée, 2025/01/07
- [PATCH v3 07/29] tests/functional: update the mips64el tuxrun tests, Alex Bennée, 2025/01/07
- [PATCH v3 10/29] tests/functional: update the riscv32 tuxrun tests, Alex Bennée, 2025/01/07
- [PATCH v3 06/29] tests/functional: update the mips64 tuxrun tests, Alex Bennée, 2025/01/07
- [PATCH v3 09/29] tests/functional: update the ppc64 tuxrun tests, Alex Bennée, 2025/01/07
- [PATCH v3 26/29] tests/vm: allow interactive login as root, Alex Bennée, 2025/01/07
- [PATCH v3 12/29] tests/functional: update the s390x tuxrun tests, Alex Bennée, 2025/01/07
- [PATCH v3 13/29] tests/functional: update the sparc64 tuxrun tests, Alex Bennée, 2025/01/07
- [PATCH v3 11/29] tests/functional: update the riscv64 tuxrun tests, Alex Bennée, 2025/01/07
- [PATCH v3 16/29] tests/qtest: remove clock_steps from virtio tests,
Alex Bennée <=
- [PATCH v3 15/29] tests/functional/aarch64: add tests for FEAT_RME, Alex Bennée, 2025/01/07
- [PATCH v3 27/29] pc-bios: ensure keymaps dependencies set vnc tests, Alex Bennée, 2025/01/07
- [PATCH v3 14/29] tests/functional: update the x86_64 tuxrun tests, Alex Bennée, 2025/01/07
- [PATCH v3 25/29] tests/vm: partially un-tabify help output, Alex Bennée, 2025/01/07
- [PATCH v3 22/29] tests/docker: move riscv64 cross container from sid to trixie, Alex Bennée, 2025/01/07
- [PATCH v3 28/29] dockerfiles: Remove 'MAINTAINER' entry in debian-tricore-cross.docker, Alex Bennée, 2025/01/07
- [PATCH v3 24/29] tests/vm: fix build_path based path, Alex Bennée, 2025/01/07
- [PATCH v3 29/29] MAINTAINERS: Remove myself from reviewers, Alex Bennée, 2025/01/07
- [PATCH v3 21/29] tests/lcitool: bump to latest version of libvirt-ci, Alex Bennée, 2025/01/07