close(thread.pipe[0]);
}
+static void test_ivshmem_hotplug_q35(void)
+{
+ QTestState *qts = qtest_init("-object memory-backend-ram,size=1M,id=mb1 "
+ "-device pcie-root-port,id=p1 "
+ "-device pcie-pci-bridge,bus=p1,id=b1 "
+ "-machine q35");
+
+ qtest_qmp_device_add(qts, "ivshmem-plain", "iv1",
+ "{'memdev': 'mb1', 'bus': 'b1'}");
+ qtest_qmp_device_del_send(qts, "iv1");
+
+ qtest_quit(qts);
+}
+
#define PCI_SLOT_HP 0x06
static void test_ivshmem_hotplug(void)
{
int ret, fd;
gchar dir[] = "/tmp/ivshmem-test.XXXXXX";
+ const char *arch = qtest_get_arch();
g_test_init(&argc, &argv, NULL);
qtest_add_func("/ivshmem/pair", test_ivshmem_pair);
qtest_add_func("/ivshmem/server", test_ivshmem_server);
}
+ if (!strcmp(arch, "x86_64") && qtest_has_machine("q35")) {
+ qtest_add_func("/ivshmem/hotplug-q35", test_ivshmem_hotplug_q35);
+ }
out:
ret = g_test_run();