From 36cc189a46b642d202100efddfcefa7cf7bdd08b Mon Sep 17 00:00:00 2001 From: Michal Privoznik Date: Wed, 3 Sep 2014 19:06:55 +0200 Subject: [PATCH] tests: Add test cases for previous commit This commit is rather big. Firstly, the in memory config representation is adjusted like if security_driver was set to "none". The rest is then just adaptation to the new code that will generate different seclabels. Signed-off-by: Michal Privoznik --- .../qemuhotplug-hotplug-base+disk-scsi.xml | 2 +- .../qemuhotplug-hotplug-base+disk-usb.xml | 2 +- .../qemuhotplug-hotplug-base+disk-virtio.xml | 2 +- .../qemuxml2argv-hotplug-base.xml | 2 +- ...xml2argv-seclabel-dynamic-none-relabel.xml | 53 +++++++++++++++++++ ...l2xmlout-seclabel-dynamic-none-relabel.xml | 53 +++++++++++++++++++ ...emuxml2xmlout-seclabel-dynamic-relabel.xml | 28 ++++++++++ .../qemuxml2xmlout-seclabel-none.xml | 28 ++++++++++ tests/qemuxml2xmltest.c | 5 +- tests/testutilsqemu.c | 10 ++++ 10 files changed, 179 insertions(+), 6 deletions(-) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-none-relabel.xml create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-seclabel-dynamic-none-relabel.xml create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-seclabel-dynamic-relabel.xml create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-seclabel-none.xml diff --git a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+disk-scsi.xml b/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+disk-scsi.xml index a06158b8ff..ca46e5a8ea 100644 --- a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+disk-scsi.xml +++ b/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+disk-scsi.xml @@ -42,5 +42,5 @@ - + diff --git a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+disk-usb.xml b/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+disk-usb.xml index 1ea0f88313..7904c4fc65 100644 --- a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+disk-usb.xml +++ b/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+disk-usb.xml @@ -41,5 +41,5 @@ - + diff --git a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+disk-virtio.xml b/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+disk-virtio.xml index e96055c355..f3d0351f29 100644 --- a/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+disk-virtio.xml +++ b/tests/qemuhotplugtestdata/qemuhotplug-hotplug-base+disk-virtio.xml @@ -42,5 +42,5 @@ - + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base.xml b/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base.xml index bfb0167f39..f1a55009e7 100644 --- a/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base.xml +++ b/tests/qemuxml2argvdata/qemuxml2argv-hotplug-base.xml @@ -34,5 +34,5 @@ - + diff --git a/tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-none-relabel.xml b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-none-relabel.xml new file mode 100644 index 0000000000..47f253b5f7 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-seclabel-dynamic-none-relabel.xml @@ -0,0 +1,53 @@ + + migt10 + 0d73c5c3-43d0-f75b-31de-6aa919b0176b + 262144 + 262144 + + + + + + 4 + + hvm + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + +
+ + +
+ + + +
+ + + +
+ + + + + + +