]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
tests: Add luks creation examples to storagevolxml2argvtest
authorJohn Ferlan <jferlan@redhat.com>
Tue, 19 Jun 2018 14:59:48 +0000 (10:59 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 26 Jun 2018 18:02:43 +0000 (14:02 -0400)
Add the storagevolxml2xmltest "luks" and "luks-cipher" tests
to the storagevolxml2argvtest.

Signed-off-by: John Ferlan <jferlan@redhat.com>
ACKed-by: Michal Privoznik <mprivozn@redhat.com>
tests/storagevolxml2argvdata/luks-cipher.argv [new file with mode: 0644]
tests/storagevolxml2argvdata/luks.argv [new file with mode: 0644]
tests/storagevolxml2argvtest.c

diff --git a/tests/storagevolxml2argvdata/luks-cipher.argv b/tests/storagevolxml2argvdata/luks-cipher.argv
new file mode 100644 (file)
index 0000000..a8a19f0
--- /dev/null
@@ -0,0 +1,5 @@
+qemu-img create -f luks \
+--object secret,id=LuksDemo.img_encrypt0,file=/path/to/secretFile \
+-o key-secret=LuksDemo.img_encrypt0,cipher-alg=serpent-256,cipher-mode=cbc,\
+hash-alg=sha256,ivgen-alg=plain64,ivgen-hash-alg=sha256 \
+/var/lib/libvirt/images/LuksDemo.img 5242880K
diff --git a/tests/storagevolxml2argvdata/luks.argv b/tests/storagevolxml2argvdata/luks.argv
new file mode 100644 (file)
index 0000000..336238e
--- /dev/null
@@ -0,0 +1,4 @@
+qemu-img create -f luks \
+--object secret,id=LuksDemo.img_encrypt0,file=/path/to/secretFile \
+-o key-secret=LuksDemo.img_encrypt0 \
+/var/lib/libvirt/images/LuksDemo.img 5242880K
index 4286c50c6e7e526389fb673c9c3f0865196e0e35..b8afe4abccf4ee7db5c2bf0ba8725722a80fecea 100644 (file)
@@ -232,6 +232,13 @@ mymain(void)
             "pool-dir", "vol-file-iso",
             "iso-input", 0);
 
+    DO_TEST("pool-dir", "vol-luks",
+            NULL, NULL,
+            "luks", 0);
+    DO_TEST("pool-dir", "vol-luks-cipher",
+            NULL, NULL,
+            "luks-cipher", 0);
+
     return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }