aboutsummaryrefslogtreecommitdiff
path: root/tests/ide-test.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2018-08-16 09:50:53 +0100
committerPeter Maydell <peter.maydell@linaro.org>2018-08-16 09:50:54 +0100
commitc542a9f9794ec8e0bc3fcf5956d3cc8bce667789 (patch)
tree2d0a5435db92e7a6c34f4c5c619f2c4d1ae40b25 /tests/ide-test.c
parentd3bd57d9f6a60187e381c6dbcb004701fb090be8 (diff)
parentf9e986d237881fda3ce599a89c26433531f5acbb (diff)
downloadqemu-c542a9f9794ec8e0bc3fcf5956d3cc8bce667789.zip
qemu-c542a9f9794ec8e0bc3fcf5956d3cc8bce667789.tar.gz
qemu-c542a9f9794ec8e0bc3fcf5956d3cc8bce667789.tar.bz2
Merge remote-tracking branch 'remotes/armbru/tags/pull-tests-2018-08-16' into staging
Testing patches for 2018-08-16 # gpg: Signature made Thu 16 Aug 2018 09:34:43 BST # gpg: using RSA key 3870B400EB918653 # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-tests-2018-08-16: (25 commits) libqtest: Improve error reporting for bad read from QEMU tests/libqtest: Improve kill_qemu() libqtest: Rename qtest_FOOv() to qtest_vFOO() for consistency libqtest: Replace qtest_startf() by qtest_initf() libqtest: Enable compile-time format string checking migration-test: Clean up string interpolation into QMP, part 3 migration-test: Clean up string interpolation into QMP, part 2 migration-test: Clean up string interpolation into QMP, part 1 migration-test: Make wait_command() cope with '%' tests: New helper qtest_qmp_receive_success() migration-test: Make wait_command() return the "return" member tests: Clean up string interpolation around qtest_qmp_device_add() cpu-plug-test: Don't pass integers as strings to device_add tests: Clean up string interpolation into QMP input (simple cases) tests: Pass literal format strings directly to qmp_FOO() qobject: qobject_from_jsonv() is dangerous, hide it away test-qobject-input-visitor: Avoid format string ambiguity libqtest: Simplify qmp_fd_vsend() a bit qobject: New qobject_from_vjsonf_nofail(), qdict_from_vjsonf_nofail() qobject: Replace qobject_from_jsonf() by qobject_from_jsonf_nofail() ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'tests/ide-test.c')
-rw-r--r--tests/ide-test.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/ide-test.c b/tests/ide-test.c
index f39431b..33cef61 100644
--- a/tests/ide-test.c
+++ b/tests/ide-test.c
@@ -29,12 +29,15 @@
#include "libqos/libqos.h"
#include "libqos/pci-pc.h"
#include "libqos/malloc-pc.h"
-
+#include "qapi/qmp/qdict.h"
#include "qemu-common.h"
#include "qemu/bswap.h"
#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__))
+
#define TEST_IMAGE_SIZE 64 * 1024 * 1024
#define IDE_PCI_DEV 1
@@ -694,7 +697,6 @@ static void test_retry_flush(const char *machine)
QPCIDevice *dev;
QPCIBar bmdma_bar, ide_bar;
uint8_t data;
- const char *s;
prepare_blkdebug_script(debug_path, "flush_to_disk");
@@ -722,8 +724,7 @@ static void test_retry_flush(const char *machine)
qmp_eventwait("STOP");
/* Complete the command */
- s = "{'execute':'cont' }";
- qmp_discard_response(s);
+ qmp_discard_response("{'execute':'cont' }");
/* Check registers */
data = qpci_io_readb(dev, ide_bar, reg_device);