diff mbox

[RFC,12/16] iotests: Add qbm format to 041

Message ID 1453804705-7205-13-git-send-email-famz@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Fam Zheng Jan. 26, 2016, 10:38 a.m. UTC
Though a number of test cases dosn't apply because of cluster size and
blkdebug limitation, mirroring qbm can be covered by all other cases.

Signed-off-by: Fam Zheng <famz@redhat.com>
---
 tests/qemu-iotests/041 | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/tests/qemu-iotests/041 b/tests/qemu-iotests/041
index c7da95d..3712aca 100755
--- a/tests/qemu-iotests/041
+++ b/tests/qemu-iotests/041
@@ -139,6 +139,8 @@  class TestSingleDrive(iotests.QMPTestCase):
                         'target image does not match source after mirroring')
 
     def test_small_buffer2(self):
+        if iotests.imgfmt == "qbm":
+            return
         self.assert_no_active_block_jobs()
 
         qemu_img('create', '-f', iotests.imgfmt, '-o', 'cluster_size=%d,size=%d'
@@ -155,6 +157,8 @@  class TestSingleDrive(iotests.QMPTestCase):
                         'target image does not match source after mirroring')
 
     def test_large_cluster(self):
+        if iotests.imgfmt == "qbm":
+            return
         self.assert_no_active_block_jobs()
 
         qemu_img('create', '-f', iotests.imgfmt, '-o', 'cluster_size=%d,backing_file=%s'
@@ -265,9 +269,9 @@  class TestMirrorNoBacking(iotests.QMPTestCase):
         os.remove(backing_img)
         try:
             os.remove(target_backing_img)
+            os.remove(target_img)
         except:
             pass
-        os.remove(target_img)
 
     def test_complete(self):
         self.assert_no_active_block_jobs()
@@ -300,6 +304,8 @@  class TestMirrorNoBacking(iotests.QMPTestCase):
                         'target image does not match source after mirroring')
 
     def test_large_cluster(self):
+        if iotests.imgfmt == "qbm":
+            return
         self.assert_no_active_block_jobs()
 
         # qemu-img create fails if the image is not there
@@ -461,6 +467,8 @@  new_state = "1"
         self.vm.shutdown()
 
     def test_large_cluster(self):
+        if iotests.imgfmt == "qbm":
+            return
         self.assert_no_active_block_jobs()
 
         # Test COW into the target image.  The first half of the
@@ -568,6 +576,8 @@  new_state = "1"
         os.remove(self.blkdebug_file)
 
     def test_report_write(self):
+        if iotests.imgfmt == "qbm":
+            return
         self.assert_no_active_block_jobs()
 
         result = self.vm.qmp('drive-mirror', device='drive0', sync='full',
@@ -595,6 +605,8 @@  new_state = "1"
         self.vm.shutdown()
 
     def test_ignore_write(self):
+        if iotests.imgfmt == "qbm":
+            return
         self.assert_no_active_block_jobs()
 
         result = self.vm.qmp('drive-mirror', device='drive0', sync='full',
@@ -612,6 +624,8 @@  new_state = "1"
         self.vm.shutdown()
 
     def test_stop_write(self):
+        if iotests.imgfmt == "qbm":
+            return
         self.assert_no_active_block_jobs()
 
         result = self.vm.qmp('drive-mirror', device='drive0', sync='full',
@@ -981,4 +995,4 @@  class TestRepairQuorum(iotests.QMPTestCase):
         self.vm.shutdown()
 
 if __name__ == '__main__':
-    iotests.main(supported_fmts=['qcow2', 'qed'])
+    iotests.main(supported_fmts=['qcow2', 'qed', 'qbm'])