aboutsummaryrefslogtreecommitdiff
path: root/tests/libqtest.h
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2019-05-08 11:58:45 +0200
committerKevin Wolf <kwolf@redhat.com>2019-06-04 16:54:51 +0200
commitedbe36ad0f2fa8876b59bc77991ef00c969247a9 (patch)
tree833d3820bf756f66b001be08c27b84f3453ce830 /tests/libqtest.h
parentd0ee0204f400956ab429278f1b459d9af969c4a2 (diff)
downloadqemu-edbe36ad0f2fa8876b59bc77991ef00c969247a9.zip
qemu-edbe36ad0f2fa8876b59bc77991ef00c969247a9.tar.gz
qemu-edbe36ad0f2fa8876b59bc77991ef00c969247a9.tar.bz2
virtio-scsi-test: Test attaching new overlay with iothreads
This tests that blockdev-add can correctly add a qcow2 overlay to an image used by a virtio-scsi disk in an iothread. The interesting point here is whether the newly added node gets correctly moved into the iothread AioContext. If it isn't, we get an assertion failure in virtio-scsi while processing the next request: virtio_scsi_ctx_check: Assertion `blk_get_aio_context(d->conf.blk) == s->ctx' failed. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/libqtest.h')
-rw-r--r--tests/libqtest.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/libqtest.h b/tests/libqtest.h
index a98ea15..32d9277 100644
--- a/tests/libqtest.h
+++ b/tests/libqtest.h
@@ -619,6 +619,17 @@ static inline void qtest_end(void)
QDict *qmp(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
/**
+ * qmp_assert_success:
+ * @fmt...: QMP message to send to qemu, formatted like
+ * qobject_from_jsonf_nofail(). See parse_escape() for what's
+ * supported after '%'.
+ *
+ * Sends a QMP message to QEMU and asserts that a 'return' key is present in
+ * the response.
+ */
+void qmp_assert_success(const char *fmt, ...) GCC_FMT_ATTR(1, 2);
+
+/*
* qmp_eventwait:
* @s: #event event to wait for.
*