On 12/06/2017 04:53 AM, Kevin Wolf wrote: > This adds a test case that the BlockDriver callbacks for drain are > called in bdrv_drained_all_begin/end(), and that both of them are called > exactly once. > > Signed-off-by: Kevin Wolf <kw...@redhat.com> > --- > tests/test-bdrv-drain.c | 137 > ++++++++++++++++++++++++++++++++++++++++++++++++ > tests/Makefile.include | 2 + > 2 files changed, 139 insertions(+) > create mode 100644 tests/test-bdrv-drain.c >
> +static int coroutine_fn bdrv_test_co_preadv(BlockDriverState *bs, > + uint64_t offset, uint64_t bytes, > + QEMUIOVector *qiov, int flags) > +{ > + /* We want this request to stay until the polling loop in drain waits for > + * it to complete. We need to sleep a while as bdrv_drain_invoke() comes > + * first and polls its result, too, but it shouldn't accidentally > complete > + * this request yet. */ > + co_aio_sleep_ns(qemu_get_aio_context(), QEMU_CLOCK_REALTIME, 100000); > + Conflicts with patches to remove the first parameter from co_aio_sleep_ns(): https://lists.gnu.org/archive/html/qemu-devel/2017-11/msg01681.html Should be an obvious fix for whoever rebases on top of the other, so: Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature