aboutsummaryrefslogtreecommitdiff
path: root/tests/fdc-test.c
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2013-10-30 14:54:32 +0100
committerStefan Hajnoczi <stefanha@redhat.com>2013-11-07 13:58:43 +0100
commit0d1aa05e9eba2437fdcdfbaa846c850c986bf7c6 (patch)
treef3e288737dd2885353c75b1d5ead6a49cccdc530 /tests/fdc-test.c
parentec9c10d29c6bb5613a680af62f5825d3bb2d31d4 (diff)
libqtest: rename qmp() to qmp_discard_response()
Existing qmp() callers do not expect a response object. In order to implement real QMP test cases it will be necessary to inspect the response object. Rename qmp() to qmp_discard_response(). Later patches will introduce a qmp() function that returns the response object and tests that use it. Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Reviewed-by: Andreas Färber <afaerber@suse.de>
Diffstat (limited to 'tests/fdc-test.c')
-rw-r--r--tests/fdc-test.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/fdc-test.c b/tests/fdc-test.c
index fd198dcf8b..38b5b178d0 100644
--- a/tests/fdc-test.c
+++ b/tests/fdc-test.c
@@ -290,10 +290,12 @@ static void test_media_insert(void)
/* Insert media in drive. DSKCHK should not be reset until a step pulse
* is sent. */
- qmp("{'execute':'change', 'arguments':{ 'device':'floppy0', "
- "'target': '%s' }}", test_image);
- qmp(""); /* ignore event (FIXME open -> open transition?!) */
- qmp(""); /* ignore event */
+ qmp_discard_response("{'execute':'change', 'arguments':{"
+ " 'device':'floppy0', 'target': '%s' }}",
+ test_image);
+ qmp_discard_response(""); /* ignore event
+ (FIXME open -> open transition?!) */
+ qmp_discard_response(""); /* ignore event */
dir = inb(FLOPPY_BASE + reg_dir);
assert_bit_set(dir, DSKCHG);
@@ -322,8 +324,9 @@ static void test_media_change(void)
/* Eject the floppy and check that DSKCHG is set. Reading it out doesn't
* reset the bit. */
- qmp("{'execute':'eject', 'arguments':{ 'device':'floppy0' }}");
- qmp(""); /* ignore event */
+ qmp_discard_response("{'execute':'eject', 'arguments':{"
+ " 'device':'floppy0' }}");
+ qmp_discard_response(""); /* ignore event */
dir = inb(FLOPPY_BASE + reg_dir);
assert_bit_set(dir, DSKCHG);