After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 630682 - Selftest failure (serialize.py)
Selftest failure (serialize.py)
Status: RESOLVED FIXED
Product: libxml2
Classification: Platform
Component: general
2.7.6
Other All
: Normal normal
: ---
Assigned To: Daniel Veillard
libxml QA maintainers
Depends on:
Blocks:
 
 
Reported: 2010-09-27 03:24 UTC by Daniel Macks
Modified: 2012-05-11 04:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sync serialize.py self-test expected results with libxml results (1.34 KB, patch)
2011-01-04 07:58 UTC, Daniel Macks
none Details | Review

Description Daniel Macks 2010-09-27 03:24:06 UTC
I successfully built the libxml2-2.7.7 (note, 2.7.7 not listed in bugzilla "Version" pulldown) core library on OS X 10.6 (32-bit arch), it passed all self-tests with the exception of ebcdic (known deficiency in my libiconv). When I enable building of python bindings, they also build fine, but their self-test fails:

-- OK error.py
-- FAILED serialize.py
error serializing HTML document 4
-- OK validate.py

I'm using fink's python, and get same results with both python2.6 and python2.7. Googling finds a single report of this bug, on linux-fron-scratch mailing list:

http://www.mail-archive.com/blfs-dev@linuxfromscratch.org/msg10068.html

finding it first broke in 2.7.4

I tried with python2.5 just for kicks, but then *every* self-test fails with:

Fatal Python error: Interpreter not initialized (version mismatch?)

I retried the latest available in fink (libxml2-2.6.32) and the self-tests there are clean for all three python versions.
Comment 1 Daniel Macks 2011-01-04 07:58:52 UTC
Created attachment 177458 [details] [review]
Sync serialize.py self-test expected results with libxml results

There appear to be three differences between the expected and actual serialize results. Two of them are solely capitalization differences in the name of a charset in a <meta ...> tag (expecting "charset=iso-8859-1" vs libxml2 returning "charset=ISO-8859-1"). The third is libxml2 returning a <meta ...> tag for the HTML document whereas the test is not expecting that tag at all. Attached patch (given to me by Daniel Johnson) gets it to pass for python25 26 and 27.
Comment 2 Daniel Veillard 2012-05-11 04:41:01 UTC
Slightly more complex than that, the charset changes are right, but
htmlSetMetaEncoding() was broken, so I fixed it but also apply 2 chunks
from your patch. Now "make check" looks okay again :-)

http://git.gnome.org/browse/libxml2/commit/?id=39d027cdb74371d64f68dc488556be41e1d14546

thanks for the patch !

Daniel