diff mbox series

[10/67] iotests/169: Skip persistent cases for compat=0.10

Message ID 20191001194715.2796-11-mreitz@redhat.com
State New
Headers show
Series iotests: Honor $IMGOPTS in Python tests | expand

Commit Message

Max Reitz Oct. 1, 2019, 7:46 p.m. UTC
compat=0.10 images cannot store persistent dirty bitmaps; let 169 skip
all such test cases when compat=0.10 is in the $IMGOPTS.

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 tests/qemu-iotests/169 | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tests/qemu-iotests/169 b/tests/qemu-iotests/169
index 8c204caf20..5e978b7b7d 100755
--- a/tests/qemu-iotests/169
+++ b/tests/qemu-iotests/169
@@ -41,7 +41,10 @@  class TestDirtyBitmapMigration(iotests.QMPTestCase):
         self.vm_b.shutdown()
         os.remove(disk_a)
         os.remove(disk_b)
-        os.remove(mig_file)
+        try:
+            os.remove(mig_file)
+        except OSError:
+            pass
 
     def setUp(self):
         qemu_img('create', '-f', iotests.imgfmt, disk_a, size)
@@ -79,6 +82,10 @@  class TestDirtyBitmapMigration(iotests.QMPTestCase):
     def do_test_migration_resume_source(self, persistent, migrate_bitmaps):
         granularity = 512
 
+        if persistent and 'compat=0.10' in iotests.imgopts:
+            self.case_skip('compat=0.10 does not support persistent dirty ' +
+                           'bitmaps')
+
         # regions = ((start, count), ...)
         regions = ((0, 0x10000),
                    (0xf0000, 0x10000),
@@ -137,6 +144,10 @@  class TestDirtyBitmapMigration(iotests.QMPTestCase):
                           shared_storage):
         granularity = 512
 
+        if persistent and 'compat=0.10' in iotests.imgopts:
+            self.case_skip('compat=0.10 does not support persistent dirty ' +
+                           'bitmaps')
+
         # regions = ((start, count), ...)
         regions = ((0, 0x10000),
                    (0xf0000, 0x10000),