diff options
Diffstat (limited to 'repo/virt-manager/fix-latest-libvirt-xml-output.patch')
-rw-r--r-- | repo/virt-manager/fix-latest-libvirt-xml-output.patch | 108 |
1 files changed, 108 insertions, 0 deletions
diff --git a/repo/virt-manager/fix-latest-libvirt-xml-output.patch b/repo/virt-manager/fix-latest-libvirt-xml-output.patch new file mode 100644 index 0000000..f81c44d --- /dev/null +++ b/repo/virt-manager/fix-latest-libvirt-xml-output.patch @@ -0,0 +1,108 @@ +From 87ce425197c2d6bfaf675dc4c0f92a2f615a39a5 Mon Sep 17 00:00:00 2001 +From: Cole Robinson <crobinso@redhat.com> +Date: Tue, 6 Apr 2021 15:21:00 -0400 +Subject: [PATCH] tests: storage: Fix with latest libvirt XML output +Patch-Source: https://github.com/virt-manager/virt-manager/commit/87ce425197c2d6bfaf675dc4c0f92a2f615a39a5 + +Signed-off-by: Cole Robinson <crobinso@redhat.com> +--- + tests/data/storage/pool-fs-volclone.xml | 2 -- + tests/data/storage/pool-logical-volclone.xml | 2 -- + tests/data/storage/pool-netfs-volclone.xml | 2 -- + tests/test_storage.py | 11 ++++++----- + 6 files changed, 6 insertions(+), 15 deletions(-) + +diff --git a/tests/data/storage/pool-fs-volclone.xml b/tests/data/storage/pool-fs-volclone.xml +index 34e8cd088..6c7d3b9dd 100644 +--- a/tests/data/storage/pool-fs-volclone.xml ++++ b/tests/data/storage/pool-fs-volclone.xml +@@ -1,8 +1,6 @@ + <volume type="file"> + <name>pool-fs-volclone</name> + <key>/var/lib/libvirt/images/pool-fs/pool-fs-vol</key> +- <source> +- </source> + <capacity unit="bytes">10737418240</capacity> + <allocation unit="bytes">5368709120</allocation> + <target> +diff --git a/tests/data/storage/pool-logical-volclone.xml b/tests/data/storage/pool-logical-volclone.xml +index c012017ef..8abcfa64c 100644 +--- a/tests/data/storage/pool-logical-volclone.xml ++++ b/tests/data/storage/pool-logical-volclone.xml +@@ -1,8 +1,6 @@ + <volume type="file"> + <name>pool-logical-volclone</name> + <key>/dev/pool-logical/pool-logical-vol</key> +- <source> +- </source> + <capacity unit="bytes">10737418240</capacity> + <allocation unit="bytes">10737418240</allocation> + <target> +diff --git a/tests/data/storage/pool-netfs-volclone.xml b/tests/data/storage/pool-netfs-volclone.xml +index b6b39f79d..b7fd26507 100644 +--- a/tests/data/storage/pool-netfs-volclone.xml ++++ b/tests/data/storage/pool-netfs-volclone.xml +@@ -1,8 +1,6 @@ + <volume type="file"> + <name>pool-netfs-volclone</name> + <key>/var/lib/libvirt/images/pool-netfs/pool-netfs-vol</key> +- <source> +- </source> + <capacity unit="bytes">10737418240</capacity> + <allocation unit="bytes">5368709120</allocation> + <target> +diff --git a/tests/test_storage.py b/tests/test_storage.py +index ee33ab32e..ba0e4e711 100644 +--- a/tests/test_storage.py ++++ b/tests/test_storage.py +@@ -65,11 +65,6 @@ def createVol(conn, poolobj, volname=None, input_vol=None, clone_vol=None): + if volname is None: + volname = poolobj.name() + "-vol" + +- # Format here depends on libvirt-1.2.0 and later +- if clone_vol and conn.local_libvirt_version() < 1002000: +- log.debug("skip clone compare") +- return +- + alloc = 5 * 1024 * 1024 * 1024 + cap = 10 * 1024 * 1024 * 1024 + vol_inst = StorageVolume(conn) +@@ -91,6 +86,12 @@ def createVol(conn, poolobj, volname=None, input_vol=None, clone_vol=None): + + vol_inst.validate() + filename = os.path.join(BASEPATH, vol_inst.name + ".xml") ++ ++ # Format here depends on libvirt-7.2.0 and later ++ if clone_vol and conn.local_libvirt_version() < 7002000: ++ log.debug("skip clone compare") ++ return ++ + utils.diff_compare(vol_inst.get_xml(), filename) + return vol_inst.install(meter=False) + +diff --git a/tests/data/storage/pool-disk-volclone.xml b/tests/data/storage/pool-disk-volclone.xml +index a4e9c3d..24f71a1 100644 +--- a/tests/data/storage/pool-disk-volclone.xml ++++ b/tests/data/storage/pool-disk-volclone.xml +@@ -1,8 +1,6 @@ + <volume type="file"> + <name>pool-disk-volclone</name> + <key>/dev/pool-disk-vol</key> +- <source> +- </source> + <capacity unit="bytes">10737418240</capacity> + <allocation unit="bytes">5368709120</allocation> + <target> +diff --git a/tests/data/storage/pool-dir-volclone.xml b/tests/data/storage/pool-dir-volclone.xml +index c8bde66..16f1e56 100644 +--- a/tests/data/storage/pool-dir-volclone.xml ++++ b/tests/data/storage/pool-dir-volclone.xml +@@ -1,8 +1,6 @@ + <volume type="file"> + <name>pool-dir-volclone</name> + <key>/var/lib/libvirt/images/pool-dir/pool-dir-vol</key> +- <source> +- </source> + <capacity unit="bytes">10737418240</capacity> + <allocation unit="bytes">5368709120</allocation> + <target> |