mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
qapi: Add corrupt field to ImageInfoSpecificQCow2
Just like lazy-refcounts, this field will be present iff the qcow2 compat level is 1.1 (or probably any future revision). As expected, this breaks some tests due to the new field present in qemu-img info output; so fix their output accordingly. Suggested-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1412105489-7681-3-git-send-email-mreitz@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
parent
1b53eab270
commit
9009b1963c
6 changed files with 28 additions and 12 deletions
|
@ -94,28 +94,28 @@ class TestQCow2(TestQemuImgInfo):
|
|||
class TestQCow3NotLazy(TestQemuImgInfo):
|
||||
'''Testing a qcow2 version 3 image with lazy refcounts disabled'''
|
||||
img_options = 'compat=1.1,lazy_refcounts=off'
|
||||
json_compare = { 'compat': '1.1', 'lazy-refcounts': False }
|
||||
human_compare = [ 'compat: 1.1', 'lazy refcounts: false' ]
|
||||
json_compare = { 'compat': '1.1', 'lazy-refcounts': False, 'corrupt': False }
|
||||
human_compare = [ 'compat: 1.1', 'lazy refcounts: false', 'corrupt: false' ]
|
||||
|
||||
class TestQCow3Lazy(TestQemuImgInfo):
|
||||
'''Testing a qcow2 version 3 image with lazy refcounts enabled'''
|
||||
img_options = 'compat=1.1,lazy_refcounts=on'
|
||||
json_compare = { 'compat': '1.1', 'lazy-refcounts': True }
|
||||
human_compare = [ 'compat: 1.1', 'lazy refcounts: true' ]
|
||||
json_compare = { 'compat': '1.1', 'lazy-refcounts': True, 'corrupt': False }
|
||||
human_compare = [ 'compat: 1.1', 'lazy refcounts: true', 'corrupt: false' ]
|
||||
|
||||
class TestQCow3NotLazyQMP(TestQMP):
|
||||
'''Testing a qcow2 version 3 image with lazy refcounts disabled, opening
|
||||
with lazy refcounts enabled'''
|
||||
img_options = 'compat=1.1,lazy_refcounts=off'
|
||||
qemu_options = 'lazy-refcounts=on'
|
||||
compare = { 'compat': '1.1', 'lazy-refcounts': False }
|
||||
compare = { 'compat': '1.1', 'lazy-refcounts': False, 'corrupt': False }
|
||||
|
||||
class TestQCow3LazyQMP(TestQMP):
|
||||
'''Testing a qcow2 version 3 image with lazy refcounts enabled, opening
|
||||
with lazy refcounts disabled'''
|
||||
img_options = 'compat=1.1,lazy_refcounts=on'
|
||||
qemu_options = 'lazy-refcounts=off'
|
||||
compare = { 'compat': '1.1', 'lazy-refcounts': True }
|
||||
compare = { 'compat': '1.1', 'lazy-refcounts': True, 'corrupt': False }
|
||||
|
||||
TestImageInfoSpecific = None
|
||||
TestQemuImgInfo = None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue