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

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