Description: Following fixes to build with libxml 2.12, this test fails. Log: [_RUN_____] (anonymous namespace)::SerializerTest::serializerTest /builddir/build/BUILD/libreoffice-7.6.3.2/unoxml/qa/unit/domtest.cxx:334:(anonymous namespace)::SerializerTest::serializerTest assertion failed - Expression: false - Valid input file did not result in XDocument (exception thrown) (anonymous namespace)::SerializerTest::serializerTest finished in: 0ms domtest.cxx:224:Assertion Test name: (anonymous namespace)::BasicTest::validInputTest assertion failed - Expression: false - Valid input file did not result in XDocument (exception thrown) domtest.cxx:238:Assertion Test name: (anonymous namespace)::BasicTest::warningInputTest assertion failed - Expression: false - Valid input file did not result in XDocument #2 (exception thrown) domtest.cxx:334:Assertion Test name: (anonymous namespace)::SerializerTest::serializerTest assertion failed - Expression: false - Valid input file did not result in XDocument (exception thrown) Failures !!! Run: 4 Failure total: 3 Failures: 3 Errors: 0 Actual Results: [_RUN_____] (anonymous namespace)::SerializerTest::serializerTest /builddir/build/BUILD/libreoffice-7.6.3.2/unoxml/qa/unit/domtest.cxx:334:(anonymous namespace)::SerializerTest::serializerTest assertion failed - Expression: false - Valid input file did not result in XDocument (exception thrown) (anonymous namespace)::SerializerTest::serializerTest finished in: 0ms domtest.cxx:224:Assertion Test name: (anonymous namespace)::BasicTest::validInputTest assertion failed - Expression: false - Valid input file did not result in XDocument (exception thrown) domtest.cxx:238:Assertion Test name: (anonymous namespace)::BasicTest::warningInputTest assertion failed - Expression: false - Valid input file did not result in XDocument #2 (exception thrown) domtest.cxx:334:Assertion Test name: (anonymous namespace)::SerializerTest::serializerTest assertion failed - Expression: false - Valid input file did not result in XDocument (exception thrown) Failures !!! Run: 4 Failure total: 3 Failures: 3 Errors: 0 Expected Results: Test passes Reproducible: Always User Profile Reset: No Additional Info: Complete log: https://kojipkgs.fedoraproject.org//work/tasks/2557/109622557/build.log
Still occurs on 7.6.4.1.
(In reply to Gwyn Ciesla from comment #0) > Complete log: > https://kojipkgs.fedoraproject.org//work/tasks/2557/109622557/build.log The link is 404. I noticed there is a patch: https://gerrit.libreoffice.org/c/libvisio/+/160542 tests: Fix build with libxml 2.12 libxml 2.12.0 reorganized the headers, which removed `xmlParseMemory` function from the scope. Gwyn: can you try, if the fix for unoxml/qa/unit/domtest.cxx would be likewise simple?
Ah, now Jan gave more info in the patch (which I merged): Yes, the header clean-ups broke too many projects (see https://github.com/NixOS/nixpkgs/pull/269060#issuecomment-1837213807 for a partial list of projects needing similar patches), so 2.12.3 reintroduced the cyclic reference between headers. The patch is therefore not strictly necessary any more. But it is probably still a good idea to include proper header for each symbol rather than relying on transitive includes.
how should a simple include help with *running the test*? I mean, the *build* already was fixed with https://cgit.freedesktop.org/libreoffice/core/commit/?id=c8f7408db73d2f2ccacb25a2b4fef8dfebdfc6cb out of https://bugs.documentfoundation.org/show_bug.cgi?id=158302 But one can try, I don't have much hope there, though. Confirming btw. (Also in 24.2)
(In reply to Buovjaga from comment #2) > (In reply to Gwyn Ciesla from comment #0) > > Complete log: > > https://kojipkgs.fedoraproject.org//work/tasks/2557/109622557/build.log > > The link is 404. > > I noticed there is a patch: > https://gerrit.libreoffice.org/c/libvisio/+/160542 > tests: Fix build with libxml 2.12 > libxml 2.12.0 reorganized the headers, which removed `xmlParseMemory` > function from the scope. > > Gwyn: can you try, if the fix for unoxml/qa/unit/domtest.cxx would be > likewise simple? btw, except this warning importtest.cpp: In function 'librevenge::RVNGString {anonymous}::getXPathContent(xmlDocPtr, const librevenge::RVNGString&)': importtest.cpp:149:3: warning: case value '5' not in enumerated type 'xmlXPathObjectType' [-Wswitch] 149 | case XPATH_POINT: | ^~~~ importtest.cpp:150:3: warning: case value '6' not in enumerated type 'xmlXPathObjectType' [-Wswitch] 150 | case XPATH_RANGE: | ^~~~ importtest.cpp:151:3: warning: case value '7' not in enumerated type 'xmlXPathObjectType' [-Wswitch] 151 | case XPATH_LOCATIONSET: | ^~~~ libvisio actually builds and the tests *do* run with libxml2 2.12. Just tried here. Th e commit you mentioned btw doesn't actually change the warning.
Ah, nevermind, that is because our libxml2 is 2.12.3..
which means, because my tests ARE with 2.12.3, is that adding a simple header won't have an effect to *running the test* anyways.
ene@frodo:~/LibreOffice/git/libreoffice-24-2/unoxml$ git diff . diff --git a/unoxml/CppunitTest_unoxml_domtest.mk b/unoxml/CppunitTest_unoxml_domtest.mk index e6a6b2959d67..8f5a3573f5a8 100644 --- a/unoxml/CppunitTest_unoxml_domtest.mk +++ b/unoxml/CppunitTest_unoxml_domtest.mk @@ -27,6 +27,7 @@ $(eval $(call gb_CppunitTest_use_components,unoxml_domtest,\ $(eval $(call gb_CppunitTest_use_externals,unoxml_domtest, \ boost_headers \ + libxml2 \ )) $(eval $(call gb_CppunitTest_use_libraries,unoxml_domtest, \ diff --git a/unoxml/qa/unit/domtest.cxx b/unoxml/qa/unit/domtest.cxx index 479ff3fea697..4f715fd342cb 100644 --- a/unoxml/qa/unit/domtest.cxx +++ b/unoxml/qa/unit/domtest.cxx @@ -32,6 +32,8 @@ #include <com/sun/star/xml/sax/XFastSAXSerializable.hpp> #include <com/sun/star/xml/sax/SAXParseException.hpp> +#include <libxml/parser.h> + using namespace ::comphelper; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; expectedly DOES NOT fix it. (First one is needed because somehow nothing in unoxml uses libxml directly so the include doesn't get found.) Since libxml2 is not used here anyway - this means the problem actually is outside of unoxml? sax, maybe?
The SerializerTest unoxml domtest failure should be fixed now with: https://cgit.freedesktop.org/libreoffice/core/commit/?id=cbb17a548b5cc6a99b6ed7735479bb4f2bc40f26
Seeing as I was now able to upgrade the internal libxml2 to latest 2.12 I think this is now fixed. Backport of the test failure fixed to 7-6 at: https://gerrit.libreoffice.org/c/core/+/161643 https://gerrit.libreoffice.org/c/core/+/161598 was the internal update effort FWIW
Thank you!