All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Alberto Garcia <berto@igalia.com>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-block@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
	Max Reitz <mreitz@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 7/8] qemu-iotests: fix test_stream_partial()
Date: Wed, 22 Apr 2015 13:38:40 -0600	[thread overview]
Message-ID: <5537F8C0.40601@redhat.com> (raw)
In-Reply-To: <5665024c0f933ff30b527f3da02c842c79156fd6.1429196435.git.berto@igalia.com>

[-- Attachment #1: Type: text/plain, Size: 1680 bytes --]

On 04/16/2015 09:12 AM, Alberto Garcia wrote:
> This test is streaming to the top layer using the intermediate image
> as the base. This is a mistake since block-stream never copies data
> from the base image and its backing chain, so this is effectively a
> no-op.
> 
> In addition to fixing the base parameter, this patch also writes some
> data to the intermediate image before the test, so there's anything to

s/anything/something/

> copy and the test is meaningful.
> 
> Signed-off-by: Alberto Garcia <berto@igalia.com>
> ---
>  tests/qemu-iotests/030 | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

You know, we should _also_ test a no-op stream, to prove that we handle
it correctly (we've had bugs in the past where 0-length active commit
behaved differently in the events it generated than non-zero length),
and your change is dropping that.

> @@ -93,7 +94,7 @@ class TestSingleDrive(iotests.QMPTestCase):
>      def test_stream_partial(self):
>          self.assert_no_active_block_jobs()
>  
> -        result = self.vm.qmp('block-stream', device='drive0', base=mid_img)
> +        result = self.vm.qmp('block-stream', device='drive0', base=backing_img)

So, I'd actually prefer to keep _both_ of these block-streams (of
course, checking the result between both cases), or even add a second
self.vm.qmp('block-stream', device='drive0', base=backing_img) after the
first one (the first one streams data from mid into active and rebases
active; the second one is a no-op), for maximal coverage of our behavior.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  parent reply	other threads:[~2015-04-22 19:38 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-16 15:12 [Qemu-devel] [PATCH v4 0/8] Support streaming to an intermediate layer Alberto Garcia
2015-04-16 15:12 ` [Qemu-devel] [PATCH 1/8] block: keep a list of block jobs Alberto Garcia
2015-04-22 20:00   ` Eric Blake
2015-04-16 15:12 ` [Qemu-devel] [PATCH 2/8] block: allow block jobs in any arbitrary node Alberto Garcia
2015-04-22 17:15   ` Max Reitz
2015-04-22 20:06   ` Eric Blake
2015-04-23  9:04     ` Alberto Garcia
2015-04-16 15:12 ` [Qemu-devel] [PATCH 3/8] block: never cancel a streaming job without running stream_complete() Alberto Garcia
2015-04-16 15:12 ` [Qemu-devel] [PATCH 4/8] block: Support streaming to an intermediate layer Alberto Garcia
2015-04-22 17:23   ` Max Reitz
2015-04-16 15:12 ` [Qemu-devel] [PATCH 5/8] block: Add QMP support for " Alberto Garcia
2015-04-22 17:26   ` Max Reitz
2015-04-22 20:10   ` Eric Blake
2015-04-16 15:12 ` [Qemu-devel] [PATCH 6/8] docs: Document how to stream " Alberto Garcia
2015-04-22 17:29   ` Max Reitz
2015-04-22 19:27   ` Eric Blake
2015-04-16 15:12 ` [Qemu-devel] [PATCH 7/8] qemu-iotests: fix test_stream_partial() Alberto Garcia
2015-04-22 17:54   ` Max Reitz
2015-04-22 19:38   ` Eric Blake [this message]
2015-04-22 19:52     ` Alberto Garcia
2015-04-16 15:12 ` [Qemu-devel] [PATCH 8/8] qemu-iotests: test streaming to an intermediate layer Alberto Garcia
2015-04-22 17:56   ` Max Reitz
2015-04-22 19:54   ` Eric Blake

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=5537F8C0.40601@redhat.com \
    --to=eblake@redhat.com \
    --cc=berto@igalia.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.