diff mbox series

[14/67] iotests: Use unsupported_imgopts in Python tests

Message ID 20191001194715.2796-15-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
Set unsupported_imgopts as appropriate for all tests that should make
use of it.

Signed-off-by: Max Reitz <mreitz@redhat.com>
---
 tests/qemu-iotests/044 | 5 ++++-
 tests/qemu-iotests/057 | 4 +++-
 tests/qemu-iotests/065 | 4 +++-
 tests/qemu-iotests/163 | 5 ++++-
 tests/qemu-iotests/165 | 4 +++-
 tests/qemu-iotests/196 | 4 +++-
 tests/qemu-iotests/206 | 5 ++++-
 tests/qemu-iotests/222 | 3 ++-
 tests/qemu-iotests/237 | 4 +++-
 tests/qemu-iotests/242 | 4 +++-
 tests/qemu-iotests/245 | 4 +++-
 tests/qemu-iotests/246 | 5 ++++-
 tests/qemu-iotests/248 | 6 +++++-
 tests/qemu-iotests/254 | 4 +++-
 tests/qemu-iotests/257 | 4 +++-
 15 files changed, 50 insertions(+), 15 deletions(-)
diff mbox series

Patch

diff --git a/tests/qemu-iotests/044 b/tests/qemu-iotests/044
index 8b2afa2a11..97ba98e628 100755
--- a/tests/qemu-iotests/044
+++ b/tests/qemu-iotests/044
@@ -116,4 +116,7 @@  class TestRefcountTableGrowth(iotests.QMPTestCase):
 
 if __name__ == '__main__':
     iotests.main(supported_fmts=['qcow2'],
-                 supported_protocols=['file'])
+                 supported_protocols=['file'],
+                 # These refcount calculations do not work with data_file or
+                 # with any refcount width but the default (of 16)
+                 unsupported_imgopts=['data_file', 'refcount_bits'])
diff --git a/tests/qemu-iotests/057 b/tests/qemu-iotests/057
index 9fbba759b6..f5aa5929dc 100755
--- a/tests/qemu-iotests/057
+++ b/tests/qemu-iotests/057
@@ -257,4 +257,6 @@  class TestSnapshotDelete(ImageSnapshotTestCase):
 
 if __name__ == '__main__':
     iotests.main(supported_fmts=['qcow2'],
-                 supported_protocols=['file'])
+                 supported_protocols=['file'],
+                 # Snapshots do not work with data_file
+                 unsupported_imgopts=['data_file'])
diff --git a/tests/qemu-iotests/065 b/tests/qemu-iotests/065
index 5b21eb96bd..9db9552784 100755
--- a/tests/qemu-iotests/065
+++ b/tests/qemu-iotests/065
@@ -130,4 +130,6 @@  TestQMP = None
 
 if __name__ == '__main__':
     iotests.main(supported_fmts=['qcow2'],
-                 supported_protocols=['file'])
+                 supported_protocols=['file'],
+                 # Neither of these options would work with compat=0.10
+                 unsupported_imgopts=['refcount_bits', 'data_file'])
diff --git a/tests/qemu-iotests/163 b/tests/qemu-iotests/163
index d94728e080..92633f1b21 100755
--- a/tests/qemu-iotests/163
+++ b/tests/qemu-iotests/163
@@ -168,4 +168,7 @@  ShrinkBaseClass = None
 
 if __name__ == '__main__':
     iotests.main(supported_fmts=['raw', 'qcow2'],
-                 supported_protocols=['file'])
+                 supported_protocols=['file'],
+                 # We want to set our own refcount_bits, and that will
+                 # not work with compat=0.10
+                 unsupported_imgopts=['refcount_bits', 'compat=0.10'])
diff --git a/tests/qemu-iotests/165 b/tests/qemu-iotests/165
index 5650dc7c87..97dd7102c3 100755
--- a/tests/qemu-iotests/165
+++ b/tests/qemu-iotests/165
@@ -104,4 +104,6 @@  class TestPersistentDirtyBitmap(iotests.QMPTestCase):
 
 if __name__ == '__main__':
     iotests.main(supported_fmts=['qcow2'],
-                 supported_protocols=['file'])
+                 supported_protocols=['file'],
+                 # compat=1.1 is needed for dirty bitmaps
+                 unsupported_imgopts=['compat=0.10'])
diff --git a/tests/qemu-iotests/196 b/tests/qemu-iotests/196
index 92fe9244f8..ec4852a19c 100755
--- a/tests/qemu-iotests/196
+++ b/tests/qemu-iotests/196
@@ -64,4 +64,6 @@  class TestInvalidateAutoclear(iotests.QMPTestCase):
 
 if __name__ == '__main__':
     iotests.main(supported_fmts=['qcow2'],
-                 supported_protocols=['file'])
+                 supported_protocols=['file'],
+                 # compat=1.1 is needed for autoclear flags
+                 unsupported_imgopts=['compat=0.10'])
diff --git a/tests/qemu-iotests/206 b/tests/qemu-iotests/206
index 23ff2f624b..91dd6ee176 100755
--- a/tests/qemu-iotests/206
+++ b/tests/qemu-iotests/206
@@ -23,7 +23,10 @@ 
 import iotests
 from iotests import imgfmt
 
-iotests.script_initialize(supported_fmts=['qcow2'])
+iotests.script_initialize(supported_fmts=['qcow2'],
+                          # All options are ignored
+                          unsupported_imgopts=['compat=0.10', 'refcount_bits',
+                                               'data_file'])
 
 def blockdev_create(vm, options):
     result = vm.qmp_log('blockdev-create',
diff --git a/tests/qemu-iotests/222 b/tests/qemu-iotests/222
index 6788979ed3..ffa88d4bb9 100644
--- a/tests/qemu-iotests/222
+++ b/tests/qemu-iotests/222
@@ -25,7 +25,8 @@  import iotests
 from iotests import log, qemu_img, qemu_io, qemu_io_silent
 
 iotests.script_initialize(supported_fmts=['qcow2', 'qcow', 'qed', 'vmdk',
-                                          'vhdx', 'raw'])
+                                          'vhdx', 'raw'],
+                          unsupported_imgopts=['streamOptimized'])
 
 patterns = [("0x5d", "0",         "64k"),
             ("0xd5", "1M",        "64k"),
diff --git a/tests/qemu-iotests/237 b/tests/qemu-iotests/237
index 3758ace0bc..34ff4b55db 100755
--- a/tests/qemu-iotests/237
+++ b/tests/qemu-iotests/237
@@ -24,7 +24,9 @@  import math
 import iotests
 from iotests import imgfmt
 
-iotests.script_initialize(supported_fmts=['vmdk'])
+iotests.script_initialize(supported_fmts=['vmdk'],
+                          # All options are ignored
+                          unsupported_imgopts=['subformat'])
 
 def blockdev_create(vm, options):
     result = vm.qmp_log('blockdev-create', job_id='job0', options=options,
diff --git a/tests/qemu-iotests/242 b/tests/qemu-iotests/242
index 21f69a0d2c..333fb8b56c 100755
--- a/tests/qemu-iotests/242
+++ b/tests/qemu-iotests/242
@@ -24,7 +24,9 @@  import struct
 from iotests import qemu_img_create, qemu_io, qemu_img_pipe, \
     file_path, img_info_log, log, filter_qemu_io
 
-iotests.script_initialize(supported_fmts=['qcow2'])
+iotests.script_initialize(supported_fmts=['qcow2'],
+                          # compat=1.1 is needed for dirty bitmaps
+                          unsupported_imgopts=['compat=0.10'])
 
 disk = file_path('disk')
 chunk = 256 * 1024
diff --git a/tests/qemu-iotests/245 b/tests/qemu-iotests/245
index 50544a7836..72ab2a248d 100644
--- a/tests/qemu-iotests/245
+++ b/tests/qemu-iotests/245
@@ -1002,4 +1002,6 @@  class TestBlockdevReopen(iotests.QMPTestCase):
 if __name__ == '__main__':
     iotests.activate_logging()
     iotests.main(supported_fmts=["qcow2"],
-                 supported_protocols=["file"])
+                 supported_protocols=["file"],
+                 # reopen options differ with an external data file
+                 unsupported_imgopts=['data_file'])
diff --git a/tests/qemu-iotests/246 b/tests/qemu-iotests/246
index 1d7747d62d..d1364d5901 100755
--- a/tests/qemu-iotests/246
+++ b/tests/qemu-iotests/246
@@ -22,7 +22,10 @@ 
 import iotests
 from iotests import log
 
-iotests.script_initialize(supported_fmts=['qcow2'])
+iotests.script_initialize(supported_fmts=['qcow2'],
+                          # compat=1.1 is needed for dirty bitmaps
+                          unsupported_imgopts=['compat=0.10'])
+
 size = 64 * 1024 * 1024 * 1024
 gran_small = 32 * 1024
 gran_large = 128 * 1024
diff --git a/tests/qemu-iotests/248 b/tests/qemu-iotests/248
index 781b21b227..0adc4da802 100755
--- a/tests/qemu-iotests/248
+++ b/tests/qemu-iotests/248
@@ -21,7 +21,11 @@ 
 import iotests
 from iotests import qemu_img_create, qemu_io, file_path, filter_qmp_testfiles
 
-iotests.script_initialize(supported_fmts=['qcow2'])
+iotests.script_initialize(supported_fmts=['qcow2'],
+                          # With an external data file, we would need
+                          # to impose the limit on @data-file instead
+                          # of @file
+                          unsupported_imgopts=['data_file'])
 
 source, target = file_path('source', 'target')
 size = 5 * 1024 * 1024
diff --git a/tests/qemu-iotests/254 b/tests/qemu-iotests/254
index 43b40f4f71..0404faf853 100755
--- a/tests/qemu-iotests/254
+++ b/tests/qemu-iotests/254
@@ -21,7 +21,9 @@ 
 import iotests
 from iotests import qemu_img_create, file_path, log
 
-iotests.script_initialize(supported_fmts=['qcow2'])
+iotests.script_initialize(supported_fmts=['qcow2'],
+                          # compat=1.1 is needed for dirty bitmaps
+                          unsupported_imgopts=['compat=0.10'])
 
 disk, top = file_path('disk', 'top')
 size = 1024 * 1024
diff --git a/tests/qemu-iotests/257 b/tests/qemu-iotests/257
index de8b45f094..82c10e9b52 100755
--- a/tests/qemu-iotests/257
+++ b/tests/qemu-iotests/257
@@ -526,4 +526,6 @@  def main():
 
 if __name__ == '__main__':
     iotests.script_main(main, supported_fmts=['qcow2'],
-                        supported_protocols=['file'])
+                        supported_protocols=['file'],
+                        # blkdebug does not work with an external data file
+                        unsupported_imgopts=['data_file'])