
On 05/21/2018 12:46 PM, Daniel P. Berrangé wrote:
Support for the 'cow' format was delete from QEMU so will always throw an error if tried in libvirt with modern QEMU
commit 550830f9351291c585c963204ad9127998b1c1ce Author: Stefan Hajnoczi <stefanha@redhat.com> Date: Tue Sep 16 15:24:24 2014 +0100
block: delete cow block driver
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Laine Stump <laine@laine.org>
--- scripts/storage/100-create-vol-dir.t | 19 +------------------ scripts/storage/200-clone-vol-dir.t | 4 ++-- 2 files changed, 3 insertions(+), 20 deletions(-)
diff --git a/scripts/storage/100-create-vol-dir.t b/scripts/storage/100-create-vol-dir.t index 574e61a..952012c 100644 --- a/scripts/storage/100-create-vol-dir.t +++ b/scripts/storage/100-create-vol-dir.t @@ -28,7 +28,7 @@ with a filesystem pool. use strict; use warnings;
-use Test::More tests => 33; +use Test::More tests => 29;
So you've removed to calls to ok(), one to ok_volume(), and one to lives_ok(), so that checks out (and the test succeeds :-)
use Sys::Virt::TCK; use Test::Exception; @@ -56,7 +56,6 @@ lives_ok(sub { $pool->create }, "started storage pool");
my $volsparsexml = $tck->generic_volume("tck1", "raw", 1024*1024*50)->allocation(0)->as_xml; my $volallocxml = $tck->generic_volume("tck2", "raw", 1024*1024*50)->allocation(1024*1024*50)->as_xml; -my $volcowxml = $tck->generic_volume("tck3", "cow", 1024*1024*50)->as_xml; my $volqcow1xml = $tck->generic_volume("tck4", "qcow", 1024*1024*50)->as_xml; my $volqcow2xml = $tck->generic_volume("tck5", "qcow2", 1024*1024*50)->as_xml; my $volvmdkxml = $tck->generic_volume("tck6", "vmdk", 1024*1024*50)->as_xml; @@ -100,22 +99,6 @@ lives_ok(sub { $vol->delete(0) }, "deleted volume");
-ok_volume { $vol = $pool->create_volume($volcowxml) } "create cow volume"; - -$path = xpath($vol, "string(/volume/target/path)"); -$st = stat($path); - -ok($st, "path $path exists"); - -# Don't know exactly how large a cow empty file is, but it -# should be quite small :-) -ok($st->size < 1024*1024, "basic cow header is allocated"); - -lives_ok(sub { $vol->delete(0) }, "deleted volume"); - - - - ok_volume(sub { $vol = $pool->create_volume($volqcow1xml) }, "create qcow volume");
$path = xpath($vol, "string(/volume/target/path)"); diff --git a/scripts/storage/200-clone-vol-dir.t b/scripts/storage/200-clone-vol-dir.t index 28043fb..cc0daba 100644 --- a/scripts/storage/200-clone-vol-dir.t +++ b/scripts/storage/200-clone-vol-dir.t @@ -31,7 +31,7 @@ checksummed and validated use strict; use warnings;
-use Test::More tests => 61; +use Test::More tests => 52;
For each format, there are 9 tests, so that checks out too. (Sorry for being verbose about such a simple thing - it's just that I hadn't even noticed this number before today, and am just now seeing where it comes from :-)
use Sys::Virt::TCK; use Test::Exception; @@ -103,7 +103,7 @@ my $srcdigest = &digest($path);
diag "Now testing cloning of various formats";
-my @formats = qw(raw cow qcow qcow2 vmdk vpc); +my @formats = qw(raw qcow qcow2 vmdk vpc);
foreach my $format (@formats) { diag "Cloning source volume to $format format";