mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 12:23:53 -06:00
tests/qtest: remove clock_steps from virtio tests
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. Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20250108121054.1126164-17-alex.bennee@linaro.org>
This commit is contained in:
parent
0d77c908f2
commit
92cb8f8bf6
1 changed files with 0 additions and 4 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue