[PATCHv2 03/10] tests: add tests for validating <resmongroup>

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

 



---
 tests/genericxml2xmlindata/cachetune-cdp.xml       |  3 ++
 tests/genericxml2xmlindata/cachetune-small.xml     |  2 ++
 tests/genericxml2xmlindata/cachetune.xml           |  2 ++
 .../resmongroup-colliding-cachetune.xml            | 34 ++++++++++++++++++++++
 tests/genericxml2xmltest.c                         |  3 ++
 5 files changed, 44 insertions(+)
 create mode 100644 tests/genericxml2xmlindata/resmongroup-colliding-cachetune.xml

diff --git a/tests/genericxml2xmlindata/cachetune-cdp.xml b/tests/genericxml2xmlindata/cachetune-cdp.xml
index 9718f06..9b0874e 100644
--- a/tests/genericxml2xmlindata/cachetune-cdp.xml
+++ b/tests/genericxml2xmlindata/cachetune-cdp.xml
@@ -15,6 +15,9 @@
     <cachetune vcpus='3'>
       <cache id='1' level='3' type='data' size='6912' unit='KiB'/>
     </cachetune>
+    <resmongroup vcpus='0-1'/>
+    <resmongroup vcpus='2'/>
+    <resmongroup vcpus='3'/>
   </cputune>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/genericxml2xmlindata/cachetune-small.xml b/tests/genericxml2xmlindata/cachetune-small.xml
index ab2d9cf..ef4321e 100644
--- a/tests/genericxml2xmlindata/cachetune-small.xml
+++ b/tests/genericxml2xmlindata/cachetune-small.xml
@@ -8,6 +8,8 @@
     <cachetune vcpus='0-1'>
       <cache id='0' level='3' type='both' size='768' unit='KiB'/>
     </cachetune>
+    <resmongroup vcpus='0-1'/>
+    <resmongroup vcpus='2-3'/>
   </cputune>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/genericxml2xmlindata/cachetune.xml b/tests/genericxml2xmlindata/cachetune.xml
index 645cab7..d30c730 100644
--- a/tests/genericxml2xmlindata/cachetune.xml
+++ b/tests/genericxml2xmlindata/cachetune.xml
@@ -12,6 +12,8 @@
     <cachetune vcpus='3'>
       <cache id='0' level='3' type='both' size='3' unit='MiB'/>
     </cachetune>
+    <resmongroup vcpus='0-1'/>
+    <resmongroup vcpus='3'/>
   </cputune>
   <os>
     <type arch='i686' machine='pc'>hvm</type>
diff --git a/tests/genericxml2xmlindata/resmongroup-colliding-cachetune.xml b/tests/genericxml2xmlindata/resmongroup-colliding-cachetune.xml
new file mode 100644
index 0000000..ff85cd4
--- /dev/null
+++ b/tests/genericxml2xmlindata/resmongroup-colliding-cachetune.xml
@@ -0,0 +1,34 @@
+<domain type='qemu'>
+  <name>QEMUGuest1</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>4</vcpu>
+  <cputune>
+    <cachetune vcpus='0-1'>
+      <cache id='0' level='3' type='both' size='3' unit='MiB'/>
+      <cache id='1' level='3' type='both' size='3' unit='MiB'/>
+    </cachetune>
+    <cachetune vcpus='3'>
+      <cache id='0' level='3' type='both' size='3' unit='MiB'/>
+    </cachetune>
+    <resmongroup vcpus='0'/>
+  </cputune>
+  <os>
+    <type arch='i686' machine='pc'>hvm</type>
+    <boot dev='hd'/>
+  </os>
+  <clock offset='utc'/>
+  <on_poweroff>destroy</on_poweroff>
+  <on_reboot>restart</on_reboot>
+  <on_crash>destroy</on_crash>
+  <devices>
+    <emulator>/usr/bin/qemu-system-i686</emulator>
+    <controller type='usb' index='0'/>
+    <controller type='ide' index='0'/>
+    <controller type='pci' index='0' model='pci-root'/>
+    <input type='mouse' bus='ps2'/>
+    <input type='keyboard' bus='ps2'/>
+    <memballoon model='virtio'/>
+  </devices>
+</domain>
diff --git a/tests/genericxml2xmltest.c b/tests/genericxml2xmltest.c
index 7a4fc1e..68a366e 100644
--- a/tests/genericxml2xmltest.c
+++ b/tests/genericxml2xmltest.c
@@ -145,6 +145,9 @@ mymain(void)
 
     DO_TEST("launch-security-sev");
 
+    DO_TEST_FULL("resmongroup-colliding-cachetune", false, true,
+                 TEST_COMPARE_DOM_XML2XML_RESULT_FAIL_PARSE);
+
     virObjectUnref(caps);
     virObjectUnref(xmlopt);
 
-- 
2.7.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