summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeter Maydell2018-06-12 16:34:34 +0200
committerPeter Maydell2018-06-12 16:34:34 +0200
commit2ab09bf2f9f55b9fb8d2de6eb2ba2a8570e268e2 (patch)
tree882ab7bb5da085f75b6a5e1094f6df266183c562 /tests
parentMerge remote-tracking branch 'remotes/dgibson/tags/ppc-for-3.0-20180612' into... (diff)
parentusb-mtp: Return error on suspicious TYPE_DATA packet from initiator (diff)
downloadqemu-2ab09bf2f9f55b9fb8d2de6eb2ba2a8570e268e2.tar.gz
qemu-2ab09bf2f9f55b9fb8d2de6eb2ba2a8570e268e2.tar.xz
qemu-2ab09bf2f9f55b9fb8d2de6eb2ba2a8570e268e2.zip
Merge remote-tracking branch 'remotes/kraxel/tags/usb-20180612-pull-request' into staging
usb: bug fix collection, doc update. # gpg: Signature made Tue 12 Jun 2018 11:44:17 BST # gpg: using RSA key 4CB6D8EED3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" # Primary key fingerprint: A032 8CFF B93A 17A7 9901 FE7D 4CB6 D8EE D3E8 7138 * remotes/kraxel/tags/usb-20180612-pull-request: usb-mtp: Return error on suspicious TYPE_DATA packet from initiator usb-hcd-xhci-test: add a test for ccid hotplug usb-ccid: fix bus leak object: fix OBJ_PROP_LINK_UNREF_ON_RELEASE ambivalence bus: do not unref the added child bus on realize usb/dev-mtp: Fix use of uninitialized values usb: correctly handle Zero Length Packets usb: update docs Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/usb-hcd-xhci-test.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/usb-hcd-xhci-test.c b/tests/usb-hcd-xhci-test.c
index 9c14e3053a..5b1b681bf2 100644
--- a/tests/usb-hcd-xhci-test.c
+++ b/tests/usb-hcd-xhci-test.c
@@ -35,6 +35,15 @@ static void test_usb_uas_hotplug(void)
qtest_qmp_device_del("uas");
}
+static void test_usb_ccid_hotplug(void)
+{
+ qtest_qmp_device_add("usb-ccid", "ccid", NULL);
+ qtest_qmp_device_del("ccid");
+ /* check the device can be added again */
+ qtest_qmp_device_add("usb-ccid", "ccid", NULL);
+ qtest_qmp_device_del("ccid");
+}
+
int main(int argc, char **argv)
{
int ret;
@@ -44,6 +53,7 @@ int main(int argc, char **argv)
qtest_add_func("/xhci/pci/init", test_xhci_init);
qtest_add_func("/xhci/pci/hotplug", test_xhci_hotplug);
qtest_add_func("/xhci/pci/hotplug/usb-uas", test_usb_uas_hotplug);
+ qtest_add_func("/xhci/pci/hotplug/usb-ccid", test_usb_ccid_hotplug);
qtest_start("-device nec-usb-xhci,id=xhci"
" -drive id=drive0,if=none,file=null-co://,format=raw");