[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [PATCH 7/8] qemu-iotests: fix test_stream_partial()
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [PATCH 7/8] qemu-iotests: fix test_stream_partial() |
Date: |
Wed, 22 Apr 2015 13:38:40 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 |
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 <address@hidden>
> ---
> 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
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH 8/8] qemu-iotests: test streaming to an intermediate layer, (continued)
- [Qemu-block] [PATCH 8/8] qemu-iotests: test streaming to an intermediate layer, Alberto Garcia, 2015/04/16
- [Qemu-block] [PATCH 3/8] block: never cancel a streaming job without running stream_complete(), Alberto Garcia, 2015/04/16
- [Qemu-block] [PATCH 4/8] block: Support streaming to an intermediate layer, Alberto Garcia, 2015/04/16
- [Qemu-block] [PATCH 1/8] block: keep a list of block jobs, Alberto Garcia, 2015/04/16
- [Qemu-block] [PATCH 7/8] qemu-iotests: fix test_stream_partial(), Alberto Garcia, 2015/04/16