From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34148) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VeMFE-0003cw-DB for qemu-devel@nongnu.org; Thu, 07 Nov 2013 04:51:26 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VeMF8-0007wg-CO for qemu-devel@nongnu.org; Thu, 07 Nov 2013 04:51:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:34096) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VeMF8-0007wa-2I for qemu-devel@nongnu.org; Thu, 07 Nov 2013 04:51:14 -0500 Message-ID: <527B628D.1090306@redhat.com> Date: Thu, 07 Nov 2013 10:51:09 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1383763845-30340-1-git-send-email-mreitz@redhat.com> <1383763845-30340-3-git-send-email-mreitz@redhat.com> In-Reply-To: <1383763845-30340-3-git-send-email-mreitz@redhat.com> Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v3 2/2] qemu-iotests: Extend 041 for unbacked mirroring List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: Kevin Wolf , Fam Zheng , qemu-devel@nongnu.org, Stefan Hajnoczi , Wenchao Xia 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 > --- > 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 Paolo