diff options
Diffstat (limited to 'tests/libqos/pci.c')
-rw-r--r-- | tests/libqos/pci.c | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/tests/libqos/pci.c b/tests/libqos/pci.c index 2dcdeade2a..df1f98e56a 100644 --- a/tests/libqos/pci.c +++ b/tests/libqos/pci.c @@ -394,21 +394,6 @@ QPCIBar qpci_legacy_iomap(QPCIDevice *dev, uint16_t addr) void qpci_plug_device_test(const char *driver, const char *id, uint8_t slot, const char *opts) { - QDict *response; - char *cmd; - - cmd = g_strdup_printf("{'execute': 'device_add'," - " 'arguments': {" - " 'driver': '%s'," - " 'addr': '%d'," - " %s%s" - " 'id': '%s'" - "}}", driver, slot, - opts ? opts : "", opts ? "," : "", - id); - response = qmp(cmd); - g_free(cmd); - g_assert(response); - g_assert(!qdict_haskey(response, "error")); - QDECREF(response); + qtest_qmp_device_add(driver, id, "'addr': '%d'%s%s", slot, + opts ? ", " : "", opts ? opts : ""); } |