]> git.proxmox.com Git - mirror_qemu.git/commit
tests/libqos: Replace clock_step with qtest_clock_step in virtio code
authorThomas Huth <thuth@redhat.com>
Tue, 3 Sep 2019 06:18:46 +0000 (08:18 +0200)
committerThomas Huth <thuth@redhat.com>
Thu, 5 Sep 2019 11:18:52 +0000 (13:18 +0200)
commitb57ebd57b43db5456b850a81a2ef46b03b8716ca
tree3b17a6ee9613f599a0ebff783c58ae6dda6ca730
parent4d81d77efdce7096e8bbdc18a06cf9b3d376c3cb
tests/libqos: Replace clock_step with qtest_clock_step in virtio code

Library functions should not rely on functions that require global_qtest
(since they might get used in tests that deal with multiple states).
Commit 1999a70a05ad603d ("Make generic virtio code independent from
global_qtest") already tried to clean the libqos virtio code, but I
missed to replace the clock_step() function. Thus change it now to
qtest_clock_step() instead.
The logic of the qvirtio_wait_config_isr() function is now pushed
to the virtio-mmio.c and virtio-pci.c files instead, since we can
get the QTestState here easily.

Message-Id: <20190904130047.25808-4-thuth@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
tests/libqos/virtio-mmio.c
tests/libqos/virtio-pci.c
tests/libqos/virtio.c
tests/libqos/virtio.h
tests/virtio-blk-test.c