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

[virt-tools-list] [PATCHv2 2/2] Add hugepage basic tests in virtinst



This patch is to add hugepage basic tests to generate
configuration in xmlfile

Signed-off-by: Li Zhang <zhlcindy linux vnet ibm com>
---
 tests/xmlconfig-xml/boot-many-devices.xml |    3 +++
 tests/xmlconfig.py                        |    1 +
 tests/xmlparse-xml/change-guest-out.xml   |    3 +++
 tests/xmlparse.py                         |    1 +
 4 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/tests/xmlconfig-xml/boot-many-devices.xml b/tests/xmlconfig-xml/boot-many-devices.xml
index 1221cc4..b654889 100644
--- a/tests/xmlconfig-xml/boot-many-devices.xml
+++ b/tests/xmlconfig-xml/boot-many-devices.xml
@@ -4,6 +4,9 @@
   <description>foooo barrrr somedesc</description>
   <memory>409600</memory>
   <currentMemory>204800</currentMemory>
+  <memoryBacking>
+    <hugepages/>
+  </memoryBacking>
   <vcpu>5</vcpu>
   <os>
     <type arch='i686'>hvm</type>
diff --git a/tests/xmlconfig.py b/tests/xmlconfig.py
index 1f16404..a76ac98 100644
--- a/tests/xmlconfig.py
+++ b/tests/xmlconfig.py
@@ -694,6 +694,7 @@ class TestXMLConfig(unittest.TestCase):
         g = utils.get_basic_fullyvirt_guest(installer=i)
 
         g.description = "foooo barrrr somedesc"
+        g.hugepage = True
 
         # Hostdevs
         dev1 = VirtualHostDeviceUSB(g.conn)
diff --git a/tests/xmlparse-xml/change-guest-out.xml b/tests/xmlparse-xml/change-guest-out.xml
index e5045e5..248c48c 100644
--- a/tests/xmlparse-xml/change-guest-out.xml
+++ b/tests/xmlparse-xml/change-guest-out.xml
@@ -62,4 +62,7 @@
     <imagelabel>fooimage</imagelabel>
   </seclabel>
   <description>Hey desc changed</description>
+  <memoryBacking>
+    <hugepages/>
+  </memoryBacking>
 </domain>
diff --git a/tests/xmlparse.py b/tests/xmlparse.py
index a781f2c..11036ba 100644
--- a/tests/xmlparse.py
+++ b/tests/xmlparse.py
@@ -102,6 +102,7 @@ class XMLParseTest(unittest.TestCase):
         check("uuid", "12345678-1234-1234-1234-123456789012",
                       "11111111-2222-3333-4444-555555555555")
         check("emulator", "/usr/lib/xen/bin/qemu-dm", "/usr/binnnn/fooemu")
+        check("hugepage", False, True)
 
         check = self._make_checker(guest.clock)
         check("offset", "utc", "localtime")
-- 
1.7.7


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