[PATCH] conf, schema: Switch iothread/poll values to unsignedLong

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

 



They represent nanoseconds, and we accept such values already.  Not that
anyone would use such values in the wild, but even one person testing
QEMU could put in a bigger value and will be bothered with validation
errors after every `virsh edit`.  Also add a test for it.

Resolves: https://issues.redhat.com/browse/RHEL-1717

Signed-off-by: Martin Kletzander <mkletzan@xxxxxxxxxx>
---
 src/conf/schemas/domaincommon.rng          |  6 +++---
 tests/genericxml2xmlindata/iothreadids.xml | 23 ++++++++++++++++++++++
 tests/genericxml2xmltest.c                 |  2 ++
 3 files changed, 28 insertions(+), 3 deletions(-)
 create mode 100644 tests/genericxml2xmlindata/iothreadids.xml

diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng
index de3bd1c35c55..2f9ba31c0aec 100644
--- a/src/conf/schemas/domaincommon.rng
+++ b/src/conf/schemas/domaincommon.rng
@@ -876,17 +876,17 @@
                 <element name="poll">
                   <optional>
                     <attribute name="max">
-                      <ref name="unsignedInt"/>
+                      <ref name="unsignedLong"/>
                     </attribute>
                   </optional>
                   <optional>
                     <attribute name="grow">
-                      <ref name="unsignedInt"/>
+                      <ref name="unsignedLong"/>
                     </attribute>
                   </optional>
                   <optional>
                     <attribute name="shrink">
-                      <ref name="unsignedInt"/>
+                      <ref name="unsignedLong"/>
                     </attribute>
                   </optional>
                 </element>
diff --git a/tests/genericxml2xmlindata/iothreadids.xml b/tests/genericxml2xmlindata/iothreadids.xml
new file mode 100644
index 000000000000..671a4672958d
--- /dev/null
+++ b/tests/genericxml2xmlindata/iothreadids.xml
@@ -0,0 +1,23 @@
+<domain type='kvm'>
+  <name>foo</name>
+  <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+  <memory unit='KiB'>219136</memory>
+  <currentMemory unit='KiB'>219136</currentMemory>
+  <vcpu placement='static'>1</vcpu>
+  <iothreads>1</iothreads>
+  <iothreadids>
+    <iothread id='8' thread_pool_min='2147483647' thread_pool_max='2147483647'>
+      <poll max='9223372036854775807' grow='456' shrink='789'/>
+    </iothread>
+  </iothreadids>
+  <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>
+  </devices>
+</domain>
diff --git a/tests/genericxml2xmltest.c b/tests/genericxml2xmltest.c
index 3501eadf5597..ce8073e85a30 100644
--- a/tests/genericxml2xmltest.c
+++ b/tests/genericxml2xmltest.c
@@ -249,6 +249,8 @@ mymain(void)
     DO_TEST("cpu-phys-bits-emulate");
     DO_TEST("cpu-phys-bits-passthrough");
 
+    DO_TEST("iothreadids");
+
     virObjectUnref(caps);
     virObjectUnref(xmlopt);
 
-- 
2.41.0




[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