aboutsummaryrefslogtreecommitdiff
path: root/tests/qmp-test.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2018-08-06 08:53:22 +0200
committerMarkus Armbruster <armbru@redhat.com>2018-08-16 08:42:06 +0200
commit4277f1ebd9b70ee38caddfe3c514d7a91e676bc1 (patch)
tree798924a380b4b4167c11da3a9ed10976620fb668 /tests/qmp-test.c
parentc146b54c7fdbd926ee8fc4369699e3480d54f6fa (diff)
libqtest: Rename functions to send QMP messages
The functions to receive messages are called qtest_qmp_receive() and qmp_receive(), qmp_fd_receive(). The ones to send messages are called qtest_async_qmp(), qtest_async_qmpv(), qmp_async(), qmp_fd_send(), qmp_fd_sendv(). Inconsistent. Rename the *_async* ones to qmp_send(), qtest_qmp_send(), qtest_qmp_vsend(). Rename qmp_fd_sendv() to qmp_fd_vsend(). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20180806065344.7103-2-armbru@redhat.com>
Diffstat (limited to 'tests/qmp-test.c')
-rw-r--r--tests/qmp-test.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/qmp-test.c b/tests/qmp-test.c
index b9774084f8..5eb15daebc 100644
--- a/tests/qmp-test.c
+++ b/tests/qmp-test.c
@@ -159,12 +159,12 @@ static void cleanup_blocking_cmd(void)
static void send_cmd_that_blocks(QTestState *s, const char *id)
{
- qtest_async_qmp(s, "{ 'execute': 'blockdev-add', 'id': %s,"
- " 'arguments': {"
- " 'driver': 'blkdebug', 'node-name': %s,"
- " 'config': %s,"
- " 'image': { 'driver': 'null-co' } } }",
- id, id, fifo_name);
+ qtest_qmp_send(s, "{ 'execute': 'blockdev-add', 'id': %s,"
+ " 'arguments': {"
+ " 'driver': 'blkdebug', 'node-name': %s,"
+ " 'config': %s,"
+ " 'image': { 'driver': 'null-co' } } }",
+ id, id, fifo_name);
}
static void unblock_blocked_cmd(void)
@@ -176,7 +176,7 @@ static void unblock_blocked_cmd(void)
static void send_oob_cmd_that_fails(QTestState *s, const char *id)
{
- qtest_async_qmp(s, "{ 'exec-oob': 'migrate-pause', 'id': %s }", id);
+ qtest_qmp_send(s, "{ 'exec-oob': 'migrate-pause', 'id': %s }", id);
}
static void recv_cmd_id(QTestState *s, const char *id)
@@ -235,7 +235,7 @@ static void test_qmp_oob(void)
/* OOB command overtakes slow in-band command */
setup_blocking_cmd();
send_cmd_that_blocks(qts, "ib-blocks-1");
- qtest_async_qmp(qts, "{ 'execute': 'query-name', 'id': 'ib-quick-1' }");
+ qtest_qmp_send(qts, "{ 'execute': 'query-name', 'id': 'ib-quick-1' }");
send_oob_cmd_that_fails(qts, "oob-1");
recv_cmd_id(qts, "oob-1");
unblock_blocked_cmd();
@@ -244,7 +244,7 @@ static void test_qmp_oob(void)
/* Even malformed in-band command fails in-band */
send_cmd_that_blocks(qts, "blocks-2");
- qtest_async_qmp(qts, "{ 'id': 'err-2' }");
+ qtest_qmp_send(qts, "{ 'id': 'err-2' }");
unblock_blocked_cmd();
recv_cmd_id(qts, "blocks-2");
recv_cmd_id(qts, "err-2");