aboutsummaryrefslogtreecommitdiff
path: root/tests/libqtest.h
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2016-11-14 17:07:15 +0000
committerStefan Hajnoczi <stefanha@redhat.com>2016-11-14 17:07:16 +0000
commit682df581c65ed2c1b9e77093e332214ecaa1ee93 (patch)
tree01fc6625a98800b3a800637b4189a17582246c47 /tests/libqtest.h
parenta77beb0fcbf419aa1e8e32b7df3609664f74c928 (diff)
parent22381d4180fa71614ad195b54fe81e0ffb77b01e (diff)
Merge remote-tracking branch 'jsnow/tags/ide-pull-request' into staging
# gpg: Signature made Mon 14 Nov 2016 04:16:48 PM GMT # gpg: using RSA key 0x7DEF8106AAFC390E # gpg: Good signature from "John Snow (John Huston) <jsnow@redhat.com>" # Primary key fingerprint: FAEB 9711 A12C F475 812F 18F2 88A9 064D 1835 61EB # Subkey fingerprint: F9B7 ABDB BCAC DF95 BE76 CBD0 7DEF 8106 AAFC 390E * jsnow/tags/ide-pull-request: ahci-test: add QMP tray test for ATAPI libqos/ahci: Add get_sense and test_ready libqos/ahci: Add ATAPI tray macros libqos/ahci: Support expected errors libqtest: add qmp_eventwait_ref block-backend: Always notify on blk_eject ahci-test: test atapi read_cd with bcl, nb_sectors = 0 ahci-test: Create smaller test ISO images atapi: classify read_cd as conditionally returning data Message-id: 1479140746-22142-1-git-send-email-jsnow@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/libqtest.h')
-rw-r--r--tests/libqtest.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/libqtest.h b/tests/libqtest.h
index 0224f06d65..90f182e1d8 100644
--- a/tests/libqtest.h
+++ b/tests/libqtest.h
@@ -114,6 +114,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.
* @fmt...: HMP command to send to QEMU
@@ -559,6 +569,18 @@ static inline void qmp_eventwait(const char *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
*