aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest/qmp-test.c
diff options
context:
space:
mode:
authorMaxim Levitsky <mlevitsk@redhat.com>2020-10-06 14:38:52 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2020-10-12 11:50:24 -0400
commit1c3e2a38de4e3094dfaf1e4dd73b1e5a91df8fe9 (patch)
tree43c174b151e2af0e9fa1692bc54619f19a4c0e3f /tests/qtest/qmp-test.c
parentfbc5884ce2774232ea5a1a7d9b4e605aefc16a2b (diff)
qtest: rename qtest_qmp_receive to qtest_qmp_receive_dict
In the next patch a new version of qtest_qmp_receive will be reintroduced that will buffer received qmp events for later consumption in qtest_qmp_eventwait_ref No functional change intended. Suggested-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/qtest/qmp-test.c')
-rw-r--r--tests/qtest/qmp-test.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/qtest/qmp-test.c b/tests/qtest/qmp-test.c
index e1032c5a21..eb1cd8abb8 100644
--- a/tests/qtest/qmp-test.c
+++ b/tests/qtest/qmp-test.c
@@ -47,37 +47,37 @@ static void test_malformed(QTestState *qts)
/* syntax error */
qtest_qmp_send_raw(qts, "{]\n");
- resp = qtest_qmp_receive(qts);
+ resp = qtest_qmp_receive_dict(qts);
qmp_expect_error_and_unref(resp, "GenericError");
assert_recovered(qts);
/* lexical error: impossible byte outside string */
qtest_qmp_send_raw(qts, "{\xFF");
- resp = qtest_qmp_receive(qts);
+ resp = qtest_qmp_receive_dict(qts);
qmp_expect_error_and_unref(resp, "GenericError");
assert_recovered(qts);
/* lexical error: funny control character outside string */
qtest_qmp_send_raw(qts, "{\x01");
- resp = qtest_qmp_receive(qts);
+ resp = qtest_qmp_receive_dict(qts);
qmp_expect_error_and_unref(resp, "GenericError");
assert_recovered(qts);
/* lexical error: impossible byte in string */
qtest_qmp_send_raw(qts, "{'bad \xFF");
- resp = qtest_qmp_receive(qts);
+ resp = qtest_qmp_receive_dict(qts);
qmp_expect_error_and_unref(resp, "GenericError");
assert_recovered(qts);
/* lexical error: control character in string */
qtest_qmp_send_raw(qts, "{'execute': 'nonexistent', 'id':'\n");
- resp = qtest_qmp_receive(qts);
+ resp = qtest_qmp_receive_dict(qts);
qmp_expect_error_and_unref(resp, "GenericError");
assert_recovered(qts);
/* lexical error: interpolation */
qtest_qmp_send_raw(qts, "%%p");
- resp = qtest_qmp_receive(qts);
+ resp = qtest_qmp_receive_dict(qts);
qmp_expect_error_and_unref(resp, "GenericError");
assert_recovered(qts);
@@ -111,7 +111,7 @@ static void test_qmp_protocol(void)
qts = qtest_init_without_qmp_handshake(common_args);
/* Test greeting */
- resp = qtest_qmp_receive(qts);
+ resp = qtest_qmp_receive_dict(qts);
q = qdict_get_qdict(resp, "QMP");
g_assert(q);
test_version(qdict_get(q, "version"));
@@ -205,7 +205,7 @@ static void send_oob_cmd_that_fails(QTestState *s, const char *id)
static void recv_cmd_id(QTestState *s, const char *id)
{
- QDict *resp = qtest_qmp_receive(s);
+ QDict *resp = qtest_qmp_receive_dict(s);
g_assert_cmpstr(qdict_get_try_str(resp, "id"), ==, id);
qobject_unref(resp);
@@ -222,7 +222,7 @@ static void test_qmp_oob(void)
qts = qtest_init_without_qmp_handshake(common_args);
/* Check the greeting message. */
- resp = qtest_qmp_receive(qts);
+ resp = qtest_qmp_receive_dict(qts);
q = qdict_get_qdict(resp, "QMP");
g_assert(q);
capabilities = qdict_get_qlist(q, "capabilities");