qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Max Reitz <mreitz@redhat.com>
Cc: Kevin Wolf <kwolf@redhat.com>, Fam Zheng <famz@redhat.com>,
	qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>,
	Wenchao Xia <xiawenc@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH v3 2/2] qemu-iotests: Extend 041 for unbacked mirroring
Date: Thu, 07 Nov 2013 10:51:09 +0100	[thread overview]
Message-ID: <527B628D.1090306@redhat.com> (raw)
In-Reply-To: <1383763845-30340-3-git-send-email-mreitz@redhat.com>

Il 06/11/2013 19:50, Max Reitz ha scritto:
> Add a new test case in file 041 for mirroring unbacked images in
> "absolute-paths" mode. This should work, if possible, but most
> importantly, qemu should never crash.
> 
> Signed-off-by: Max Reitz <mreitz@redhat.com>
> ---
>  tests/qemu-iotests/041     | 25 +++++++++++++++++++++++++
>  tests/qemu-iotests/041.out |  4 ++--
>  2 files changed, 27 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041
> index 6661c03..5d40265 100755
> --- a/tests/qemu-iotests/041
> +++ b/tests/qemu-iotests/041
> @@ -677,5 +677,30 @@ class TestSetSpeed(ImageMirroringTestCase):
>  
>          self.wait_ready_and_cancel()
>  
> +class TestUnbackedSource(ImageMirroringTestCase):
> +    image_len = 2 * 1024 * 1024 # MB
> +
> +    def setUp(self):
> +        qemu_img('create', '-f', iotests.imgfmt, test_img,
> +                 str(TestUnbackedSource.image_len))
> +        self.vm = iotests.VM().add_drive(test_img)
> +        self.vm.launch()
> +
> +    def tearDown(self):
> +        self.vm.shutdown()
> +        os.remove(test_img)
> +        os.remove(target_img)
> +
> +    def test_absolute_paths(self):
> +        self.assert_no_active_block_jobs()
> +
> +        for sync_mode in ['full', 'top', 'none']:
> +            result = self.vm.qmp('drive-mirror', device='drive0',
> +                                 sync=sync_mode, target=target_img,
> +                                 mode='absolute-paths')
> +            self.assert_qmp(result, 'return', {})
> +            self.complete_and_wait()
> +            self.assert_no_active_block_jobs()
> +
>  if __name__ == '__main__':
>      iotests.main(supported_fmts=['qcow2', 'qed'])
> diff --git a/tests/qemu-iotests/041.out b/tests/qemu-iotests/041.out
> index 42314e9..4fd1c2d 100644
> --- a/tests/qemu-iotests/041.out
> +++ b/tests/qemu-iotests/041.out
> @@ -1,5 +1,5 @@
> -........................
> +.........................
>  ----------------------------------------------------------------------
> -Ran 24 tests
> +Ran 25 tests
>  
>  OK
> 

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

Paolo

  reply	other threads:[~2013-11-07  9:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-06 18:50 [Qemu-devel] [PATCH v3 0/2] block/drive-mirror: Check for NULL backing_hd Max Reitz
2013-11-06 18:50 ` [Qemu-devel] [PATCH v3 1/2] " Max Reitz
2013-11-06 19:01   ` Eric Blake
2013-11-06 18:50 ` [Qemu-devel] [PATCH v3 2/2] qemu-iotests: Extend 041 for unbacked mirroring Max Reitz
2013-11-07  9:51   ` Paolo Bonzini [this message]
2013-11-07  2:25 ` [Qemu-devel] [PATCH v3 0/2] block/drive-mirror: Check for NULL backing_hd Wenchao Xia
2013-11-07  9:11   ` Max Reitz
2013-11-11 16:05 ` 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=527B628D.1090306@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=famz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=mreitz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=xiawenc@linux.vnet.ibm.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).