From: Max Reitz <mreitz@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>
Subject: Re: [Qemu-devel] [PATCH 08/11] qemu-iotests: add no-op streaming test
Date: Fri, 24 Apr 2015 17:19:42 +0200 [thread overview]
Message-ID: <553A5F0E.8050502@redhat.com> (raw)
In-Reply-To: <e96826c89daa1d0e623ddd527df087987209ad46.1429885069.git.berto@igalia.com>
On 24.04.2015 17:01, Alberto Garcia wrote:
> This patch tests that in a partial block-stream operation, no data is
> ever copied from the base image.
>
> Signed-off-by: Alberto Garcia <berto@igalia.com>
> ---
> tests/qemu-iotests/030 | 18 ++++++++++++++++++
> tests/qemu-iotests/030.out | 4 ++--
> 2 files changed, 20 insertions(+), 2 deletions(-)
>
> diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030
> index 6e6cb5a..bc53885 100755
> --- a/tests/qemu-iotests/030
> +++ b/tests/qemu-iotests/030
> @@ -91,6 +91,24 @@ class TestSingleDrive(iotests.QMPTestCase):
> qemu_io('-f', iotests.imgfmt, '-c', 'map', test_img),
> 'image file map does not match backing file after streaming')
>
> + def test_stream_no_op(self):
> + self.assert_no_active_block_jobs()
> +
> + # The image map is empty before the operation
> + empty_map = qemu_io('-f', iotests.imgfmt, '-c', 'map', test_img)
Oh, that was too obvious. :-)
Reviewed-by: Max Reitz <mreitz@redhat.com>
> +
> + # This is a no-op: no data should ever be copied from the base image
> + result = self.vm.qmp('block-stream', device='drive0', base=mid_img)
> + self.assert_qmp(result, 'return', {})
> +
> + self.wait_until_completed()
> +
> + self.assert_no_active_block_jobs()
> + self.vm.shutdown()
> +
> + self.assertEqual(qemu_io('-f', iotests.imgfmt, '-c', 'map', test_img),
> + empty_map, 'image file map changed after a no-op')
> +
> def test_stream_partial(self):
> self.assert_no_active_block_jobs()
>
> diff --git a/tests/qemu-iotests/030.out b/tests/qemu-iotests/030.out
> index fa16b5c..6323079 100644
> --- a/tests/qemu-iotests/030.out
> +++ b/tests/qemu-iotests/030.out
> @@ -1,5 +1,5 @@
> -.............
> +..............
> ----------------------------------------------------------------------
> -Ran 13 tests
> +Ran 14 tests
>
> OK
next prev parent reply other threads:[~2015-04-24 15:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-24 15:01 [Qemu-devel] [PATCH v6 00/11] Support streaming to an intermediate layer Alberto Garcia
2015-04-24 15:01 ` [Qemu-devel] [PATCH 01/11] block: keep a list of block jobs Alberto Garcia
2015-04-24 15:01 ` [Qemu-devel] [PATCH 02/11] block: allow block jobs in any arbitrary node Alberto Garcia
2015-04-24 15:01 ` [Qemu-devel] [PATCH 03/11] block: never cancel a streaming job without running stream_complete() Alberto Garcia
2015-04-24 15:01 ` [Qemu-devel] [PATCH 04/11] block: Support streaming to an intermediate layer Alberto Garcia
2015-04-24 15:01 ` [Qemu-devel] [PATCH 05/11] block: Add QMP support for " Alberto Garcia
2015-04-24 15:01 ` [Qemu-devel] [PATCH 06/11] docs: Document how to stream " Alberto Garcia
2015-04-24 15:01 ` [Qemu-devel] [PATCH 07/11] qemu-iotests: fix test_stream_partial() Alberto Garcia
2015-04-24 15:01 ` [Qemu-devel] [PATCH 08/11] qemu-iotests: add no-op streaming test Alberto Garcia
2015-04-24 15:19 ` Max Reitz [this message]
2015-04-24 15:01 ` [Qemu-devel] [PATCH 09/11] qemu-iotests: test streaming to an intermediate layer Alberto Garcia
2015-04-24 15:01 ` [Qemu-devel] [PATCH 10/11] qemu-iotests: test block-stream operations in parallel Alberto Garcia
2015-04-24 15:01 ` [Qemu-devel] [PATCH 11/11] qemu-iotests: test overlapping block-stream operations Alberto Garcia
-- strict thread matches above, loose matches on Subject: below --
2015-05-13 13:27 [Qemu-devel] [PATCH v7 00/11] Support streaming to an intermediate layer Alberto Garcia
2015-05-13 13:27 ` [Qemu-devel] [PATCH 08/11] qemu-iotests: add no-op streaming test Alberto Garcia
2015-05-15 2:44 ` Fam Zheng
2015-04-24 11:40 [Qemu-devel] [PATCH v5 00/11] Support streaming to an intermediate layer Alberto Garcia
2015-04-24 11:40 ` [Qemu-devel] [PATCH 08/11] qemu-iotests: add no-op streaming test Alberto Garcia
2015-04-24 13:19 ` Max Reitz
2015-04-24 13:55 ` Alberto Garcia
2015-04-24 13:57 ` Max Reitz
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=553A5F0E.8050502@redhat.com \
--to=mreitz@redhat.com \
--cc=berto@igalia.com \
--cc=kwolf@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 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).