diff options
author | Thomas Huth <thuth@redhat.com> | 2019-07-22 17:10:55 +0200 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2019-08-15 19:24:10 +0200 |
commit | e5758de4e836c3b2edc2befd904651fc6967d74f (patch) | |
tree | 324827884570aa10cb22024f8735e43178e3a947 /tests/virtio-serial-test.c | |
parent | 17de4741296af8ed3361b14feda130a7d7102987 (diff) | |
download | qemu-e5758de4e836c3b2edc2befd904651fc6967d74f.zip qemu-e5758de4e836c3b2edc2befd904651fc6967d74f.tar.gz qemu-e5758de4e836c3b2edc2befd904651fc6967d74f.tar.bz2 |
tests/libqtest: Make qtest_qmp_device_add/del independent from global_qtest
Generic library functions like qtest_qmp_device_add() and _del()
should not depend on the global_qtest variable. Pass the test
state via parameter instead.
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20190813093047.27948-6-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/virtio-serial-test.c')
-rw-r--r-- | tests/virtio-serial-test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/virtio-serial-test.c b/tests/virtio-serial-test.c index 066ca61..e584ad7 100644 --- a/tests/virtio-serial-test.c +++ b/tests/virtio-serial-test.c @@ -20,8 +20,8 @@ static void virtio_serial_nop(void *obj, void *data, QGuestAllocator *alloc) static void serial_hotplug(void *obj, void *data, QGuestAllocator *alloc) { - qtest_qmp_device_add("virtserialport", "hp-port", "{}"); - qtest_qmp_device_del("hp-port"); + qtest_qmp_device_add(global_qtest, "virtserialport", "hp-port", "{}"); + qtest_qmp_device_del(global_qtest, "hp-port"); } static void register_virtio_serial_test(void) |