]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
conf, schema: Switch iothread/poll values to unsignedLong
authorMartin Kletzander <mkletzan@redhat.com>
Fri, 1 Sep 2023 21:28:01 +0000 (23:28 +0200)
committerMartin Kletzander <mkletzan@redhat.com>
Mon, 4 Sep 2023 08:07:54 +0000 (10:07 +0200)
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@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
src/conf/schemas/domaincommon.rng
tests/genericxml2xmlindata/iothreadids.xml [new file with mode: 0644]
tests/genericxml2xmltest.c

index de3bd1c35c551fd9f19ea9de58ff6a7141c6e9e7..2f9ba31c0aec14211454abf75d732ce7ff263daa 100644 (file)
                 <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 (file)
index 0000000..671a467
--- /dev/null
@@ -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>
index 3501eadf5597a6c6f857be9dc55dabbf3c6fbe3c..ce8073e85a309797d743529c7232c61f59c781fd 100644 (file)
@@ -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);