aboutsummaryrefslogtreecommitdiff
path: root/tests/ivshmem-test.c
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2019-07-22 17:10:55 +0200
committerThomas Huth <thuth@redhat.com>2019-08-15 19:24:10 +0200
commite5758de4e836c3b2edc2befd904651fc6967d74f (patch)
tree324827884570aa10cb22024f8735e43178e3a947 /tests/ivshmem-test.c
parent17de4741296af8ed3361b14feda130a7d7102987 (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/ivshmem-test.c')
-rw-r--r--tests/ivshmem-test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ivshmem-test.c b/tests/ivshmem-test.c
index a467b8c03d..b76457948b 100644
--- a/tests/ivshmem-test.c
+++ b/tests/ivshmem-test.c
@@ -389,7 +389,7 @@ static void test_ivshmem_hotplug(void)
qts = qtest_init("-object memory-backend-ram,size=1M,id=mb1");
global_qtest = qts; /* TODO: Get rid of global_qtest here */
- qtest_qmp_device_add("ivshmem-plain", "iv1",
+ qtest_qmp_device_add(qts, "ivshmem-plain", "iv1",
"{'addr': %s, 'memdev': 'mb1'}",
stringify(PCI_SLOT_HP));
if (strcmp(arch, "ppc64") != 0) {