]> git.proxmox.com Git - mirror_qemu.git/blobdiff - tests/libqtest.h
Merge remote-tracking branch 'remotes/xtensa/tags/20170317-xtensa' into staging
[mirror_qemu.git] / tests / libqtest.h
index 4be1f77877d0a9e285968862fe41615a90dd9af1..2c9962d94f145be78be12a756690e894e4d6975c 100644 (file)
@@ -31,6 +31,14 @@ extern QTestState *global_qtest;
  */
 QTestState *qtest_init(const char *extra_args);
 
+/**
+ * qtest_init_without_qmp_handshake:
+ * @extra_args: other arguments to pass to QEMU.
+ *
+ * Returns: #QTestState instance.
+ */
+QTestState *qtest_init_without_qmp_handshake(const char *extra_args);
+
 /**
  * qtest_quit:
  * @s: #QTestState instance to operate on.
@@ -113,6 +121,16 @@ QDict *qtest_qmp_receive(QTestState *s);
  */
 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.
@@ -558,6 +576,18 @@ static inline void qmp_eventwait(const char *event)
     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
@@ -881,16 +911,6 @@ static inline int64_t clock_set(int64_t val)
     return qtest_clock_set(global_qtest, val);
 }
 
-/**
- * target_big_endian:
- *
- * Returns: True if the architecture under test has a big endian configuration.
- */
-static inline bool target_big_endian(void)
-{
-    return qtest_big_endian(global_qtest);
-}
-
 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, ...);