[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH v5 17/17] tests/device-plug: Add PHB unplug request
From: |
Greg Kurz |
Subject: |
[Qemu-devel] [PATCH v5 17/17] tests/device-plug: Add PHB unplug request test for spapr |
Date: |
Tue, 19 Feb 2019 18:18:59 +0100 |
User-agent: |
StGit/unknown-version |
We can easily test this, just like PCI. PHB unplug is not supported
on s390x and x86 ACPI.
Signed-off-by: Greg Kurz <address@hidden>
---
tests/device-plug-test.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/tests/device-plug-test.c b/tests/device-plug-test.c
index 87593d9ecfda..318e422d518c 100644
--- a/tests/device-plug-test.c
+++ b/tests/device-plug-test.c
@@ -132,6 +132,20 @@ static void test_spapr_memory_unplug_request(void)
qtest_quit(qtest);
}
+static void test_spapr_phb_unplug_request(void)
+{
+ QTestState *qtest;
+
+ qtest = qtest_initf("-device spapr-pci-host-bridge,index=1,id=dev0");
+
+ /* similar to test_pci_unplug_request */
+ device_del_request(qtest, "dev0");
+ system_reset(qtest);
+ wait_device_deleted_event(qtest, "dev0");
+
+ qtest_quit(qtest);
+}
+
int main(int argc, char **argv)
{
const char *arch = qtest_get_arch();
@@ -156,6 +170,8 @@ int main(int argc, char **argv)
test_spapr_cpu_unplug_request);
qtest_add_func("/device-plug/spapr-memory-unplug-request",
test_spapr_memory_unplug_request);
+ qtest_add_func("/device-plug/spapr-phb-unplug-request",
+ test_spapr_phb_unplug_request);
}
return g_test_run();
- [Qemu-devel] [PATCH v5 10/17] spapr: create DR connectors for PHBs, (continued)
- [Qemu-devel] [PATCH v5 10/17] spapr: create DR connectors for PHBs, Greg Kurz, 2019/02/19
- [Qemu-devel] [PATCH v5 13/17] spapr_pci: provide node start offset via spapr_populate_pci_dt(), Greg Kurz, 2019/02/19
- [Qemu-devel] [PATCH v5 12/17] spapr_events: add support for phb hotplug events, Greg Kurz, 2019/02/19
- [Qemu-devel] [PATCH v5 14/17] spapr_pci: add ibm, my-drc-index property for PHB hotplug, Greg Kurz, 2019/02/19
- [Qemu-devel] [PATCH v5 15/17] spapr: add hotplug hooks for PHB hotplug, Greg Kurz, 2019/02/19
- [Qemu-devel] [PATCH v5 16/17] spapr: enable PHB hotplug for default pseries machine type, Greg Kurz, 2019/02/19
- [Qemu-devel] [PATCH v5 17/17] tests/device-plug: Add PHB unplug request test for spapr,
Greg Kurz <=
- Re: [Qemu-devel] [PATCH v5 00/17] spapr: Add support for PHB hotplug, David Gibson, 2019/02/19