diff options
author | Markus Armbruster <armbru@redhat.com> | 2018-08-06 08:53:25 +0200 |
---|---|---|
committer | Markus Armbruster <armbru@redhat.com> | 2018-08-16 08:42:06 +0200 |
commit | 055a1efc7c5a30ca0993720da57ba70179d28c7b (patch) | |
tree | a64a16a0cf3cc6e3f1f8dff8289b20d6b10549d6 /tests/virtio-blk-test.c | |
parent | be62e1724f383c9e5012732af6c4dce587a917ee (diff) | |
download | qemu-055a1efc7c5a30ca0993720da57ba70179d28c7b.zip qemu-055a1efc7c5a30ca0993720da57ba70179d28c7b.tar.gz qemu-055a1efc7c5a30ca0993720da57ba70179d28c7b.tar.bz2 |
libqtest: Remove qtest_qmp_discard_response() & friends
qtest_qmp_discard_response(...) is shorthand for
qobject_unref(qtest_qmp(...), except it's not actually shorter.
Moreover, the presence of these functions encourage sloppy testing.
Remove them from libqtest. Add them as macros to the tests that use
them, with a TODO comment asking for cleanup.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180806065344.7103-5-armbru@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/virtio-blk-test.c')
-rw-r--r-- | tests/virtio-blk-test.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/virtio-blk-test.c b/tests/virtio-blk-test.c index 9be9ffb..06226b8 100644 --- a/tests/virtio-blk-test.c +++ b/tests/virtio-blk-test.c @@ -16,6 +16,7 @@ #include "libqos/virtio-pci.h" #include "libqos/virtio-mmio.h" #include "libqos/malloc-generic.h" +#include "qapi/qmp/qdict.h" #include "qemu/bswap.h" #include "standard-headers/linux/virtio_ids.h" #include "standard-headers/linux/virtio_config.h" @@ -23,6 +24,9 @@ #include "standard-headers/linux/virtio_blk.h" #include "standard-headers/linux/virtio_pci.h" +/* TODO actually test the results and get rid of this */ +#define qmp_discard_response(...) qobject_unref(qmp(__VA_ARGS__)) + #define TEST_IMAGE_SIZE (64 * 1024 * 1024) #define QVIRTIO_BLK_TIMEOUT_US (30 * 1000 * 1000) #define PCI_SLOT_HP 0x06 |