summaryrefslogtreecommitdiffstats
path: root/tests/qemu-iotests/041
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2014-10-24 15:57:35 +0200
committerStefan Hajnoczi <stefanha@redhat.com>2014-11-03 11:41:48 +0000
commit1d3ba15accf56b08f436d8ca92f5a0abce2d54ee (patch)
treea2e9c4c56fafbffd2d2e319f4ec479e9efc7d0bd /tests/qemu-iotests/041
parentef6dbf1e46ebd1d41ab669df5bba0bbdec6bd374 (diff)
downloadhqemu-1d3ba15accf56b08f436d8ca92f5a0abce2d54ee.zip
hqemu-1d3ba15accf56b08f436d8ca92f5a0abce2d54ee.tar.gz
iotests: Omit length/offset test in 040 and 041
As of a follow-up patch to this one, the length of a mirror block job will no longer directly depend on the size of the block device; therefore, drop these checks from this test. Instead, just check whether the final offset equals the block job length. As 041 uses the wait_until_completed function from iotests.py, the same applies there as well which in turn affects tests 030, 055 and 056. On the other hand, a block job's length does not have to be related to the length of the image file in the first place, so that check was questionable anyway. Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1414159063-25977-7-git-send-email-mreitz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/041')
-rwxr-xr-xtests/qemu-iotests/0415
1 files changed, 1 insertions, 4 deletions
diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041
index 5dbd4ee..59a8f73 100755
--- a/tests/qemu-iotests/041
+++ b/tests/qemu-iotests/041
@@ -52,8 +52,7 @@ class ImageMirroringTestCase(iotests.QMPTestCase):
event = self.cancel_and_wait(drive=drive)
self.assertEquals(event['event'], 'BLOCK_JOB_COMPLETED')
self.assert_qmp(event, 'data/type', 'mirror')
- self.assert_qmp(event, 'data/offset', self.image_len)
- self.assert_qmp(event, 'data/len', self.image_len)
+ self.assert_qmp(event, 'data/offset', event['data']['len'])
def complete_and_wait(self, drive='drive0', wait_ready=True):
'''Complete a block job and wait for it to finish'''
@@ -417,7 +416,6 @@ new_state = "1"
self.assert_qmp(event, 'data/type', 'mirror')
self.assert_qmp(event, 'data/device', 'drive0')
self.assert_qmp(event, 'data/error', 'Input/output error')
- self.assert_qmp(event, 'data/len', self.image_len)
completed = True
self.assert_no_active_block_jobs()
@@ -568,7 +566,6 @@ new_state = "1"
self.assert_qmp(event, 'data/type', 'mirror')
self.assert_qmp(event, 'data/device', 'drive0')
self.assert_qmp(event, 'data/error', 'Input/output error')
- self.assert_qmp(event, 'data/len', self.image_len)
completed = True
self.assert_no_active_block_jobs()
OpenPOWER on IntegriCloud