qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2 3/6] test-bdrv-drain: Test BlockDriver callba


From: Eric Blake
Subject: Re: [Qemu-devel] [PATCH v2 3/6] test-bdrv-drain: Test BlockDriver callbacks for drain
Date: Fri, 8 Dec 2017 09:18:38 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

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 <address@hidden>
> ---
>  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 <address@hidden>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]