[libvirt] [tck PATCH 2/2] scripts: qemu: Enable disk encryption test

Erik Skultety eskultet at redhat.com
Mon Nov 25 12:38:13 UTC 2019


At the time the test was added, volume encryption wasn't fully
supported in libvirt. For disks of type 'raw', this is not the case
anymore, so let's adjust the test according to that fact and enable it.

Signed-off-by: Erik Skultety <eskultet at redhat.com>
---
 scripts/qemu/100-disk-encryption.t | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/scripts/qemu/100-disk-encryption.t b/scripts/qemu/100-disk-encryption.t
index 2c988ec..b44dbc8 100644
--- a/scripts/qemu/100-disk-encryption.t
+++ b/scripts/qemu/100-disk-encryption.t
@@ -41,10 +41,9 @@ END { $tck->cleanup if $tck; }
 
 SKIP: {
     skip "Only relevant to QEMU driver", 8 unless $conn->get_type() eq "QEMU";
-    skip "Libvirt LUKS support isn't ready", 8;
 
 my $dir = $tck->bucket_dir("300-disk-encryption");
-my $disk = catfile($dir, "demo.qcow2");
+my $disk = catfile($dir, "demo.img");
 
 
 my $secretXML = <<EOF;
@@ -73,9 +72,9 @@ diag "Creating pool $poolXML";
 lives_ok(sub { $pool = $conn->create_storage_pool($poolXML) }, "pool created");
 
 
-my $volXML = Sys::Virt::TCK::StorageVolBuilder->new(name => "demo.qcow2")
+my $volXML = Sys::Virt::TCK::StorageVolBuilder->new(name => "demo.img")
     ->capacity(1024*1024*1024)
-    ->format("qcow2")
+    ->format("raw")
     ->encryption_format("luks")
     ->secret($secretUUID)
     ->as_xml();
@@ -86,7 +85,7 @@ diag "Creating volume $volXML";
 lives_ok(sub { $vol = $pool->create_volume($volXML) }, "volume created");
 
 my $xml = $tck->generic_domain(name => "tck")
-    ->disk(format => { name => "qemu", type => "qcow2" },
+    ->disk(format => { name => "qemu", type => "raw" },
 	   encryption_format => "luks",
 	   secret => $secretUUID,
 	   type => "file",
-- 
2.23.0




More information about the libvir-list mailing list