|
|
6ae9ed |
From d1ed6d27dd73a300b94237f4664fb27bd978dbbd Mon Sep 17 00:00:00 2001
|
|
|
6ae9ed |
Message-Id: <d1ed6d27dd73a300b94237f4664fb27bd978dbbd@dist-git>
|
|
|
6ae9ed |
From: John Ferlan <jferlan@redhat.com>
|
|
|
6ae9ed |
Date: Mon, 25 Jul 2016 12:42:51 -0400
|
|
|
6ae9ed |
Subject: [PATCH] tests: Adjust LUKS tests to use 'volume' secret type
|
|
|
6ae9ed |
|
|
|
6ae9ed |
https://bugzilla.redhat.com/show_bug.cgi?id=1301021
|
|
|
6ae9ed |
|
|
|
6ae9ed |
Commit id's '9bbf0d7e6' and '2552fec24' added some XML parsing tests
|
|
|
6ae9ed |
for a LUKS volume to use a 'passphrase' secret format. After commit,
|
|
|
6ae9ed |
this was deemed to be incorrect, so covert the various tests to use
|
|
|
6ae9ed |
the volume usage format where the 'usage' is the path to the volume
|
|
|
6ae9ed |
rather than a user defined name string.
|
|
|
6ae9ed |
|
|
|
6ae9ed |
Also, removed the qemuxml2argv-luks-disk-cipher.xml since it was
|
|
|
6ae9ed |
just a duplicate of qemuxml2argv-luks-disks.xml.
|
|
|
6ae9ed |
|
|
|
6ae9ed |
Signed-off-by: John Ferlan <jferlan@redhat.com>
|
|
|
6ae9ed |
(cherry picked from commit a8d0afc75a0a5c902f1e4188a616651a17a9d050)
|
|
|
6ae9ed |
---
|
|
|
6ae9ed |
.../qemuxml2argv-luks-disk-cipher.xml | 45 ----------------------
|
|
|
6ae9ed |
tests/qemuxml2argvdata/qemuxml2argv-luks-disks.xml | 2 +-
|
|
|
6ae9ed |
.../qemuxml2xmlout-luks-disk-cipher.xml | 1 -
|
|
|
6ae9ed |
tests/qemuxml2xmltest.c | 1 -
|
|
|
6ae9ed |
tests/storagevolxml2xmlin/vol-luks-cipher.xml | 2 +-
|
|
|
6ae9ed |
tests/storagevolxml2xmlin/vol-luks.xml | 2 +-
|
|
|
6ae9ed |
tests/storagevolxml2xmlout/vol-luks-cipher.xml | 2 +-
|
|
|
6ae9ed |
tests/storagevolxml2xmlout/vol-luks.xml | 2 +-
|
|
|
6ae9ed |
8 files changed, 5 insertions(+), 52 deletions(-)
|
|
|
6ae9ed |
delete mode 100644 tests/qemuxml2argvdata/qemuxml2argv-luks-disk-cipher.xml
|
|
|
6ae9ed |
delete mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-luks-disk-cipher.xml
|
|
|
6ae9ed |
|
|
|
6ae9ed |
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-luks-disk-cipher.xml b/tests/qemuxml2argvdata/qemuxml2argv-luks-disk-cipher.xml
|
|
|
6ae9ed |
deleted file mode 100644
|
|
|
6ae9ed |
index 9ce15c0..0000000
|
|
|
6ae9ed |
--- a/tests/qemuxml2argvdata/qemuxml2argv-luks-disk-cipher.xml
|
|
|
6ae9ed |
+++ /dev/null
|
|
|
6ae9ed |
@@ -1,45 +0,0 @@
|
|
|
6ae9ed |
-<domain type='qemu'>
|
|
|
6ae9ed |
- <name>encryptdisk</name>
|
|
|
6ae9ed |
- <uuid>496898a6-e6ff-f7c8-5dc2-3cf410945ee9</uuid>
|
|
|
6ae9ed |
- <memory unit='KiB'>1048576</memory>
|
|
|
6ae9ed |
- <currentMemory unit='KiB'>524288</currentMemory>
|
|
|
6ae9ed |
- <vcpu placement='static'>1</vcpu>
|
|
|
6ae9ed |
- <os>
|
|
|
6ae9ed |
- <type arch='x86_64' machine='pc-i440fx-2.1'>hvm</type>
|
|
|
6ae9ed |
- <boot dev='hd'/>
|
|
|
6ae9ed |
- </os>
|
|
|
6ae9ed |
- <clock offset='utc'/>
|
|
|
6ae9ed |
- <on_poweroff>destroy</on_poweroff>
|
|
|
6ae9ed |
- <on_reboot>restart</on_reboot>
|
|
|
6ae9ed |
- <on_crash>destroy</on_crash>
|
|
|
6ae9ed |
- <devices>
|
|
|
6ae9ed |
- <emulator>/usr/bin/qemu</emulator>
|
|
|
6ae9ed |
- <disk type='file' device='disk'>
|
|
|
6ae9ed |
- <driver name='qemu' type='luks'/>
|
|
|
6ae9ed |
- <source file='/storage/guest_disks/encryptdisk'/>
|
|
|
6ae9ed |
- <target dev='vda' bus='virtio'/>
|
|
|
6ae9ed |
- <encryption format='luks'>
|
|
|
6ae9ed |
- <secret type='passphrase' uuid='0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f'/>
|
|
|
6ae9ed |
- </encryption>
|
|
|
6ae9ed |
- <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
|
|
|
6ae9ed |
- </disk>
|
|
|
6ae9ed |
- <disk type='file' device='disk'>
|
|
|
6ae9ed |
- <driver name='qemu' type='luks'/>
|
|
|
6ae9ed |
- <source file='/storage/guest_disks/encryptdisk2'/>
|
|
|
6ae9ed |
- <target dev='vdb' bus='virtio'/>
|
|
|
6ae9ed |
- <encryption format='luks'>
|
|
|
6ae9ed |
- <secret type='passphrase' usage='mycluster_myname'/>
|
|
|
6ae9ed |
- </encryption>
|
|
|
6ae9ed |
- <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
|
|
|
6ae9ed |
- </disk>
|
|
|
6ae9ed |
- <controller type='usb' index='0'>
|
|
|
6ae9ed |
- <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
|
|
|
6ae9ed |
- </controller>
|
|
|
6ae9ed |
- <controller type='pci' index='0' model='pci-root'/>
|
|
|
6ae9ed |
- <input type='mouse' bus='ps2'/>
|
|
|
6ae9ed |
- <input type='keyboard' bus='ps2'/>
|
|
|
6ae9ed |
- <memballoon model='virtio'>
|
|
|
6ae9ed |
- <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
|
|
|
6ae9ed |
- </memballoon>
|
|
|
6ae9ed |
- </devices>
|
|
|
6ae9ed |
-</domain>
|
|
|
6ae9ed |
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-luks-disks.xml b/tests/qemuxml2argvdata/qemuxml2argv-luks-disks.xml
|
|
|
6ae9ed |
index 9ce15c0..4c9c4c7 100644
|
|
|
6ae9ed |
--- a/tests/qemuxml2argvdata/qemuxml2argv-luks-disks.xml
|
|
|
6ae9ed |
+++ b/tests/qemuxml2argvdata/qemuxml2argv-luks-disks.xml
|
|
|
6ae9ed |
@@ -28,7 +28,7 @@
|
|
|
6ae9ed |
<source file='/storage/guest_disks/encryptdisk2'/>
|
|
|
6ae9ed |
<target dev='vdb' bus='virtio'/>
|
|
|
6ae9ed |
<encryption format='luks'>
|
|
|
6ae9ed |
- <secret type='passphrase' usage='mycluster_myname'/>
|
|
|
6ae9ed |
+ <secret type='passphrase' usage='/storage/guest_disks/encryptdisk2'/>
|
|
|
6ae9ed |
</encryption>
|
|
|
6ae9ed |
<address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
|
|
|
6ae9ed |
</disk>
|
|
|
6ae9ed |
diff --git a/tests/qemuxml2xmloutdata/qemuxml2xmlout-luks-disk-cipher.xml b/tests/qemuxml2xmloutdata/qemuxml2xmlout-luks-disk-cipher.xml
|
|
|
6ae9ed |
deleted file mode 120000
|
|
|
6ae9ed |
index fa55233..0000000
|
|
|
6ae9ed |
--- a/tests/qemuxml2xmloutdata/qemuxml2xmlout-luks-disk-cipher.xml
|
|
|
6ae9ed |
+++ /dev/null
|
|
|
6ae9ed |
@@ -1 +0,0 @@
|
|
|
6ae9ed |
-../qemuxml2argvdata/qemuxml2argv-luks-disk-cipher.xml
|
|
|
6ae9ed |
\ No newline at end of file
|
|
|
6ae9ed |
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
|
|
|
6ae9ed |
index d00d209..a757fdb 100644
|
|
|
6ae9ed |
--- a/tests/qemuxml2xmltest.c
|
|
|
6ae9ed |
+++ b/tests/qemuxml2xmltest.c
|
|
|
6ae9ed |
@@ -503,7 +503,6 @@ mymain(void)
|
|
|
6ae9ed |
DO_TEST("encrypted-disk");
|
|
|
6ae9ed |
DO_TEST("encrypted-disk-usage");
|
|
|
6ae9ed |
DO_TEST("luks-disks");
|
|
|
6ae9ed |
- DO_TEST("luks-disk-cipher");
|
|
|
6ae9ed |
DO_TEST("memtune");
|
|
|
6ae9ed |
DO_TEST("memtune-unlimited");
|
|
|
6ae9ed |
DO_TEST("blkiotune");
|
|
|
6ae9ed |
diff --git a/tests/storagevolxml2xmlin/vol-luks-cipher.xml b/tests/storagevolxml2xmlin/vol-luks-cipher.xml
|
|
|
6ae9ed |
index 009246f..da28a27 100644
|
|
|
6ae9ed |
--- a/tests/storagevolxml2xmlin/vol-luks-cipher.xml
|
|
|
6ae9ed |
+++ b/tests/storagevolxml2xmlin/vol-luks-cipher.xml
|
|
|
6ae9ed |
@@ -15,7 +15,7 @@
|
|
|
6ae9ed |
<label>unconfined_u:object_r:virt_image_t:s0</label>
|
|
|
6ae9ed |
</permissions>
|
|
|
6ae9ed |
<encryption format='luks'>
|
|
|
6ae9ed |
- <secret type='passphrase' usage='mumblyfratz'/>
|
|
|
6ae9ed |
+ <secret type='passphrase' uuid='f52a81b2-424e-490c-823d-6bd4235bc572'/>
|
|
|
6ae9ed |
<cipher name='serpent' size='256' mode='cbc' hash='sha256'/>
|
|
|
6ae9ed |
<ivgen name='plain64' hash='sha256'/>
|
|
|
6ae9ed |
</encryption>
|
|
|
6ae9ed |
diff --git a/tests/storagevolxml2xmlin/vol-luks.xml b/tests/storagevolxml2xmlin/vol-luks.xml
|
|
|
6ae9ed |
index eb4dc41..bf3c519 100644
|
|
|
6ae9ed |
--- a/tests/storagevolxml2xmlin/vol-luks.xml
|
|
|
6ae9ed |
+++ b/tests/storagevolxml2xmlin/vol-luks.xml
|
|
|
6ae9ed |
@@ -15,7 +15,7 @@
|
|
|
6ae9ed |
<label>unconfined_u:object_r:virt_image_t:s0</label>
|
|
|
6ae9ed |
</permissions>
|
|
|
6ae9ed |
<encryption format='luks'>
|
|
|
6ae9ed |
- <secret type='passphrase' usage='mumblyfratz'/>
|
|
|
6ae9ed |
+ <secret type='passphrase' uuid='f52a81b2-424e-490c-823d-6bd4235bc572'/>
|
|
|
6ae9ed |
</encryption>
|
|
|
6ae9ed |
</target>
|
|
|
6ae9ed |
</volume>
|
|
|
6ae9ed |
diff --git a/tests/storagevolxml2xmlout/vol-luks-cipher.xml b/tests/storagevolxml2xmlout/vol-luks-cipher.xml
|
|
|
6ae9ed |
index 9014849..1ac7424 100644
|
|
|
6ae9ed |
--- a/tests/storagevolxml2xmlout/vol-luks-cipher.xml
|
|
|
6ae9ed |
+++ b/tests/storagevolxml2xmlout/vol-luks-cipher.xml
|
|
|
6ae9ed |
@@ -15,7 +15,7 @@
|
|
|
6ae9ed |
<label>unconfined_u:object_r:virt_image_t:s0</label>
|
|
|
6ae9ed |
</permissions>
|
|
|
6ae9ed |
<encryption format='luks'>
|
|
|
6ae9ed |
- <secret type='passphrase' usage='mumblyfratz'/>
|
|
|
6ae9ed |
+ <secret type='passphrase' uuid='f52a81b2-424e-490c-823d-6bd4235bc572'/>
|
|
|
6ae9ed |
<cipher name='serpent' size='256' mode='cbc' hash='sha256'/>
|
|
|
6ae9ed |
<ivgen name='plain64' hash='sha256'/>
|
|
|
6ae9ed |
</encryption>
|
|
|
6ae9ed |
diff --git a/tests/storagevolxml2xmlout/vol-luks.xml b/tests/storagevolxml2xmlout/vol-luks.xml
|
|
|
6ae9ed |
index 5b764b7..7b82866 100644
|
|
|
6ae9ed |
--- a/tests/storagevolxml2xmlout/vol-luks.xml
|
|
|
6ae9ed |
+++ b/tests/storagevolxml2xmlout/vol-luks.xml
|
|
|
6ae9ed |
@@ -15,7 +15,7 @@
|
|
|
6ae9ed |
<label>unconfined_u:object_r:virt_image_t:s0</label>
|
|
|
6ae9ed |
</permissions>
|
|
|
6ae9ed |
<encryption format='luks'>
|
|
|
6ae9ed |
- <secret type='passphrase' usage='mumblyfratz'/>
|
|
|
6ae9ed |
+ <secret type='passphrase' uuid='f52a81b2-424e-490c-823d-6bd4235bc572'/>
|
|
|
6ae9ed |
</encryption>
|
|
|
6ae9ed |
</target>
|
|
|
6ae9ed |
</volume>
|
|
|
6ae9ed |
--
|
|
|
6ae9ed |
2.9.2
|
|
|
6ae9ed |
|