1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

Fix a Relaxng bug raised by libvirt test suite

* xmlregexp.c: other fixes in 2.7.4 raised this internal error
  when comparing ranges, this affects among others detection of
  the determinism
* test/relaxng/libvirt* result/relaxng/libvirt*: add a test case
  based on libvirt schemas and tests
This commit is contained in:
Daniel Veillard
2009-09-23 18:28:43 +02:00
parent 9d3d141c41
commit 9332b48f16
7 changed files with 1289 additions and 5 deletions

0
result/relaxng/libvirt_0 Normal file
View File

View File

@ -0,0 +1 @@
./test/relaxng/libvirt_0.xml validates

View File

@ -0,0 +1 @@
./test/relaxng/libvirt.rng validates

View File

1258
test/relaxng/libvirt.rng Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,23 @@
<domain type='xen' id='6'>
<name>pvtest</name>
<uuid>596a5d2171f48fb2e068e2386a5c413e</uuid>
<os>
<type>linux</type>
<kernel>/var/lib/xen/vmlinuz.2Dn2YT</kernel>
<initrd>/var/lib/xen/initrd.img.0u-Vhq</initrd>
<cmdline> method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os </cmdline>
</os>
<memory>430080</memory>
<vcpu>2</vcpu>
<on_poweroff>destroy</on_poweroff>
<on_reboot>destroy</on_reboot>
<on_crash>destroy</on_crash>
<devices>
<disk type='file' device='disk'>
<driver name='file'/>
<source file='/root/some.img'/>
<target dev='xvda'/>
</disk>
<graphics type='vnc' port='-1' autoport='yes' listen="127.0.0.1" passwd="123456" keymap="ja"/>
</devices>
</domain>

View File

@ -2095,12 +2095,13 @@ xmlFACompareRanges(xmlRegRangePtr range1, xmlRegRangePtr range2) {
(range2->type == XML_REGEXP_EPSILON)) {
return(0);
} else if (range1->type == range2->type) {
if ((range1->type != XML_REGEXP_CHARVAL) ||
(range1->end < range2->start) ||
(range2->end < range1->start))
if (range1->type != XML_REGEXP_CHARVAL)
ret = 1;
else
else if ((range1->end < range2->start) ||
(range2->end < range1->start))
ret = 0;
else
ret = 1;
} else if (range1->type == XML_REGEXP_CHARVAL) {
int codepoint;
int neg = 0;