Blame SOURCES/kvm-usb-hcd-xhci-test-add-a-test-for-ccid-hotplug.patch

1bdc94
From 175943dc22bc1ff3622fd5132656375f22306f27 Mon Sep 17 00:00:00 2001
1bdc94
From: Serhii Popovych <spopovyc@redhat.com>
1bdc94
Date: Mon, 9 Jul 2018 11:31:17 +0200
1bdc94
Subject: [PATCH 27/89] usb-hcd-xhci-test: add a test for ccid hotplug
1bdc94
MIME-Version: 1.0
1bdc94
Content-Type: text/plain; charset=UTF-8
1bdc94
Content-Transfer-Encoding: 8bit
1bdc94
1bdc94
RH-Author: Serhii Popovych <spopovyc@redhat.com>
1bdc94
Message-id: <1531135878-18813-3-git-send-email-spopovyc@redhat.com>
1bdc94
Patchwork-id: 81267
1bdc94
O-Subject: [RHEL-7.6 qemu-kvm-rhev PATCH v2 2/3] usb-hcd-xhci-test: add a test for ccid hotplug
1bdc94
Bugzilla: 1556678
1bdc94
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
1bdc94
RH-Acked-by: Marc-André Lureau <marcandre.lureau@redhat.com>
1bdc94
RH-Acked-by: David Gibson <dgibson@redhat.com>
1bdc94
1bdc94
From: Marc-André Lureau <marcandre.lureau@redhat.com>
1bdc94
1bdc94
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
1bdc94
Message-id: 20180531195119.22021-5-marcandre.lureau@redhat.com
1bdc94
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
1bdc94
(cherry picked from commit 1a3ff20e67330a15d62b00c2916e3541872103c0)
1bdc94
Signed-off-by: Serhii Popovych <spopovyc@redhat.com>
1bdc94
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
1bdc94
1bdc94
Conflicts:
1bdc94
	tests/usb-hcd-xhci-test.c
1bdc94
1bdc94
Due to disabled UAS that adds if/endif and comment line.
1bdc94
---
1bdc94
 tests/usb-hcd-xhci-test.c | 11 +++++++++++
1bdc94
 1 file changed, 11 insertions(+)
1bdc94
1bdc94
diff --git a/tests/usb-hcd-xhci-test.c b/tests/usb-hcd-xhci-test.c
1bdc94
index 192b7f7..8c3fb36 100644
1bdc94
--- a/tests/usb-hcd-xhci-test.c
1bdc94
+++ b/tests/usb-hcd-xhci-test.c
1bdc94
@@ -37,6 +37,15 @@ static void test_usb_uas_hotplug(void)
1bdc94
 }
1bdc94
 #endif
1bdc94
 
1bdc94
+static void test_usb_ccid_hotplug(void)
1bdc94
+{
1bdc94
+    qtest_qmp_device_add("usb-ccid", "ccid", NULL);
1bdc94
+    qtest_qmp_device_del("ccid");
1bdc94
+    /* check the device can be added again */
1bdc94
+    qtest_qmp_device_add("usb-ccid", "ccid", NULL);
1bdc94
+    qtest_qmp_device_del("ccid");
1bdc94
+}
1bdc94
+
1bdc94
 int main(int argc, char **argv)
1bdc94
 {
1bdc94
     int ret;
1bdc94
@@ -48,6 +57,8 @@ int main(int argc, char **argv)
1bdc94
 #if 0 /* Disabled for Red Hat Enterprise Linux 7 */
1bdc94
     qtest_add_func("/xhci/pci/hotplug/usb-uas", test_usb_uas_hotplug);
1bdc94
 #endif
1bdc94
+    qtest_add_func("/xhci/pci/hotplug/usb-ccid", test_usb_ccid_hotplug);
1bdc94
+
1bdc94
     qtest_start("-device nec-usb-xhci,id=xhci"
1bdc94
                 " -drive id=drive0,if=none,file=null-co://,format=raw");
1bdc94
     ret = g_test_run();
1bdc94
-- 
1bdc94
1.8.3.1
1bdc94