aboutsummaryrefslogtreecommitdiff
path: root/tests/ahci-test.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2018-08-06 08:53:25 +0200
committerMarkus Armbruster <armbru@redhat.com>2018-08-16 08:42:06 +0200
commit055a1efc7c5a30ca0993720da57ba70179d28c7b (patch)
treea64a16a0cf3cc6e3f1f8dff8289b20d6b10549d6 /tests/ahci-test.c
parentbe62e1724f383c9e5012732af6c4dce587a917ee (diff)
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/ahci-test.c')
-rw-r--r--tests/ahci-test.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/ahci-test.c b/tests/ahci-test.c
index 7e3491b5bd..555f02112e 100644
--- a/tests/ahci-test.c
+++ b/tests/ahci-test.c
@@ -37,6 +37,9 @@
#include "hw/pci/pci_ids.h"
#include "hw/pci/pci_regs.h"
+/* TODO actually test the results and get rid of this */
+#define qmp_discard_response(...) qobject_unref(qmp(__VA_ARGS__))
+
/* Test images sizes in MB */
#define TEST_IMAGE_SIZE_MB_LARGE (200 * 1024)
#define TEST_IMAGE_SIZE_MB_SMALL 64