conf, schema: Switch iothread/poll values to unsignedLong

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>
This commit is contained in:
Martin Kletzander 2023-09-01 23:28:01 +02:00
parent f9947f75b9
commit 1612aa4d4a
3 changed files with 28 additions and 3 deletions

View File

@ -876,17 +876,17 @@
<element name="poll"> <element name="poll">
<optional> <optional>
<attribute name="max"> <attribute name="max">
<ref name="unsignedInt"/> <ref name="unsignedLong"/>
</attribute> </attribute>
</optional> </optional>
<optional> <optional>
<attribute name="grow"> <attribute name="grow">
<ref name="unsignedInt"/> <ref name="unsignedLong"/>
</attribute> </attribute>
</optional> </optional>
<optional> <optional>
<attribute name="shrink"> <attribute name="shrink">
<ref name="unsignedInt"/> <ref name="unsignedLong"/>
</attribute> </attribute>
</optional> </optional>
</element> </element>

View File

@ -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>

View File

@ -249,6 +249,8 @@ mymain(void)
DO_TEST("cpu-phys-bits-emulate"); DO_TEST("cpu-phys-bits-emulate");
DO_TEST("cpu-phys-bits-passthrough"); DO_TEST("cpu-phys-bits-passthrough");
DO_TEST("iothreadids");
virObjectUnref(caps); virObjectUnref(caps);
virObjectUnref(xmlopt); virObjectUnref(xmlopt);