After changing the default qcow2 image to 1.1 from 0.10. Some of the
testcases in `storagevolxml2` here need fixing. This patch changes the
expected compat version in each of these files that call qemu-img.
As per qemu's Qcow docs the qemu-img command gives a 1.1 compatible
version image. These testcases are written for 0.10, and should be
upgraded.
Also there is a testcase `qcow2-1.1.argv`. Which is aimed at testing
1.1 version specifically, I think a new testcase should be made to
replace it called `qcow2-0.10.argv`. This requires renaming test files
and changes at many places, not sure so didn't include in the patch.
Resolves:
https://gitlab.com/libvirt/libvirt/-/issues/602
Signed-off-by: Abhiram Tilak <atp.exp(a)gmail.com>
---
.../storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv | 2 +-
tests/storagevolxml2argvdata/qcow2-compat.argv | 2 +-
tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv | 2 +-
tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt.argv | 2 +-
.../qcow2-luks-convert-encrypt2fileqcow2.argv | 2 +-
tests/storagevolxml2argvdata/qcow2-luks.argv | 2 +-
.../qcow2-nobacking-convert-prealloc-compat.argv | 2 +-
.../storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.argv | 2 +-
.../qcow2-nocapacity-convert-prealloc.argv | 2 +-
tests/storagevolxml2argvdata/qcow2-nocapacity.argv | 2 +-
tests/storagevolxml2argvdata/qcow2-nocow-compat.argv | 2 +-
tests/storagevolxml2argvdata/qcow2-zerocapacity.argv | 2 +-
12 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv
b/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv
index 4b9ccfe8dc..705604b162 100644
--- a/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv
+++ b/tests/storagevolxml2argvdata/luks-convert-encrypt2fileqcow2.argv
@@ -1,7 +1,7 @@
qemu-img \
create \
-f qcow2 \
--o compat=0.10 \
+-o compat=1.1 \
/var/lib/libvirt/images/sparse-qcow2.img \
1073741824K
qemu-img \
diff --git a/tests/storagevolxml2argvdata/qcow2-compat.argv
b/tests/storagevolxml2argvdata/qcow2-compat.argv
index bf3a50a7f3..40fbe065e0 100644
--- a/tests/storagevolxml2argvdata/qcow2-compat.argv
+++ b/tests/storagevolxml2argvdata/qcow2-compat.argv
@@ -2,6 +2,6 @@ qemu-img \
create \
-f qcow2 \
-b /dev/null \
--o backing_fmt=raw,compat=0.10 \
+-o backing_fmt=raw,compat=1.1 \
/var/lib/libvirt/images/OtherDemo.img \
5242880K
diff --git a/tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv
b/tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv
index dbc7deb16a..b68da425d9 100644
--- a/tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv
+++ b/tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv
@@ -2,6 +2,6 @@ qemu-img \
convert \
-f raw \
-O qcow2 \
--o compat=0.10 \
+-o compat=1.1 \
/dev/HostVG/Swap \
/var/lib/libvirt/images/OtherDemo.img
diff --git a/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt.argv
b/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt.argv
index d89622d4a6..3068b4b38d 100644
--- a/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt.argv
+++ b/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt.argv
@@ -2,7 +2,7 @@ qemu-img \
create \
-f qcow2 \
--object secret,id=OtherDemoLuks.img_encrypt0,file=/path/to/secretFile \
--o encrypt.format=luks,encrypt.key-secret=OtherDemoLuks.img_encrypt0,compat=0.10 \
+-o encrypt.format=luks,encrypt.key-secret=OtherDemoLuks.img_encrypt0,compat=1.1 \
/var/lib/libvirt/images/OtherDemoLuks.img \
5242880K
qemu-img \
diff --git a/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2fileqcow2.argv
b/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2fileqcow2.argv
index 4d910552d0..948e9ac66d 100644
--- a/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2fileqcow2.argv
+++ b/tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2fileqcow2.argv
@@ -1,7 +1,7 @@
qemu-img \
create \
-f qcow2 \
--o compat=0.10 \
+-o compat=1.1 \
/var/lib/libvirt/images/sparse-qcow2.img \
1073741824K
qemu-img \
diff --git a/tests/storagevolxml2argvdata/qcow2-luks.argv
b/tests/storagevolxml2argvdata/qcow2-luks.argv
index 308316c90c..a3be41a406 100644
--- a/tests/storagevolxml2argvdata/qcow2-luks.argv
+++ b/tests/storagevolxml2argvdata/qcow2-luks.argv
@@ -3,6 +3,6 @@ create \
-f qcow2 \
-b /dev/null \
--object secret,id=OtherDemoLuks.img_encrypt0,file=/path/to/secretFile \
--o
backing_fmt=raw,encrypt.format=luks,encrypt.key-secret=OtherDemoLuks.img_encrypt0,compat=0.10
\
+-o
backing_fmt=raw,encrypt.format=luks,encrypt.key-secret=OtherDemoLuks.img_encrypt0,compat=1.1
\
/var/lib/libvirt/images/OtherDemoLuks.img \
5242880K
diff --git a/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc-compat.argv
b/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc-compat.argv
index 463ae26779..a130ed8894 100644
--- a/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc-compat.argv
+++ b/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc-compat.argv
@@ -2,6 +2,6 @@ qemu-img \
convert \
-f raw \
-O qcow2 \
--o preallocation=metadata,compat=0.10 \
+-o preallocation=metadata,compat=1.1 \
/var/lib/libvirt/images/sparse.img \
/var/lib/libvirt/images/OtherDemo.img
diff --git a/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.argv
b/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.argv
index 510e0c13f6..440ad8f122 100644
--- a/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.argv
+++ b/tests/storagevolxml2argvdata/qcow2-nobacking-prealloc-compat.argv
@@ -1,6 +1,6 @@
qemu-img \
create \
-f qcow2 \
--o preallocation=metadata,compat=0.10 \
+-o preallocation=metadata,compat=1.1 \
/var/lib/libvirt/images/OtherDemo.img \
5242880K
diff --git a/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv
b/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv
index 0152b1efb6..3bf8613d72 100644
--- a/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv
+++ b/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv
@@ -2,6 +2,6 @@ qemu-img \
convert \
-f raw \
-O qcow2 \
--o preallocation=falloc,compat=0.10 \
+-o preallocation=falloc,compat=1.1 \
/var/lib/libvirt/images/sparse.img \
/var/lib/libvirt/images/OtherDemo.img
diff --git a/tests/storagevolxml2argvdata/qcow2-nocapacity.argv
b/tests/storagevolxml2argvdata/qcow2-nocapacity.argv
index 047932a559..924c5c6084 100644
--- a/tests/storagevolxml2argvdata/qcow2-nocapacity.argv
+++ b/tests/storagevolxml2argvdata/qcow2-nocapacity.argv
@@ -2,5 +2,5 @@ qemu-img \
create \
-f qcow2 \
-b /dev/null \
--o backing_fmt=raw,compat=0.10 \
+-o backing_fmt=raw,compat=1.1 \
/var/lib/libvirt/images/OtherDemo.img
diff --git a/tests/storagevolxml2argvdata/qcow2-nocow-compat.argv
b/tests/storagevolxml2argvdata/qcow2-nocow-compat.argv
index 4cc7904cfc..ae94e4e588 100644
--- a/tests/storagevolxml2argvdata/qcow2-nocow-compat.argv
+++ b/tests/storagevolxml2argvdata/qcow2-nocow-compat.argv
@@ -2,6 +2,6 @@ qemu-img \
create \
-f qcow2 \
-b /dev/null \
--o backing_fmt=raw,nocow=on,compat=0.10 \
+-o backing_fmt=raw,nocow=on,compat=1.1 \
/var/lib/libvirt/images/OtherDemo.img \
5242880K
diff --git a/tests/storagevolxml2argvdata/qcow2-zerocapacity.argv
b/tests/storagevolxml2argvdata/qcow2-zerocapacity.argv
index 607c642e6f..05e31509cb 100644
--- a/tests/storagevolxml2argvdata/qcow2-zerocapacity.argv
+++ b/tests/storagevolxml2argvdata/qcow2-zerocapacity.argv
@@ -1,6 +1,6 @@
qemu-img \
create \
-f qcow2 \
--o compat=0.10 \
+-o compat=1.1 \
/var/lib/libvirt/images/OtherDemo.img \
0K
--
2.42.1