mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33:54 -06:00
qtest: Add function to send QMP commands
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
c68b039aa9
commit
a3ca163cb5
2 changed files with 123 additions and 37 deletions
|
@ -37,6 +37,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.
|
||||
|
@ -206,6 +215,14 @@ void qtest_add_func(const char *str, void (*fn));
|
|||
global_qtest = qtest_init((args)) \
|
||||
)
|
||||
|
||||
/**
|
||||
* 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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue