Message ID | 20211203130737.2924594-20-vsementsov@virtuozzo.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | iotests: support zstd | expand |
On 03.12.21 14:07, Vladimir Sementsov-Ogievskiy wrote: > We support IMGOPTS for python iotests now. Still a lot of tests are > unprepared to common IMGOPTS that are used with bash iotests. So we > should define corresponding unsupported_imgopts. > > Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> > --- > tests/qemu-iotests/044 | 3 ++- > tests/qemu-iotests/065 | 3 ++- > tests/qemu-iotests/163 | 3 ++- > tests/qemu-iotests/165 | 3 ++- > tests/qemu-iotests/196 | 3 ++- > tests/qemu-iotests/242 | 3 ++- > tests/qemu-iotests/246 | 3 ++- > tests/qemu-iotests/254 | 3 ++- > tests/qemu-iotests/260 | 4 ++-- > tests/qemu-iotests/274 | 3 ++- > tests/qemu-iotests/281 | 3 ++- > tests/qemu-iotests/303 | 3 ++- > tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test | 3 ++- > tests/qemu-iotests/tests/migrate-bitmaps-test | 3 ++- > tests/qemu-iotests/tests/migrate-during-backup | 3 ++- > tests/qemu-iotests/tests/remove-bitmap-from-backing | 3 ++- > 16 files changed, 32 insertions(+), 17 deletions(-) Few of these tests look like they could be made to support refcount_bits if we filtered qemu-img info output accordingly, but I don’t mind just marking the option as unsupported, so I’m good with your approach. > diff --git a/tests/qemu-iotests/044 b/tests/qemu-iotests/044 > index 714329eb16..a5ee9a7ded 100755 > --- a/tests/qemu-iotests/044 > +++ b/tests/qemu-iotests/044 > @@ -118,4 +118,5 @@ class TestRefcountTableGrowth(iotests.QMPTestCase): > if __name__ == '__main__': > iotests.activate_logging() > iotests.main(supported_fmts=['qcow2'], > - supported_protocols=['file']) > + supported_protocols=['file'], > + unsupported_imgopts=['refcount_bits']) > diff --git a/tests/qemu-iotests/065 b/tests/qemu-iotests/065 > index 4b3c5c6c8c..f7c1b68dad 100755 > --- a/tests/qemu-iotests/065 > +++ b/tests/qemu-iotests/065 > @@ -139,4 +139,5 @@ TestQMP = None > > if __name__ == '__main__': > iotests.main(supported_fmts=['qcow2'], > - supported_protocols=['file']) > + supported_protocols=['file'], > + unsupported_imgopts=['refcount_bits']) > diff --git a/tests/qemu-iotests/163 b/tests/qemu-iotests/163 > index dedce8ef43..0b00df519c 100755 > --- a/tests/qemu-iotests/163 > +++ b/tests/qemu-iotests/163 > @@ -169,4 +169,5 @@ ShrinkBaseClass = None > > if __name__ == '__main__': > iotests.main(supported_fmts=['raw', 'qcow2'], > - supported_protocols=['file']) > + supported_protocols=['file'], > + unsupported_imgopts=['compat=0.10']) Works for my case (I use -o compat=0.10), but compat=v2 is also allowed. For cases that don’t support anything but refcount_bits=16, you already disallow specifying any refcount_bits value, even refcount_bits=16 (which would work fine in most cases, I believe). Perhaps we should then also just disallow any compat option instead of compat=0.10 specifically? [...] > diff --git a/tests/qemu-iotests/tests/migrate-during-backup b/tests/qemu-iotests/tests/migrate-during-backup > index 34103229ee..12cc4dde2e 100755 > --- a/tests/qemu-iotests/tests/migrate-during-backup > +++ b/tests/qemu-iotests/tests/migrate-during-backup > @@ -94,4 +94,5 @@ class TestMigrateDuringBackup(iotests.QMPTestCase): > > if __name__ == '__main__': > iotests.main(supported_fmts=['qcow2'], > - supported_protocols=['file']) > + supported_protocols=['file'], > + unsupported_imgopts=['compat=0.10']) It seems to me like this test can handle compat=0.10 just fine, though. Hanna
23.12.2021 15:44, Hanna Reitz wrote: > On 03.12.21 14:07, Vladimir Sementsov-Ogievskiy wrote: >> We support IMGOPTS for python iotests now. Still a lot of tests are >> unprepared to common IMGOPTS that are used with bash iotests. So we >> should define corresponding unsupported_imgopts. >> >> Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> >> --- >> tests/qemu-iotests/044 | 3 ++- >> tests/qemu-iotests/065 | 3 ++- >> tests/qemu-iotests/163 | 3 ++- >> tests/qemu-iotests/165 | 3 ++- >> tests/qemu-iotests/196 | 3 ++- >> tests/qemu-iotests/242 | 3 ++- >> tests/qemu-iotests/246 | 3 ++- >> tests/qemu-iotests/254 | 3 ++- >> tests/qemu-iotests/260 | 4 ++-- >> tests/qemu-iotests/274 | 3 ++- >> tests/qemu-iotests/281 | 3 ++- >> tests/qemu-iotests/303 | 3 ++- >> tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test | 3 ++- >> tests/qemu-iotests/tests/migrate-bitmaps-test | 3 ++- >> tests/qemu-iotests/tests/migrate-during-backup | 3 ++- >> tests/qemu-iotests/tests/remove-bitmap-from-backing | 3 ++- >> 16 files changed, 32 insertions(+), 17 deletions(-) > > Few of these tests look like they could be made to support refcount_bits if we filtered qemu-img info output accordingly, but I don’t mind just marking the option as unsupported, so I’m good with your approach. > >> diff --git a/tests/qemu-iotests/044 b/tests/qemu-iotests/044 >> index 714329eb16..a5ee9a7ded 100755 >> --- a/tests/qemu-iotests/044 >> +++ b/tests/qemu-iotests/044 >> @@ -118,4 +118,5 @@ class TestRefcountTableGrowth(iotests.QMPTestCase): >> if __name__ == '__main__': >> iotests.activate_logging() >> iotests.main(supported_fmts=['qcow2'], >> - supported_protocols=['file']) >> + supported_protocols=['file'], >> + unsupported_imgopts=['refcount_bits']) >> diff --git a/tests/qemu-iotests/065 b/tests/qemu-iotests/065 >> index 4b3c5c6c8c..f7c1b68dad 100755 >> --- a/tests/qemu-iotests/065 >> +++ b/tests/qemu-iotests/065 >> @@ -139,4 +139,5 @@ TestQMP = None >> if __name__ == '__main__': >> iotests.main(supported_fmts=['qcow2'], >> - supported_protocols=['file']) >> + supported_protocols=['file'], >> + unsupported_imgopts=['refcount_bits']) >> diff --git a/tests/qemu-iotests/163 b/tests/qemu-iotests/163 >> index dedce8ef43..0b00df519c 100755 >> --- a/tests/qemu-iotests/163 >> +++ b/tests/qemu-iotests/163 >> @@ -169,4 +169,5 @@ ShrinkBaseClass = None >> if __name__ == '__main__': >> iotests.main(supported_fmts=['raw', 'qcow2'], >> - supported_protocols=['file']) >> + supported_protocols=['file'], >> + unsupported_imgopts=['compat=0.10']) > > Works for my case (I use -o compat=0.10), but compat=v2 is also allowed. > > For cases that don’t support anything but refcount_bits=16, you already disallow specifying any refcount_bits value, even refcount_bits=16 (which would work fine in most cases, I believe). Perhaps we should then also just disallow any compat option instead of compat=0.10 specifically? > > [...] > >> diff --git a/tests/qemu-iotests/tests/migrate-during-backup b/tests/qemu-iotests/tests/migrate-during-backup >> index 34103229ee..12cc4dde2e 100755 >> --- a/tests/qemu-iotests/tests/migrate-during-backup >> +++ b/tests/qemu-iotests/tests/migrate-during-backup >> @@ -94,4 +94,5 @@ class TestMigrateDuringBackup(iotests.QMPTestCase): >> if __name__ == '__main__': >> iotests.main(supported_fmts=['qcow2'], >> - supported_protocols=['file']) >> + supported_protocols=['file'], >> + unsupported_imgopts=['compat=0.10']) > > It seems to me like this test can handle compat=0.10 just fine, though. > Hmm, right, it works.
diff --git a/tests/qemu-iotests/044 b/tests/qemu-iotests/044 index 714329eb16..a5ee9a7ded 100755 --- a/tests/qemu-iotests/044 +++ b/tests/qemu-iotests/044 @@ -118,4 +118,5 @@ class TestRefcountTableGrowth(iotests.QMPTestCase): if __name__ == '__main__': iotests.activate_logging() iotests.main(supported_fmts=['qcow2'], - supported_protocols=['file']) + supported_protocols=['file'], + unsupported_imgopts=['refcount_bits']) diff --git a/tests/qemu-iotests/065 b/tests/qemu-iotests/065 index 4b3c5c6c8c..f7c1b68dad 100755 --- a/tests/qemu-iotests/065 +++ b/tests/qemu-iotests/065 @@ -139,4 +139,5 @@ TestQMP = None if __name__ == '__main__': iotests.main(supported_fmts=['qcow2'], - supported_protocols=['file']) + supported_protocols=['file'], + unsupported_imgopts=['refcount_bits']) diff --git a/tests/qemu-iotests/163 b/tests/qemu-iotests/163 index dedce8ef43..0b00df519c 100755 --- a/tests/qemu-iotests/163 +++ b/tests/qemu-iotests/163 @@ -169,4 +169,5 @@ ShrinkBaseClass = None if __name__ == '__main__': iotests.main(supported_fmts=['raw', 'qcow2'], - supported_protocols=['file']) + supported_protocols=['file'], + unsupported_imgopts=['compat=0.10']) diff --git a/tests/qemu-iotests/165 b/tests/qemu-iotests/165 index ce499946b8..144cf4a7de 100755 --- a/tests/qemu-iotests/165 +++ b/tests/qemu-iotests/165 @@ -157,4 +157,5 @@ class TestPersistentDirtyBitmap(iotests.QMPTestCase): if __name__ == '__main__': iotests.main(supported_fmts=['qcow2'], - supported_protocols=['file']) + supported_protocols=['file'], + unsupported_imgopts=['compat=0.10']) diff --git a/tests/qemu-iotests/196 b/tests/qemu-iotests/196 index 2451515094..fe93ebd760 100755 --- a/tests/qemu-iotests/196 +++ b/tests/qemu-iotests/196 @@ -65,4 +65,5 @@ class TestInvalidateAutoclear(iotests.QMPTestCase): if __name__ == '__main__': iotests.main(supported_fmts=['qcow2'], - supported_protocols=['file']) + supported_protocols=['file'], + unsupported_imgopts=['compat=0.10']) diff --git a/tests/qemu-iotests/242 b/tests/qemu-iotests/242 index a9b27668c2..8cdf02e8d9 100755 --- a/tests/qemu-iotests/242 +++ b/tests/qemu-iotests/242 @@ -26,7 +26,8 @@ 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'], - supported_protocols=['file']) + supported_protocols=['file'], + unsupported_imgopts=['refcount_bits', 'compat=0.10']) disk = file_path('disk') chunk = 256 * 1024 diff --git a/tests/qemu-iotests/246 b/tests/qemu-iotests/246 index 5932a0e8a9..a6fef31e1a 100755 --- a/tests/qemu-iotests/246 +++ b/tests/qemu-iotests/246 @@ -23,7 +23,8 @@ import iotests from iotests import log -iotests.script_initialize(supported_fmts=['qcow2']) +iotests.script_initialize(supported_fmts=['qcow2'], + unsupported_imgopts=['compat=0.10']) size = 64 * 1024 * 1024 * 1024 gran_small = 32 * 1024 gran_large = 128 * 1024 diff --git a/tests/qemu-iotests/254 b/tests/qemu-iotests/254 index 108bf5f894..5f08541214 100755 --- a/tests/qemu-iotests/254 +++ b/tests/qemu-iotests/254 @@ -22,7 +22,8 @@ import iotests from iotests import qemu_img_create, file_path, log -iotests.script_initialize(supported_fmts=['qcow2']) +iotests.script_initialize(supported_fmts=['qcow2'], + unsupported_imgopts=['compat=0.10']) disk, top = file_path('disk', 'top') size = 1024 * 1024 diff --git a/tests/qemu-iotests/260 b/tests/qemu-iotests/260 index 2ec64a9b99..c7b701a094 100755 --- a/tests/qemu-iotests/260 +++ b/tests/qemu-iotests/260 @@ -23,8 +23,8 @@ import iotests from iotests import qemu_img_create, file_path, log, filter_qmp_event iotests.script_initialize( - supported_fmts=['qcow2'] -) + supported_fmts=['qcow2'], + unsupported_imgopts=['compat=0.10']) base, top = file_path('base', 'top') size = 64 * 1024 * 3 diff --git a/tests/qemu-iotests/274 b/tests/qemu-iotests/274 index caab008e07..70a2f9573b 100755 --- a/tests/qemu-iotests/274 +++ b/tests/qemu-iotests/274 @@ -23,7 +23,8 @@ import iotests iotests.script_initialize(supported_fmts=['qcow2'], - supported_platforms=['linux']) + supported_platforms=['linux'], + unsupported_imgopts=['refcount_bits', 'compat=0.10']) size_short = 1 * 1024 * 1024 size_long = 2 * 1024 * 1024 diff --git a/tests/qemu-iotests/281 b/tests/qemu-iotests/281 index 956698083f..66e0aa91c9 100755 --- a/tests/qemu-iotests/281 +++ b/tests/qemu-iotests/281 @@ -245,4 +245,5 @@ class TestBlockdevBackupAbort(iotests.QMPTestCase): if __name__ == '__main__': iotests.main(supported_fmts=['qcow2'], - supported_protocols=['file']) + supported_protocols=['file'], + unsupported_imgopts=['compat=0.10']) diff --git a/tests/qemu-iotests/303 b/tests/qemu-iotests/303 index 9dee2bdfb8..d621d37b82 100755 --- a/tests/qemu-iotests/303 +++ b/tests/qemu-iotests/303 @@ -23,7 +23,8 @@ import iotests import subprocess from iotests import qemu_img_create, qemu_io, file_path, log, filter_qemu_io -iotests.script_initialize(supported_fmts=['qcow2']) +iotests.script_initialize(supported_fmts=['qcow2'], + unsupported_imgopts=['refcount_bits', 'compat=0.10']) disk = file_path('disk') chunk = 1024 * 1024 diff --git a/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test b/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test index 00ebb5c251..0e89fc1dc0 100755 --- a/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test +++ b/tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test @@ -272,4 +272,5 @@ class TestDirtyBitmapPostcopyMigration(iotests.QMPTestCase): if __name__ == '__main__': - iotests.main(supported_fmts=['qcow2']) + iotests.main(supported_fmts=['qcow2'], + unsupported_imgopts=['compat=0.10']) diff --git a/tests/qemu-iotests/tests/migrate-bitmaps-test b/tests/qemu-iotests/tests/migrate-bitmaps-test index c23df3d75c..a6a6437c62 100755 --- a/tests/qemu-iotests/tests/migrate-bitmaps-test +++ b/tests/qemu-iotests/tests/migrate-bitmaps-test @@ -307,7 +307,8 @@ def main() -> None: iotests.main( supported_fmts=['qcow2'], - supported_protocols=['file'] + supported_protocols=['file'], + unsupported_imgopts=['compat=0.10'] ) diff --git a/tests/qemu-iotests/tests/migrate-during-backup b/tests/qemu-iotests/tests/migrate-during-backup index 34103229ee..12cc4dde2e 100755 --- a/tests/qemu-iotests/tests/migrate-during-backup +++ b/tests/qemu-iotests/tests/migrate-during-backup @@ -94,4 +94,5 @@ class TestMigrateDuringBackup(iotests.QMPTestCase): if __name__ == '__main__': iotests.main(supported_fmts=['qcow2'], - supported_protocols=['file']) + supported_protocols=['file'], + unsupported_imgopts=['compat=0.10']) diff --git a/tests/qemu-iotests/tests/remove-bitmap-from-backing b/tests/qemu-iotests/tests/remove-bitmap-from-backing index 8d48fc0f3c..da4d0b9c7e 100755 --- a/tests/qemu-iotests/tests/remove-bitmap-from-backing +++ b/tests/qemu-iotests/tests/remove-bitmap-from-backing @@ -21,7 +21,8 @@ import iotests from iotests import log, qemu_img_create, qemu_img, qemu_img_pipe -iotests.script_initialize(supported_fmts=['qcow2']) +iotests.script_initialize(supported_fmts=['qcow2'], + unsupported_imgopts=['compat=0.10']) top, base = iotests.file_path('top', 'base') size = '1M'
We support IMGOPTS for python iotests now. Still a lot of tests are unprepared to common IMGOPTS that are used with bash iotests. So we should define corresponding unsupported_imgopts. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> --- tests/qemu-iotests/044 | 3 ++- tests/qemu-iotests/065 | 3 ++- tests/qemu-iotests/163 | 3 ++- tests/qemu-iotests/165 | 3 ++- tests/qemu-iotests/196 | 3 ++- tests/qemu-iotests/242 | 3 ++- tests/qemu-iotests/246 | 3 ++- tests/qemu-iotests/254 | 3 ++- tests/qemu-iotests/260 | 4 ++-- tests/qemu-iotests/274 | 3 ++- tests/qemu-iotests/281 | 3 ++- tests/qemu-iotests/303 | 3 ++- tests/qemu-iotests/tests/migrate-bitmaps-postcopy-test | 3 ++- tests/qemu-iotests/tests/migrate-bitmaps-test | 3 ++- tests/qemu-iotests/tests/migrate-during-backup | 3 ++- tests/qemu-iotests/tests/remove-bitmap-from-backing | 3 ++- 16 files changed, 32 insertions(+), 17 deletions(-)