aboutsummaryrefslogtreecommitdiff
path: root/tests/usb-hcd-xhci-test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/usb-hcd-xhci-test.c')
-rw-r--r--tests/usb-hcd-xhci-test.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/tests/usb-hcd-xhci-test.c b/tests/usb-hcd-xhci-test.c
index b15a511..0184537 100644
--- a/tests/usb-hcd-xhci-test.c
+++ b/tests/usb-hcd-xhci-test.c
@@ -18,30 +18,34 @@ static void test_xhci_init(void)
static void test_xhci_hotplug(void)
{
- usb_test_hotplug("xhci", "1", NULL);
+ usb_test_hotplug(global_qtest, "xhci", "1", NULL);
}
static void test_usb_uas_hotplug(void)
{
- qtest_qmp_device_add("usb-uas", "uas", "{}");
- qtest_qmp_device_add("scsi-hd", "scsihd", "{'drive': 'drive0'}");
+ QTestState *qts = global_qtest;
+
+ qtest_qmp_device_add(qts, "usb-uas", "uas", "{}");
+ qtest_qmp_device_add(qts, "scsi-hd", "scsihd", "{'drive': 'drive0'}");
/* TODO:
UAS HBA driver in libqos, to check that
added disk is visible after BUS rescan
*/
- qtest_qmp_device_del("scsihd");
- qtest_qmp_device_del("uas");
+ qtest_qmp_device_del(qts, "scsihd");
+ qtest_qmp_device_del(qts, "uas");
}
static void test_usb_ccid_hotplug(void)
{
- qtest_qmp_device_add("usb-ccid", "ccid", "{}");
- qtest_qmp_device_del("ccid");
+ QTestState *qts = global_qtest;
+
+ qtest_qmp_device_add(qts, "usb-ccid", "ccid", "{}");
+ qtest_qmp_device_del(qts, "ccid");
/* check the device can be added again */
- qtest_qmp_device_add("usb-ccid", "ccid", "{}");
- qtest_qmp_device_del("ccid");
+ qtest_qmp_device_add(qts, "usb-ccid", "ccid", "{}");
+ qtest_qmp_device_del(qts, "ccid");
}
int main(int argc, char **argv)