mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 17:53:56 -06:00
libqtest: Remove qtest_qmp_discard_response() & friends
qtest_qmp_discard_response(...) is shorthand for qobject_unref(qtest_qmp(...), except it's not actually shorter. Moreover, the presence of these functions encourage sloppy testing. Remove them from libqtest. Add them as macros to the tests that use them, with a TODO comment asking for cleanup. Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20180806065344.7103-5-armbru@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com>
This commit is contained in:
parent
be62e1724f
commit
055a1efc7c
11 changed files with 34 additions and 55 deletions
|
@ -73,15 +73,6 @@ QTestState *qtest_init_without_qmp_handshake(bool use_oob,
|
|||
*/
|
||||
void qtest_quit(QTestState *s);
|
||||
|
||||
/**
|
||||
* qtest_qmp_discard_response:
|
||||
* @s: #QTestState instance to operate on.
|
||||
* @fmt...: QMP message to send to qemu
|
||||
*
|
||||
* Sends a QMP message to QEMU and consumes the response.
|
||||
*/
|
||||
void qtest_qmp_discard_response(QTestState *s, const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* qtest_qmp:
|
||||
* @s: #QTestState instance to operate on.
|
||||
|
@ -100,16 +91,6 @@ QDict *qtest_qmp(QTestState *s, const char *fmt, ...);
|
|||
*/
|
||||
void qtest_qmp_send(QTestState *s, const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* qtest_qmpv_discard_response:
|
||||
* @s: #QTestState instance to operate on.
|
||||
* @fmt: QMP message to send to QEMU
|
||||
* @ap: QMP message arguments
|
||||
*
|
||||
* Sends a QMP message to QEMU and consumes the response.
|
||||
*/
|
||||
void qtest_qmpv_discard_response(QTestState *s, const char *fmt, va_list ap);
|
||||
|
||||
/**
|
||||
* qtest_qmpv:
|
||||
* @s: #QTestState instance to operate on.
|
||||
|
@ -575,14 +556,6 @@ QDict *qmp(const char *fmt, ...);
|
|||
*/
|
||||
void qmp_send(const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* qmp_discard_response:
|
||||
* @fmt...: QMP message to send to qemu
|
||||
*
|
||||
* Sends a QMP message to QEMU and consumes the response.
|
||||
*/
|
||||
void qmp_discard_response(const char *fmt, ...);
|
||||
|
||||
/**
|
||||
* qmp_receive:
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue