diff options
author | Kevin Wolf <kwolf@redhat.com> | 2012-04-26 19:07:55 +0200 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-05-10 10:32:11 +0200 |
commit | a3ca163cb554e6a3d55644a1ccf8c86a1b02c6cc (patch) | |
tree | 32bce89af243d583fc21ae72d033f3f28b694af9 /tests/libqtest.h | |
parent | c68b039aa950aea1e534c7abd5ba5ce602a8f4db (diff) | |
download | qemu-a3ca163cb554e6a3d55644a1ccf8c86a1b02c6cc.zip qemu-a3ca163cb554e6a3d55644a1ccf8c86a1b02c6cc.tar.gz qemu-a3ca163cb554e6a3d55644a1ccf8c86a1b02c6cc.tar.bz2 |
qtest: Add function to send QMP commands
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'tests/libqtest.h')
-rw-r--r-- | tests/libqtest.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/libqtest.h b/tests/libqtest.h index 2ca85a9..c8ade85 100644 --- a/tests/libqtest.h +++ b/tests/libqtest.h @@ -38,6 +38,15 @@ QTestState *qtest_init(const char *extra_args); void qtest_quit(QTestState *s); /** + * qtest_qmp: + * @s: QTestState instance to operate on. + * @fmt...: QMP message to send to qemu + * + * Sends a QMP message to QEMU + */ +void qtest_qmp(QTestState *s, const char *fmt, ...); + +/** * qtest_get_irq: * @s: QTestState instance to operate on. * @num: Interrupt to observe. @@ -207,6 +216,14 @@ void qtest_add_func(const char *str, void (*fn)); ) /** + * qmp: + * @fmt...: QMP message to send to qemu + * + * Sends a QMP message to QEMU + */ +#define qmp(fmt, ...) qtest_qmp(global_qtest, fmt, ## __VA_ARGS__) + +/** * get_irq: * @num: Interrupt to observe. * |