[PATCH v3 02/10] tests: Add luks creation examples to storagevolxml2argvtest

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add the storagevolxml2xmltest "luks" and "luks-cipher" tests
to the storagevolxml2argvtest.

Signed-off-by: John Ferlan <jferlan@xxxxxxxxxx>
---
 tests/storagevolxml2argvdata/luks-cipher.argv | 5 +++++
 tests/storagevolxml2argvdata/luks.argv        | 4 ++++
 tests/storagevolxml2argvtest.c                | 7 +++++++
 3 files changed, 16 insertions(+)
 create mode 100644 tests/storagevolxml2argvdata/luks-cipher.argv
 create mode 100644 tests/storagevolxml2argvdata/luks.argv

diff --git a/tests/storagevolxml2argvdata/luks-cipher.argv b/tests/storagevolxml2argvdata/luks-cipher.argv
new file mode 100644
index 0000000000..a8a19f03ff
--- /dev/null
+++ b/tests/storagevolxml2argvdata/luks-cipher.argv
@@ -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
index 0000000000..336238ecab
--- /dev/null
+++ b/tests/storagevolxml2argvdata/luks.argv
@@ -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
diff --git a/tests/storagevolxml2argvtest.c b/tests/storagevolxml2argvtest.c
index 4286c50c6e..b8afe4abcc 100644
--- a/tests/storagevolxml2argvtest.c
+++ b/tests/storagevolxml2argvtest.c
@@ -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;
 }
 
-- 
2.14.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux