From 34f52aec286af47066484e8a96ecba0ef8e79451 Mon Sep 17 00:00:00 2001 From: Rayhan Faizel Date: Wed, 15 May 2024 15:57:54 +0530 Subject: [PATCH] qemuhotplugtest: Add testcases for hotplugging evdev input devices This patch adds testcases to exercise hotplugging/hotunplugging evdev input devices. Signed-off-by: Rayhan Faizel Reviewed-by: Michal Privoznik --- tests/qemuhotplugtest.c | 5 ++ .../qemuhotplug-input-evdev.xml | 3 + .../qemuhotplug-base-live+input-evdev.xml | 58 +++++++++++++++++++ 3 files changed, 66 insertions(+) create mode 100644 tests/qemuhotplugtestdevices/qemuhotplug-input-evdev.xml create mode 100644 tests/qemuhotplugtestdomains/qemuhotplug-base-live+input-evdev.xml diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 961a7a3c64..d935ad58ed 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -774,6 +774,11 @@ mymain(void) "device_del", QMP_DEVICE_DELETED("scsi0-0-0-4") QMP_OK, "blockdev-del", QMP_OK); + DO_TEST_ATTACH("x86_64", "base-live", "input-evdev", false, true, + "object-add", QMP_OK); + DO_TEST_DETACH("x86_64", "base-live", "input-evdev", false, false, + "object-del", QMP_OK); + #define DO_TEST_CPU_GROUP(archname, prefix, vcpus, expectfail) \ do { \ cpudata.test = prefix; \ diff --git a/tests/qemuhotplugtestdevices/qemuhotplug-input-evdev.xml b/tests/qemuhotplugtestdevices/qemuhotplug-input-evdev.xml new file mode 100644 index 0000000000..7f3d9cfd72 --- /dev/null +++ b/tests/qemuhotplugtestdevices/qemuhotplug-input-evdev.xml @@ -0,0 +1,3 @@ + + + diff --git a/tests/qemuhotplugtestdomains/qemuhotplug-base-live+input-evdev.xml b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+input-evdev.xml new file mode 100644 index 0000000000..50d8815a5c --- /dev/null +++ b/tests/qemuhotplugtestdomains/qemuhotplug-base-live+input-evdev.xml @@ -0,0 +1,58 @@ + + hotplug + d091ea82-29e6-2e34-3005-f02617b36e87 + 4194304 + 4194304 + 4 + + hvm + + + + + + + + + qemu64 + + + destroy + restart + restart + + /usr/bin/qemu-system-x86_64 + + +
+ + + +
+ + + +
+ + + + + + +
+ + + + + + + + + + + +