diff options
author | Thomas Huth <thuth@redhat.com> | 2019-04-09 14:25:57 +0200 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2019-05-08 17:45:54 +0200 |
commit | 6ebb8d2a210f21c7d4f168564f812833320a8fc4 (patch) | |
tree | faaa3a01f71d576c78fed1f15c3f7075e96f86dc /tests/e1000e-test.c | |
parent | a771729cdf450881cbe66261aea740ccbd02b8ff (diff) |
tests: qpci_unplug_acpi_device_test() should not rely on global_qtest
libqos functions should not use functions that require global_qtest to
be set, since such library functions could also be used by tests that
deal with multiple test states. Add a parameter to this function to
explicitly specify the test state.
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20190508143209.24350-1-thuth@redhat.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/e1000e-test.c')
-rw-r--r-- | tests/e1000e-test.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/e1000e-test.c b/tests/e1000e-test.c index 77ba8095bb..6a946c0484 100644 --- a/tests/e1000e-test.c +++ b/tests/e1000e-test.c @@ -231,8 +231,10 @@ static void test_e1000e_multiple_transfers(void *obj, void *data, static void test_e1000e_hotplug(void *obj, void *data, QGuestAllocator * alloc) { + QTestState *qts = global_qtest; /* TODO: get rid of global_qtest here */ + qtest_qmp_device_add("e1000e", "e1000e_net", "{'addr': '0x06'}"); - qpci_unplug_acpi_device_test("e1000e_net", 0x06); + qpci_unplug_acpi_device_test(qts, "e1000e_net", 0x06); } static void data_test_clear(void *sockets) |