Lines Matching refs:qts

36 static void assert_recovered(QTestState *qts)  in assert_recovered()  argument
40 resp = qtest_qmp(qts, "{ 'execute': 'no-such-cmd' }"); in assert_recovered()
44 static void test_malformed(QTestState *qts) in test_malformed() argument
49 qtest_qmp_send_raw(qts, "{]\n"); in test_malformed()
50 resp = qtest_qmp_receive_dict(qts); in test_malformed()
52 assert_recovered(qts); in test_malformed()
55 qtest_qmp_send_raw(qts, "{\xFF"); in test_malformed()
56 resp = qtest_qmp_receive_dict(qts); in test_malformed()
58 assert_recovered(qts); in test_malformed()
61 qtest_qmp_send_raw(qts, "{\x01"); in test_malformed()
62 resp = qtest_qmp_receive_dict(qts); in test_malformed()
64 assert_recovered(qts); in test_malformed()
67 qtest_qmp_send_raw(qts, "{'bad \xFF"); in test_malformed()
68 resp = qtest_qmp_receive_dict(qts); in test_malformed()
70 assert_recovered(qts); in test_malformed()
73 qtest_qmp_send_raw(qts, "{'execute': 'nonexistent', 'id':'\n"); in test_malformed()
74 resp = qtest_qmp_receive_dict(qts); in test_malformed()
76 assert_recovered(qts); in test_malformed()
79 qtest_qmp_send_raw(qts, "%%p"); in test_malformed()
80 resp = qtest_qmp_receive_dict(qts); in test_malformed()
82 assert_recovered(qts); in test_malformed()
85 resp = qtest_qmp(qts, "null"); in test_malformed()
89 resp = qtest_qmp(qts, "{}"); in test_malformed()
93 resp = qtest_qmp(qts, "{ 'execute': true }"); in test_malformed()
97 resp = qtest_qmp(qts, "{ 'execute': 'no-such-cmd', 'arguments': [] }"); in test_malformed()
101 resp = qtest_qmp(qts, "{ 'execute': 'no-such-cmd', 'extra': true }"); in test_malformed()
109 QTestState *qts; in test_qmp_protocol() local
111 qts = qtest_init_without_qmp_handshake(common_args); in test_qmp_protocol()
114 resp = qtest_qmp_receive_dict(qts); in test_qmp_protocol()
123 resp = qtest_qmp(qts, "{ 'execute': 'query-version' }"); in test_qmp_protocol()
127 test_malformed(qts); in test_qmp_protocol()
130 resp = qtest_qmp(qts, "{ 'execute': 'qmp_capabilities' }"); in test_qmp_protocol()
136 resp = qtest_qmp(qts, "{ 'execute': 'qmp_capabilities' }"); in test_qmp_protocol()
140 resp = qtest_qmp(qts, "{ 'execute': 'query-version' }"); in test_qmp_protocol()
145 test_malformed(qts); in test_qmp_protocol()
148 resp = qtest_qmp(qts, "{ 'execute': 'query-name', 'id': 'cookie#1' }"); in test_qmp_protocol()
155 resp = qtest_qmp(qts, "{ 'execute': 'human-monitor-command', 'id': 2 }"); in test_qmp_protocol()
159 qtest_quit(qts); in test_qmp_protocol()
220 QTestState *qts; in test_qmp_oob() local
226 qts = qtest_init_without_qmp_handshake(common_args); in test_qmp_oob()
229 resp = qtest_qmp_receive_dict(qts); in test_qmp_oob()
242 resp = qtest_qmp(qts, in test_qmp_oob()
249 resp = qtest_qmp(qts, in test_qmp_oob()
259 resp = qtest_qmp(qts, "{ 'exec-oob': 'query-cpus-fast' }"); in test_qmp_oob()
265 send_cmd_that_blocks(qts, "ib-blocks-1"); in test_qmp_oob()
266 qtest_qmp_send(qts, "{ 'execute': 'query-name', 'id': 'ib-quick-1' }"); in test_qmp_oob()
267 send_oob_cmd_that_fails(qts, "oob-1"); in test_qmp_oob()
268 recv_cmd_id(qts, "oob-1"); in test_qmp_oob()
270 recv_cmd_id(qts, "ib-blocks-1"); in test_qmp_oob()
271 recv_cmd_id(qts, "ib-quick-1"); in test_qmp_oob()
274 send_cmd_that_blocks(qts, "blocks-2"); in test_qmp_oob()
275 qtest_qmp_send(qts, "{ 'id': 'err-2' }"); in test_qmp_oob()
277 recv_cmd_id(qts, "blocks-2"); in test_qmp_oob()
278 recv_cmd_id(qts, "err-2"); in test_qmp_oob()
281 qtest_quit(qts); in test_qmp_oob()
329 QTestState *qts; in test_qmp_missing_any_arg() local
332 qts = qtest_init(common_args); in test_qmp_missing_any_arg()
333 resp = qtest_qmp(qts, "{'execute': 'qom-set', 'arguments':" in test_qmp_missing_any_arg()
337 qtest_quit(qts); in test_qmp_missing_any_arg()