]> Git Repo - qemu.git/blobdiff - tests/ivshmem-test.c
qemu-option: improve qemu_opts_print_help() output
[qemu.git] / tests / ivshmem-test.c
index 9b407a3e424a2115ff4d568eb09aa420be4daf77..c37b196b32269248fa515f188542618d5431fec3 100644 (file)
@@ -420,19 +420,17 @@ static void test_ivshmem_server_irq(void)
 static void test_ivshmem_hotplug(void)
 {
     const char *arch = qtest_get_arch();
-    gchar *opts;
 
     qtest_start("");
 
-    opts = g_strdup_printf("'shm': '%s', 'size': '1M'", tmpshm);
-
-    qpci_plug_device_test("ivshmem", "iv1", PCI_SLOT_HP, opts);
+    qtest_qmp_device_add("ivshmem",
+                         "iv1", "{'addr': %s, 'shm': %s, 'size': '1M'}",
+                         stringify(PCI_SLOT_HP), tmpshm);
     if (strcmp(arch, "ppc64") != 0) {
         qpci_unplug_acpi_device_test("iv1", PCI_SLOT_HP);
     }
 
     qtest_end();
-    g_free(opts);
 }
 
 static void test_ivshmem_memdev(void)
This page took 0.024443 seconds and 4 git commands to generate.