iotest 065: explicit compression type
The test checks different options. It of course fails if set IMGOPTS='compression_type=zstd'. So, let's be explicit in what compression type we want and independent of IMGOPTS. Test both existing compression types. Signed-off-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com> Reviewed-by: Hanna Reitz <hreitz@redhat.com> Message-Id: <20211223160144.1097696-9-vsementsov@virtuozzo.com> Signed-off-by: Hanna Reitz <hreitz@redhat.com>
This commit is contained in:
parent
677e0bae68
commit
12a936171d
@ -88,7 +88,7 @@ class TestQMP(TestImageInfoSpecific):
|
|||||||
|
|
||||||
class TestQCow2(TestQemuImgInfo):
|
class TestQCow2(TestQemuImgInfo):
|
||||||
'''Testing a qcow2 version 2 image'''
|
'''Testing a qcow2 version 2 image'''
|
||||||
img_options = 'compat=0.10'
|
img_options = 'compat=0.10,compression_type=zlib'
|
||||||
json_compare = { 'compat': '0.10', 'refcount-bits': 16,
|
json_compare = { 'compat': '0.10', 'refcount-bits': 16,
|
||||||
'compression-type': 'zlib' }
|
'compression-type': 'zlib' }
|
||||||
human_compare = [ 'compat: 0.10', 'compression type: zlib',
|
human_compare = [ 'compat: 0.10', 'compression type: zlib',
|
||||||
@ -96,17 +96,17 @@ class TestQCow2(TestQemuImgInfo):
|
|||||||
|
|
||||||
class TestQCow3NotLazy(TestQemuImgInfo):
|
class TestQCow3NotLazy(TestQemuImgInfo):
|
||||||
'''Testing a qcow2 version 3 image with lazy refcounts disabled'''
|
'''Testing a qcow2 version 3 image with lazy refcounts disabled'''
|
||||||
img_options = 'compat=1.1,lazy_refcounts=off'
|
img_options = 'compat=1.1,lazy_refcounts=off,compression_type=zstd'
|
||||||
json_compare = { 'compat': '1.1', 'lazy-refcounts': False,
|
json_compare = { 'compat': '1.1', 'lazy-refcounts': False,
|
||||||
'refcount-bits': 16, 'corrupt': False,
|
'refcount-bits': 16, 'corrupt': False,
|
||||||
'compression-type': 'zlib', 'extended-l2': False }
|
'compression-type': 'zstd', 'extended-l2': False }
|
||||||
human_compare = [ 'compat: 1.1', 'compression type: zlib',
|
human_compare = [ 'compat: 1.1', 'compression type: zstd',
|
||||||
'lazy refcounts: false', 'refcount bits: 16',
|
'lazy refcounts: false', 'refcount bits: 16',
|
||||||
'corrupt: false', 'extended l2: false' ]
|
'corrupt: false', 'extended l2: false' ]
|
||||||
|
|
||||||
class TestQCow3Lazy(TestQemuImgInfo):
|
class TestQCow3Lazy(TestQemuImgInfo):
|
||||||
'''Testing a qcow2 version 3 image with lazy refcounts enabled'''
|
'''Testing a qcow2 version 3 image with lazy refcounts enabled'''
|
||||||
img_options = 'compat=1.1,lazy_refcounts=on'
|
img_options = 'compat=1.1,lazy_refcounts=on,compression_type=zlib'
|
||||||
json_compare = { 'compat': '1.1', 'lazy-refcounts': True,
|
json_compare = { 'compat': '1.1', 'lazy-refcounts': True,
|
||||||
'refcount-bits': 16, 'corrupt': False,
|
'refcount-bits': 16, 'corrupt': False,
|
||||||
'compression-type': 'zlib', 'extended-l2': False }
|
'compression-type': 'zlib', 'extended-l2': False }
|
||||||
@ -117,7 +117,7 @@ class TestQCow3Lazy(TestQemuImgInfo):
|
|||||||
class TestQCow3NotLazyQMP(TestQMP):
|
class TestQCow3NotLazyQMP(TestQMP):
|
||||||
'''Testing a qcow2 version 3 image with lazy refcounts disabled, opening
|
'''Testing a qcow2 version 3 image with lazy refcounts disabled, opening
|
||||||
with lazy refcounts enabled'''
|
with lazy refcounts enabled'''
|
||||||
img_options = 'compat=1.1,lazy_refcounts=off'
|
img_options = 'compat=1.1,lazy_refcounts=off,compression_type=zlib'
|
||||||
qemu_options = 'lazy-refcounts=on'
|
qemu_options = 'lazy-refcounts=on'
|
||||||
compare = { 'compat': '1.1', 'lazy-refcounts': False,
|
compare = { 'compat': '1.1', 'lazy-refcounts': False,
|
||||||
'refcount-bits': 16, 'corrupt': False,
|
'refcount-bits': 16, 'corrupt': False,
|
||||||
@ -127,11 +127,11 @@ class TestQCow3NotLazyQMP(TestQMP):
|
|||||||
class TestQCow3LazyQMP(TestQMP):
|
class TestQCow3LazyQMP(TestQMP):
|
||||||
'''Testing a qcow2 version 3 image with lazy refcounts enabled, opening
|
'''Testing a qcow2 version 3 image with lazy refcounts enabled, opening
|
||||||
with lazy refcounts disabled'''
|
with lazy refcounts disabled'''
|
||||||
img_options = 'compat=1.1,lazy_refcounts=on'
|
img_options = 'compat=1.1,lazy_refcounts=on,compression_type=zstd'
|
||||||
qemu_options = 'lazy-refcounts=off'
|
qemu_options = 'lazy-refcounts=off'
|
||||||
compare = { 'compat': '1.1', 'lazy-refcounts': True,
|
compare = { 'compat': '1.1', 'lazy-refcounts': True,
|
||||||
'refcount-bits': 16, 'corrupt': False,
|
'refcount-bits': 16, 'corrupt': False,
|
||||||
'compression-type': 'zlib', 'extended-l2': False }
|
'compression-type': 'zstd', 'extended-l2': False }
|
||||||
|
|
||||||
TestImageInfoSpecific = None
|
TestImageInfoSpecific = None
|
||||||
TestQemuImgInfo = None
|
TestQemuImgInfo = None
|
||||||
|
Loading…
Reference in New Issue
Block a user