*/
void qtest_qmp_eventwait(QTestState *s, const char *event);
+/**
+ * qtest_qmp_eventwait_ref:
+ * @s: #QTestState instance to operate on.
+ * @s: #event event to wait for.
+ *
+ * Continuosly polls for QMP responses until it receives the desired event.
+ * Returns a copy of the event for further investigation.
+ */
+QDict *qtest_qmp_eventwait_ref(QTestState *s, const char *event);
+
/**
* qtest_hmpv:
* @s: #QTestState instance to operate on.
*/
void qtest_memread(QTestState *s, uint64_t addr, void *data, size_t size);
+/**
+ * qtest_rtas_call:
+ * @s: #QTestState instance to operate on.
+ * @name: name of the command to call.
+ * @nargs: Number of args.
+ * @args: Guest address to read args from.
+ * @nret: Number of return value.
+ * @ret: Guest address to write return values to.
+ *
+ * Call an RTAS function
+ */
+uint64_t qtest_rtas_call(QTestState *s, const char *name,
+ uint32_t nargs, uint64_t args,
+ uint32_t nret, uint64_t ret);
+
/**
* qtest_bufread:
* @s: #QTestState instance to operate on.
*/
int64_t qtest_clock_set(QTestState *s, int64_t val);
+/**
+ * qtest_big_endian:
+ * @s: QTestState instance to operate on.
+ *
+ * Returns: True if the architecture under test has a big endian configuration.
+ */
+bool qtest_big_endian(QTestState *s);
+
/**
* qtest_get_arch:
*
return qtest_qmp_eventwait(global_qtest, event);
}
+/**
+ * qmp_eventwait_ref:
+ * @s: #event event to wait for.
+ *
+ * Continuosly polls for QMP responses until it receives the desired event.
+ * Returns a copy of the event for further investigation.
+ */
+static inline QDict *qmp_eventwait_ref(const char *event)
+{
+ return qtest_qmp_eventwait_ref(global_qtest, event);
+}
+
/**
* hmp:
* @fmt...: HMP command to send to QEMU
return qtest_clock_set(global_qtest, val);
}
-/**
- * qtest_big_endian:
- *
- * Returns: True if the architecture under test has a big endian configuration.
- */
-bool qtest_big_endian(void);
-
-
QDict *qmp_fd_receive(int fd);
void qmp_fd_sendv(int fd, const char *fmt, va_list ap);
void qmp_fd_send(int fd, const char *fmt, ...);