Test failures when building with libxml 2.9.12+dfsg-2
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
libxml-ruby |
Fix Released
|
Unknown
|
|||
ruby-libxml (Ubuntu) |
Fix Released
|
High
|
Sergio Durigan Junior |
Bug Description
ruby-libxml's tests are failing with the libxml2 2.9.12+dfsg-2 package.
Here is the autopkgtest log:
1) Failure:
TestParserConte
Expected: 17
Actual: 0
2) Failure:
TestParser#
Expected: 20
Actual: 18
3) Failure:
TestSaxParser#
--- expected
+++ actual
@@ -1 +1 @@
-"error: Fatal error: EndTag: '</' not found at :2."
+"error: Fatal error: Premature end of data in tag Results line 1 at :2."
These are not the only failures, though. Once we fix them, others show up. This makes the package FTBFS, as well as causes autopkgtest failures.
tags: | added: patch |
Changed in libxml-ruby: | |
status: | Unknown → Fix Released |
This patch fixes all the test issues I was able to find while building ruby-libxml against libxml2 2.9.12.
There are a bunch of minor things that changed with this new libxml2 release and that needed to be adjusted in ruby-libxml's testsuite. I've made a list of them in the patch itself.
The first one is the fact that the num_chars parameter (from the Context object) has been deprecated and is now always zero. This comes from the following commit:
https:/ /gitlab. gnome.org/ GNOME/libxml2/ -/commit/ 438e595a8cccbe4 8de3a0be2e0c291 cfe97080b1
The second thing that needed adjustment were the "Fatal error" messages expected when there's a parsing error. These messages had been changed in libxml2 2.9.10, but were changed again (and reverted back) in this latest release.
The third thing is the error code expected when the XML contains a tag that hasn't been finished. The previous error code was LibXML: :XML::Error: :LTSLASH_ REQUIRED, but now libxml2 gives us LibXML: :XML::Error: :TAG_NOT_ FINISHED.
The fourth problem was related to error strings and codes being returned by libxml2. The new codes make more sense (for example, previously we were expecting libxml2 to say that the error was happening on column 20 of an 18-column string, but now the error column is rightfully set to 18).
I've also forwarded the patch upstream:
https:/ /github. com/xml4r/ libxml- ruby/pull/ 173