[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 45/50] tests/device-plug: Add PHB unplug request test f
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 45/50] tests/device-plug: Add PHB unplug request test for spapr |
Date: |
Tue, 26 Feb 2019 15:52:59 +1100 |
From: Greg Kurz <address@hidden>
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>
Message-Id: <address@hidden>
Signed-off-by: David Gibson <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 87593d9ecf..318e422d51 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();
--
2.20.1
- [Qemu-ppc] [PULL 38/50] spapr: create DR connectors for PHBs, (continued)
- [Qemu-ppc] [PULL 38/50] spapr: create DR connectors for PHBs, David Gibson, 2019/02/25
- [Qemu-ppc] [PULL 49/50] ppc/pnv: add INITRD_MAX_SIZE constant, David Gibson, 2019/02/25
- [Qemu-ppc] [PULL 36/50] spapr_irq: Expose the phandle of the interrupt controller, David Gibson, 2019/02/25
- [Qemu-ppc] [PULL 50/50] ppc/pnv: use IEC binary prefixes to represent sizes, David Gibson, 2019/02/25
- [Qemu-ppc] [PULL 42/50] spapr_pci: add ibm, my-drc-index property for PHB hotplug, David Gibson, 2019/02/25
- [Qemu-ppc] [PULL 40/50] spapr_events: add support for phb hotplug events, David Gibson, 2019/02/25
- [Qemu-ppc] [PULL 32/50] spapr/pci: Generate FDT fragment at configure connector time, David Gibson, 2019/02/25
- [Qemu-ppc] [PULL 34/50] xics: Write source state to KVM at claim time, David Gibson, 2019/02/25
- [Qemu-ppc] [PULL 37/50] spapr_pci: add PHB unrealize, David Gibson, 2019/02/25
- [Qemu-ppc] [PULL 44/50] spapr: enable PHB hotplug for default pseries machine type, David Gibson, 2019/02/25
- [Qemu-ppc] [PULL 45/50] tests/device-plug: Add PHB unplug request test for spapr,
David Gibson <=
- [Qemu-ppc] [PULL 48/50] ppc/pnv: increase kernel size limit to 256MiB, David Gibson, 2019/02/25
- [Qemu-ppc] [PULL 41/50] spapr_pci: provide node start offset via spapr_populate_pci_dt(), David Gibson, 2019/02/25
- [Qemu-ppc] [PULL 43/50] spapr: add hotplug hooks for PHB hotplug, David Gibson, 2019/02/25
- [Qemu-ppc] [PULL 47/50] hw/ppc: Use object_initialize_child for correct reference counting, David Gibson, 2019/02/25
- Re: [Qemu-ppc] [PULL 00/50] ppc-for-4.0 queue 20190226, Peter Maydell, 2019/02/28