aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kurz <groug@kaod.org>2019-02-19 18:18:59 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2019-02-26 09:21:25 +1100
commit9bcb5b29419c79f0249280aaed80d40d7d798eeb (patch)
tree9b37814add725ee10c534a3df1726d234ae56a3a
parentdae5e39adae897e859685975afc1d2c0ade38505 (diff)
downloadqemu-9bcb5b29419c79f0249280aaed80d40d7d798eeb.zip
qemu-9bcb5b29419c79f0249280aaed80d40d7d798eeb.tar.gz
qemu-9bcb5b29419c79f0249280aaed80d40d7d798eeb.tar.bz2
tests/device-plug: Add PHB unplug request test for spapr
We can easily test this, just like PCI. PHB unplug is not supported on s390x and x86 ACPI. Signed-off-by: Greg Kurz <groug@kaod.org> Message-Id: <155059673939.1466090.14354001937819612724.stgit@bahia.lab.toulouse-stg.fr.ibm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r--tests/device-plug-test.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/device-plug-test.c b/tests/device-plug-test.c
index 87593d9..318e422 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();