From edbe36ad0f2fa8876b59bc77991ef00c969247a9 Mon Sep 17 00:00:00 2001 From: Kevin Wolf Date: Wed, 8 May 2019 11:58:45 +0200 Subject: 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 --- tests/libqtest.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'tests/libqtest.h') 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. * -- cgit v1.1