From: Eric Blake <eblake@redhat.com>
To: Kevin Wolf <kwolf@redhat.com>, qemu-block@nongnu.org
Cc: pbonzini@redhat.com, famz@redhat.com, qemu-devel@nongnu.org,
qemu-stable@nongnu.org
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 [thread overview]
Message-ID: <19f1ad69-1e8f-448c-d549-337663bea40d@redhat.com> (raw)
In-Reply-To: <20171206105309.3468-4-kwolf@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1474 bytes --]
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 <kwolf@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 <eblake@redhat.com>
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]
next prev parent reply other threads:[~2017-12-08 15:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-06 10:53 [Qemu-devel] [PATCH v2 0/6] block: Fix BlockDriver callbacks in bdrv_drain_all_begin() Kevin Wolf
2017-12-06 10:53 ` [Qemu-devel] [PATCH v2 1/6] block: Make bdrv_drain_invoke() recursive Kevin Wolf
2017-12-06 10:53 ` [Qemu-devel] [PATCH v2 2/6] block: Call .drain_begin only once in bdrv_drain_all_begin() Kevin Wolf
2017-12-06 10:53 ` [Qemu-devel] [PATCH v2 3/6] test-bdrv-drain: Test BlockDriver callbacks for drain Kevin Wolf
2017-12-08 15:18 ` Eric Blake [this message]
2017-12-06 10:53 ` [Qemu-devel] [PATCH v2 4/6] block: bdrv_drain_recurse(): Remove unused begin parameter Kevin Wolf
2017-12-06 10:53 ` [Qemu-devel] [PATCH v2 5/6] block: Don't wait for requests in bdrv_drain*_end() Kevin Wolf
2017-12-06 11:06 ` Paolo Bonzini
2017-12-06 11:06 ` Paolo Bonzini
2017-12-06 10:53 ` [Qemu-devel] [PATCH v2 6/6] block: Unify order in drain functions Kevin Wolf
2017-12-08 10:52 ` [Qemu-devel] [PATCH v2 0/6] block: Fix BlockDriver callbacks in bdrv_drain_all_begin() Stefan Hajnoczi
2017-12-08 16:31 ` Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19f1ad69-1e8f-448c-d549-337663bea40d@redhat.com \
--to=eblake@redhat.com \
--cc=famz@redhat.com \
--cc=kwolf@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-stable@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).