22158519 libxml2 2.9.2 breaks libxslt tests
authorPetr Sumbera <petr.sumbera@oracle.com>
Thu, 05 Nov 2015 07:03:40 -0800
changeset 5070 4a5c8cc70bd0
parent 5069 a37b52a87a63
child 5071 ee5549aeee8d
22158519 libxml2 2.9.2 breaks libxslt tests
components/libxml2/patches/Bug737840.patch
components/libxml2/test/results-all.master
components/libxslt/patches/test-output.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libxml2/patches/Bug737840.patch	Thu Nov 05 07:03:40 2015 -0800
@@ -0,0 +1,93 @@
+Patch origin: upstream
+Patch status: will be part of next version
+
+https://git.gnome.org/browse/libxml2/commit/?id=ef709ce2f7b792d5fb69ed142796d743fb1eb388
+
+From ef709ce2f7b792d5fb69ed142796d743fb1eb388 Mon Sep 17 00:00:00 2001
+From: Daniel Veillard <[email protected]>
+Date: Thu, 10 Sep 2015 19:41:41 +0800
+Subject: Fix the spurious ID already defined error
+
+For https://bugzilla.gnome.org/show_bug.cgi?id=737840
+the fix for 724903 introduced a regression on external entities carrying
+IDs, revert that patch in part and add a specific test to avoid readding it
+---
+ result/valid/737840.xml         | 10 ++++++++++
+ result/valid/737840.xml.err     |  0
+ result/valid/737840.xml.err.rdr |  0
+ test/valid/737840.xml           | 10 ++++++++++
+ test/valid/dtds/737840.ent      |  1 +
+ valid.c                         |  6 ++++--
+ 6 files changed, 25 insertions(+), 2 deletions(-)
+ create mode 100644 result/valid/737840.xml
+ create mode 100644 result/valid/737840.xml.err
+ create mode 100644 result/valid/737840.xml.err.rdr
+ create mode 100644 test/valid/737840.xml
+ create mode 100644 test/valid/dtds/737840.ent
+
+diff --git a/result/valid/737840.xml b/result/valid/737840.xml
+new file mode 100644
+index 0000000..433c6d6
+--- /dev/null
++++ b/result/valid/737840.xml
+@@ -0,0 +1,10 @@
++<?xml version="1.0"?>
++<!DOCTYPE root [
++<!ELEMENT root (elem)>
++<!ELEMENT elem (#PCDATA)>
++<!ATTLIST elem id ID #IMPLIED>
++<!ENTITY target SYSTEM "dtds/737840.ent">
++]>
++<root>
++  &target;
++</root>
+diff --git a/result/valid/737840.xml.err b/result/valid/737840.xml.err
+new file mode 100644
+index 0000000..e69de29
+diff --git a/result/valid/737840.xml.err.rdr b/result/valid/737840.xml.err.rdr
+new file mode 100644
+index 0000000..e69de29
+diff --git a/test/valid/737840.xml b/test/valid/737840.xml
+new file mode 100644
+index 0000000..2d27b73
+--- /dev/null
++++ b/test/valid/737840.xml
+@@ -0,0 +1,10 @@
++<!DOCTYPE root [
++<!ELEMENT root (elem)>
++<!ELEMENT elem (#PCDATA)>
++<!ATTLIST elem id ID #IMPLIED>
++<!ENTITY target SYSTEM "dtds/737840.ent">
++]>
++
++<root>
++  &target;
++</root>
+diff --git a/test/valid/dtds/737840.ent b/test/valid/dtds/737840.ent
+new file mode 100644
+index 0000000..e972132
+--- /dev/null
++++ b/test/valid/dtds/737840.ent
+@@ -0,0 +1 @@
++<elem id="id0"/>
+\ No newline at end of file
+diff --git a/valid.c b/valid.c
+index 409aa81..45a3f70 100644
+--- a/valid.c
++++ b/valid.c
+@@ -2634,8 +2634,10 @@ xmlAddID(xmlValidCtxtPtr ctxt, xmlDocPtr doc, const xmlChar *value,
+ 	/*
+ 	 * The id is already defined in this DTD.
+ 	 */
+-	xmlErrValidNode(ctxt, attr->parent, XML_DTD_ID_REDEFINED,
+-			"ID %s already defined\n", value, NULL, NULL);
++	if (ctxt != NULL) {
++	    xmlErrValidNode(ctxt, attr->parent, XML_DTD_ID_REDEFINED,
++			    "ID %s already defined\n", value, NULL, NULL);
++	}
+ #endif /* LIBXML_VALID_ENABLED */
+ 	xmlFreeID(ret);
+ 	return(NULL);
+-- 
+cgit v0.11.2
+
--- a/components/libxml2/test/results-all.master	Thu Nov 05 23:00:39 2015 -0800
+++ b/components/libxml2/test/results-all.master	Thu Nov 05 07:03:40 2015 -0800
@@ -39,7 +39,7 @@
 ## C14N exclusive without comments regression tests
 ## C14N 1.1 without comments regression tests
 ## Catalog and Threads regression tests
-Total 2891 tests, no errors
+Total 2893 tests, no errors
 .........
 ## Parsing recursive test cases
 ## Parsing non-recursive test cases
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libxslt/patches/test-output.patch	Thu Nov 05 07:03:40 2015 -0800
@@ -0,0 +1,41 @@
+Patch origin: upstream
+Patch status: will be part of next version
+
+https://git.gnome.org/browse/libxslt/commit/?id=22eed95c77a17a6ac51b9162ea6ea9a341b29345
+
+From 22eed95c77a17a6ac51b9162ea6ea9a341b29345 Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer <[email protected]>
+Date: Fri, 20 Dec 2013 17:33:43 +0100
+Subject: Adjust expected test output
+
+Adjust expected test output for recent changes in libxml2.
+---
+ tests/exslt/math/power.1.out | 2 +-
+ tests/general/bug-180.err    | 2 --
+ 2 files changed, 1 insertion(+), 3 deletions(-)
+
+diff --git a/tests/exslt/math/power.1.out b/tests/exslt/math/power.1.out
+index 6c3f267..da9cb6d 100644
+--- a/tests/exslt/math/power.1.out
++++ b/tests/exslt/math/power.1.out
+@@ -2,7 +2,7 @@
+ <results>
+    <result>1</result>
+    <result>7</result>
+-   <result> 2.85311670611e+11</result>
++   <result>2.85311670611e+11</result>
+    <result>256</result>
+    <result>243</result>
+ </results>
+diff --git a/tests/general/bug-180.err b/tests/general/bug-180.err
+index e45b36e..e0e568e 100644
+--- a/tests/general/bug-180.err
++++ b/tests/general/bug-180.err
+@@ -1,4 +1,2 @@
+ runtime error: file ./bug-180.xsl line 4 element copy-of
+ Variable 'xxx' has not been declared.
+-XPath error : Stack usage errror
+-xmlXPathCompiledEval: 1 objects left on the stack.
+-- 
+cgit v0.11.2
+