From 411cdb61509ad8b21f3f9aa8e0dbe1c955996104 Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Thu, 14 Sep 2017 11:14:57 -0400 Subject: [PATCH] conf: Add invalid domain disk encryption test Add a test to prove checking for invalid luks disk formatting check. The error message will indicate supplying the element is unnecessary. --- .../qemuxml2argv-luks-disk-invalid.xml | 37 +++++++++++++++++++ tests/qemuxml2argvtest.c | 1 + 2 files changed, 38 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-luks-disk-invalid.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-luks-disk-invalid.xml b/tests/qemuxml2argvdata/qemuxml2argv-luks-disk-invalid.xml new file mode 100644 index 0000000000..bea769584b --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-luks-disk-invalid.xml @@ -0,0 +1,37 @@ + + encryptdisk + 496898a6-e6ff-f7c8-5dc2-3cf410945ee9 + 1048576 + 524288 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + + + + + +
+ + +
+ + + + + +
+ + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index fd05155efc..c8c479cbd4 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1647,6 +1647,7 @@ mymain(void) # else DO_TEST_FAILURE("luks-disks", QEMU_CAPS_OBJECT_SECRET); # endif + DO_TEST_PARSE_ERROR("luks-disk-invalid", NONE); DO_TEST("memtune", NONE); DO_TEST("memtune-unlimited", NONE);