aboutsummaryrefslogtreecommitdiff
path: root/tests/libqtest.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/libqtest.h')
-rw-r--r--tests/libqtest.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/libqtest.h b/tests/libqtest.h
index 2ca85a9ee9..c8ade856fc 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.
*