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

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

 



On Mon, Sep 04, 2023 at 09:22:54AM +0200, Peter Krempa wrote:
On Fri, Sep 01, 2023 at 23:32:14 +0200, Martin Kletzander wrote:
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>

I've looked originally at 'src/conf/schemas/basictypes.rng' which has:

 <define name="unsignedInt">
   <data type="unsignedInt">
     <param name="pattern">[0-9]+</param>
   </data>
 </define>


And concluded that there's no actual difference between that and
'unsignedLong' not realizing that this is not the full definition of the
type.


Exactly.  It took me quite some time to figure out where they come from, it can
actually be used from various XML namespaces, but hunting this down, for someone
like me, took longer than I would want to admit.


                   </optional>
                   <optional>
                     <attribute name="grow">

Reviewed-by: Peter Krempa <pkrempa@xxxxxxxxxx>


Thanks ;)

Attachment: signature.asc
Description: PGP signature


[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