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-net-test.c | |
parent | 17de4741296af8ed3361b14feda130a7d7102987 (diff) |
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-net-test.c')
-rw-r--r-- | tests/virtio-net-test.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/virtio-net-test.c b/tests/virtio-net-test.c index 1071dd82c9..840875aaae 100644 --- a/tests/virtio-net-test.c +++ b/tests/virtio-net-test.c @@ -174,7 +174,7 @@ static void hotplug(void *obj, void *data, QGuestAllocator *t_alloc) QTestState *qts = dev->pdev->bus->qts; const char *arch = qtest_get_arch(); - qtest_qmp_device_add("virtio-net-pci", "net1", + qtest_qmp_device_add(qts, "virtio-net-pci", "net1", "{'addr': %s}", stringify(PCI_SLOT_HP)); if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { |