From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43486) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xnq1x-0003b5-0E for qemu-devel@nongnu.org; Mon, 10 Nov 2014 09:33:27 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xnq1q-0000Sa-S1 for qemu-devel@nongnu.org; Mon, 10 Nov 2014 09:33:20 -0500 Received: from mx1.redhat.com ([209.132.183.28]:42198) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xnq1q-0000SS-LR for qemu-devel@nongnu.org; Mon, 10 Nov 2014 09:33:14 -0500 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sAAEXDkj027156 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 10 Nov 2014 09:33:13 -0500 Date: Mon, 10 Nov 2014 15:33:09 +0100 From: Kevin Wolf Message-ID: <20141110143309.GE4158@noname.str.redhat.com> References: <1415389165-16157-1-git-send-email-kwolf@redhat.com> <1415389165-16157-4-git-send-email-kwolf@redhat.com> <5460CBCC.4070208@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5460CBCC.4070208@redhat.com> Subject: Re: [Qemu-devel] [PATCH v2 3/9] qemu-iotests: Add qemu-io format option in Python tests List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Reitz Cc: jcody@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, armbru@redhat.com Am 10.11.2014 um 15:29 hat Max Reitz geschrieben: > On 2014-11-07 at 20:39, Kevin Wolf wrote: > >Signed-off-by: Kevin Wolf > >--- > > tests/qemu-iotests/030 | 22 +++++++++++----------- > > tests/qemu-iotests/040 | 32 ++++++++++++++++---------------- > > tests/qemu-iotests/055 | 18 +++++++++--------- > > 3 files changed, 36 insertions(+), 36 deletions(-) > > > >diff --git a/tests/qemu-iotests/030 b/tests/qemu-iotests/030 > >index 8ce2373..952a524 100755 > >--- a/tests/qemu-iotests/030 > >+++ b/tests/qemu-iotests/030 > >@@ -34,7 +34,7 @@ class TestSingleDrive(iotests.QMPTestCase): > > iotests.create_image(backing_img, TestSingleDrive.image_len) > > qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=%s' % backing_img, mid_img) > > qemu_img('create', '-f', iotests.imgfmt, '-o', 'backing_file=%s' % mid_img, test_img) > >- qemu_io('-c', 'write -P 0x1 0 512', backing_img) > >+ qemu_io('-f', 'raw', '-c', 'write -P 0x1 0 512', backing_img) > > self.vm = iotests.VM().add_drive("blkdebug::" + test_img) > > self.vm.launch() > >@@ -55,8 +55,8 @@ class TestSingleDrive(iotests.QMPTestCase): > > self.assert_no_active_block_jobs() > > self.vm.shutdown() > >- self.assertEqual(qemu_io('-c', 'map', backing_img), > >- qemu_io('-c', 'map', test_img), > >+ self.assertEqual(qemu_io('-f', 'raw', '-c', 'map', backing_img), > >+ qemu_io('-f', iotests.imgfmt, '-c', 'map', test_img), > > 'image file map does not match backing file after streaming') > > def test_stream_pause(self): > >@@ -86,8 +86,8 @@ class TestSingleDrive(iotests.QMPTestCase): > > self.assert_no_active_block_jobs() > > self.vm.shutdown() > >- self.assertEqual(qemu_io('-c', 'map', backing_img), > >- qemu_io('-c', 'map', test_img), > >+ self.assertEqual(qemu_io('-f', 'raw', '-c', 'map', backing_img), > >+ qemu_io('-f', iotests.imgfmt, '-c', 'map', test_img), > > 'image file map does not match backing file after streaming') > > def test_stream_partial(self): > >@@ -101,8 +101,8 @@ class TestSingleDrive(iotests.QMPTestCase): > > self.assert_no_active_block_jobs() > > self.vm.shutdown() > >- self.assertEqual(qemu_io('-c', 'map', mid_img), > >- qemu_io('-c', 'map', test_img), > >+ self.assertEqual(qemu_io('-f', iotests.imgfmt, '-c', 'map', mid_img), > >+ qemu_io('-f', iotests.imgfmt, '-c', 'map', test_img), > > 'image file map does not match backing file after streaming') > > def test_device_not_found(self): > >@@ -359,9 +359,9 @@ class TestStreamStop(iotests.QMPTestCase): > > def setUp(self): > > qemu_img('create', backing_img, str(TestStreamStop.image_len)) > > I would have most certainly not opposed to adding -f raw here as well. qemu-img is a different story. Would probably be nice to add -f raw there, but then, there's no real reason to do it either. The only reason why I'm adding it to the qemu-io calls is that after patch 7 each of the fixed calls would print a warning. Kevin