Bug 1961070 - perl-HTML-TreeBuilder-LibXML-0.26-18.fc35 FTBFS with libxml2-2.9.12: Failed test at t/05_empty.t line 18
Summary: perl-HTML-TreeBuilder-LibXML-0.26-18.fc35 FTBFS with libxml2-2.9.12: Failed t...
Alias: None
Product: Fedora
Classification: Fedora
Component: perl-HTML-TreeBuilder-LibXML
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Emmanuel Seyman
QA Contact: Fedora Extras Quality Assurance
URL: https://koschei.fedoraproject.org/pac...
Depends On:
Blocks: F35FTBFS 1964648 1964653 1964655 1964657
TreeView+ depends on / blocked
Reported: 2021-05-17 07:30 UTC by Petr Pisar
Modified: 2021-06-14 19:23 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2021-06-14 19:23:34 UTC
Type: Bug

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github tokuhirom HTML-TreeBuilder-LibXML issues 16 0 None open t/05_empty.t fails with libxml2 2.9.12 2021-05-21 10:41:01 UTC

Description Petr Pisar 2021-05-17 07:30:51 UTC
perl-HTML-TreeBuilder-LibXML-0.26-18.fc35 fails to build in Fedora 35 because a test fails:

$ perl -Ilib t/05_empty.t
ok 1
ok 2
ok 3
ok 4
ok 5
ok 6
ok 7
ok 8
not ok 9
#   Failed test at t/05_empty.t line 18.
#                   ''
#     doesn't match '(?^:<html>)'
ok 10
ok 11
not ok 12
#   Failed test at t/05_empty.t line 18.
#                   ''
#     doesn't match '(?^:<html>)'
ok 13
ok 14
not ok 15
#   Failed test at t/05_empty.t line 18.
#                   ''
#     doesn't match '(?^:<html>)'
# Looks like you failed 3 tests of 15.

A difference between passing and failing build root is at <https://koschei.fedoraproject.org/build/10320715>. The failure is triggered by upgrading libxml2 from 2.9.10-12.fc35 to 2.9.12-1.fc35.

Comment 1 Emmanuel Seyman 2021-06-14 14:49:19 UTC
The test fails because HTML::TreeBuilder::LibXML returns an empty string while the test expects something containing <html>.

Looking at HTML::TreeBuilder::LibXML::Node::as_HTML(), it calls toStringHTML(), falls back on XML::LibXML::Node::toStringC14N() and finally on XML::LibXML::Node::toString(). In the case of an empty string, toStringHTML() cannot be called and, while XML::LibXML::Node::toString() returns '<html><body/></html>', XML::LibXML::Node::toStringC14N() returns an empty string without errors (so this ends up being used).


Comment 2 Emmanuel Seyman 2021-06-14 19:23:34 UTC
Built for rawhide:

Note You need to log in before you can comment on or make changes to this bug.