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

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