runtest.c


Log

Author Commit Date CI Message
Nick Wellnhofer da274bfa 2023-09-21T01:29:40 build: Fix build when certain modules are disabled
Nick Wellnhofer 9b5cce7a 2023-09-21T00:44:50 include: Remove more unnecessary includes
Nick Wellnhofer 699299ca 2023-09-20T18:54:39 globals: Stop including globals.h
Nick Wellnhofer 209516ac 2023-09-20T15:49:03 tests: Don't use deprecated symbols
Nick Wellnhofer c3c6cc62 2023-05-24T20:08:33 runtest: Fix compilation without LIBXML_HTML_ENABLED Fixes #545.
Nick Wellnhofer 4f49017e 2023-04-30T21:26:55 tests: Test streaming schema validation
Nick Wellnhofer 0ffc2d82 2023-04-30T20:28:47 runtest: Skip element name in schema error messages This makes sure that memory and streaming tests will report the same messages.
Nick Wellnhofer 886bf4e6 2023-04-30T15:35:47 Stop calling xmlMemoryDump This was used to check for memory leaks but could potentially create a .memdump file. These days, there are better ways to check for memory leaks.
Nick Wellnhofer dd3569ea 2022-12-08T02:43:17 Remove XMLDECL macro from .c files
Nick Wellnhofer 76c6da42 2022-12-04T23:01:00 error: Make sure that error messages are valid UTF-8 This has caused issues with the Python bindings for a long time. Should fix #64.
Nick Wellnhofer 05c3a458 2022-11-25T14:15:43 tests: Check that xmlInitParser doesn't allocate memory
Nick Wellnhofer 34a5a4a5 2022-11-22T15:40:51 tests: Remove unneeded #includes
Nick Wellnhofer 9c63cea5 2022-11-20T15:36:41 test: Add test for push parser boundaries
Nick Wellnhofer ea7c9fb5 2022-10-22T16:48:58 xinclude: Don't create result doc for test with errors
Nick Wellnhofer c99cde3f 2022-10-22T16:59:35 xinclude: Also test error messages The reader interface with XIncludes is somewhat broken and can generate different error messages. Start to move tests which are sketchy with reader to a separate directory.
Nick Wellnhofer a9669679 2022-09-09T01:44:00 error: Don't use initGenericErrorDefaultFunc The code in xmlInitParser did only set the error handler if it was NULL which should never happen.
Nick Wellnhofer 13a66378 2022-09-04T01:05:51 Remove BeOS support Haiku shouldn't be affected.
Nick Wellnhofer caef8563 2022-09-02T17:26:47 Move automata test to runtest.c
Nick Wellnhofer 5bffa33a 2022-09-02T05:03:03 Stop including sys/types.h
Nick Wellnhofer a308c0cd 2022-08-25T20:18:16 Deprecate old HTML SAX API
Nick Wellnhofer c61e1273 2022-04-21T06:03:22 Fix warnings when testing --with-minimum build There's no simple way to make the doc/examples tests handle different configurations. But these tests aren't especially valuable, so remove the result file checks.
Nick Wellnhofer 4612ce30 2022-04-21T03:52:52 Implement xpath1() XPointer scheme See https://www.w3.org/2005/04/xpointer-schemes/
Nick Wellnhofer 67070107 2022-04-20T23:17:14 Add configuration flag for XPointer locations support Add a new configuration flag that controls whether the outdated support for XPointer locations (ranges and points) is enabled. --with-xptr-locs # Autotools LIBXML2_WITH_XPTR_LOCS # CMake The latest spec for what it essentially an XPath extension seems to be this working draft from 2002: https://www.w3.org/TR/xptr-xpointer/ The xpointer() scheme is listed as "being reviewed" in the XPointer registry since at least 2006. libxml2 seems to be the only modern software that tries to implement this spec, but the code has many bugs and quality issues. The flag defaults to "off" and support for this extensions has to be requested explicitly. The relevant API functions are deprecated.
Nick Wellnhofer 7204dbb0 2022-04-13T16:51:49 Don't mix declarations and code in runtest.c
Nick Wellnhofer 48f191e7 2022-04-04T03:12:49 Fix schemas and relaxng tests Run all tests in runtest.c with warnings. This is required to match the schema validation output from xmllint and doesn't seem to cause any problems. Fix the .xml file pattern. Check parser errors. Print xmllint message if Relax-NG schema can't be parsed.
Nick Wellnhofer 5ce893c0 2020-07-09T03:21:07 Move regexp tests to runtest
Nick Wellnhofer f1c32b4c 2020-07-09T03:19:13 Allow missing result files in runtest Treat missing files as empty.
Nick Wellnhofer 95c7f315 2022-04-03T21:39:14 Move SVG tests to runtest.c Also update the test results for the first time since 2000.
David Seifert 865520f0 2022-03-30T00:32:35 Respect `--sysconfdir` in source files * Prefix installations need to point to a non-root `etc` - Gentoo Prefix has been patching this for over 10 years: https://bugs.gentoo.org/317891 - MacPorts has to manually replace paths after patching: https://github.com/macports/macports-ports/blob/cc3bb736e906abe73b014da02a89ae2b70ef6295/textproc/libxml2/Portfile#L46
Nick Wellnhofer 2489c1d0 2022-02-28T22:42:10 Remove useless __CYGWIN__ checks From what I can tell, some really early Cygwin versions from around 1998-2000 used to erroneously define _WIN32. This was eventually fixed, but these days, the `defined(_WIN32) && !defined(__CYGWIN__)` idiom is unnecessary. Now, we only check for __CYGWIN__ in xmlexports.h when deciding whether to use __declspec.
Nick Wellnhofer b057239b 2022-02-22T11:52:38 More fixes to --without-valid build Fix runtest and Python bindings when building --without-valid. The Python tests still fail. There doesn't seem to be a mechanism to disable tests depending on feature flags.
Nick Wellnhofer 21217dd9 2022-01-25T02:34:40 Add explicit casts in runtest.c Avoids integer conversion warnings with UBSan.
Finn Barber 87a99270 2021-08-26T11:50:41 Added regression tests for xmlReadFd() and htmlReadFd()
Nick Wellnhofer e1c2d0ad 2020-08-16T22:22:57 Fix memory leak in runtest.c
Markus Rickert e6ba4bd7 2020-06-04T11:58:04 Add command line option for temp directory in runtest
Nick Wellnhofer f20daa9e 2020-02-11T13:13:52 Enable error tests with entity substitution
Daniel Richard G 1fda3248 2019-10-14T16:48:32 Fix exponent digits when running tests under old MSVC Switch printf output format to two-digit exponent under certain MSVC versions. Closes #111.
Jared Yanovich 2a350ee9 2019-09-30T17:04:54 Large batch of typo fixes Closes #109.
Daniel Richard G 6c91dd94 2019-08-01T15:01:47 Don't call printf with NULL string in runtest.c Avoids undefined behavior causing problems on HP-UX and Solaris. Closes #78.
Nick Wellnhofer dcae579e 2019-01-01T16:48:40 Remove unneeded function pointer casts
Nick Wellnhofer 8919885f 2019-01-01T16:30:38 Fix -Wformat-truncation warnings (GCC 8)
Nick Wellnhofer dc6d2a49 2018-09-04T17:13:29 Don't run icu_parse_test if EUC-JP is unsupported Closes: #25
Nick Wellnhofer 4b413597 2017-10-31T17:17:16 Skip EBCDIC tests if EBCDIC isn't supported Fixes bug 603432.
Nick Wellnhofer cf820462 2017-10-21T14:43:00 Rework handling of return values in thread tests Pass a struct to each thread that contains the filename and the return value. This avoids casting a DWORD to a pointer on Windows.
Nick Wellnhofer 82e0394d 2017-10-09T02:05:41 Fix runtest on Windows Unbuffer the output and fix some compiler warnings.
Nick Wellnhofer e3890546 2017-10-09T00:20:01 Fix the Windows header mess Don't include windows.h and wsockcompat.h from config.h but only when needed. Don't define _WINSOCKAPI_ manually. This was apparently done to stop windows.h from including winsock.h which is a problem if winsock2.h wasn't included first. But on MinGW, this causes compiler warnings. Define WIN32_LEAN_AND_MEAN instead which has the same effect. Always use the compiler-defined _WIN32 macro instead of WIN32.
Nick Wellnhofer 81c01ee9 2017-06-17T14:12:53 Fix unused-parameter warnings
Nick Wellnhofer dbaab1f3 2017-06-16T21:38:57 Test SAX2 callbacks with entity substitution This detects regressions like bug 760367.
Nick Wellnhofer 01a4b81a 2017-06-16T21:27:47 Support catalog and threads tests under --without-sax1
David Kilzer 85c112a0 2017-06-12T18:26:11 Add test cases for bug 758518 test/HTML/758518-entity.html exposed a bug in pushParseTest() in runtest.c which assumed that an input file was at least 4 bytes long. That test case is only 3 bytes, so we now take the minimum of 4 bytes or the length of the test input. We also now use 'chunkSize' in place of the hard-coded value '1024' later in the function.
Nick Wellnhofer e2663054 2017-06-05T15:37:17 Fix handling of parameter-entity references There were two bugs where parameter-entity references could lead to an unexpected change of the input buffer in xmlParseNameComplex and xmlDictLookup being called with an invalid pointer. Percent sign in DTD Names ========================= The NEXTL macro used to call xmlParserHandlePEReference. When parsing "complex" names inside the DTD, this could result in entity expansion which created a new input buffer. The fix is to simply remove the call to xmlParserHandlePEReference from the NEXTL macro. This is safe because no users of the macro require expansion of parameter entities. - xmlParseNameComplex - xmlParseNCNameComplex - xmlParseNmtoken The percent sign is not allowed in names, which are grammatical tokens. - xmlParseEntityValue Parameter-entity references in entity values are expanded but this happens in a separate step in this function. - xmlParseSystemLiteral Parameter-entity references are ignored in the system literal. - xmlParseAttValueComplex - xmlParseCharDataComplex - xmlParseCommentComplex - xmlParsePI - xmlParseCDSect Parameter-entity references are ignored outside the DTD. - xmlLoadEntityContent This function is only called from xmlStringLenDecodeEntities and entities are replaced in a separate step immediately after the function call. This bug could also be triggered with an internal subset and double entity expansion. This fixes bug 766956 initially reported by Wei Lei and independently by Chromium's ClusterFuzz, Hanno Böck, and Marco Grassi. Thanks to everyone involved. xmlParseNameComplex with XML_PARSE_OLD10 ======================================== When parsing Names inside an expanded parameter entity with the XML_PARSE_OLD10 option, xmlParseNameComplex would call xmlGROW via the GROW macro if the input buffer was exhausted. At the end of the parameter entity's replacement text, this function would then call xmlPopInput which invalidated the input buffer. There should be no need to invoke GROW in this situation because the buffer is grown periodically every XML_PARSER_CHUNK_SIZE characters and, at least for UTF-8, in xmlCurrentChar. This also matches the code path executed when XML_PARSE_OLD10 is not set. This fixes bugs 781205 (CVE-2017-9049) and 781361 (CVE-2017-9050). Thanks to Marcel Böhme and Thuan Pham for the report. Additional hardening ==================== A separate check was added in xmlParseNameComplex to validate the buffer size.
Nick Wellnhofer c2545cbb 2016-08-22T11:44:18 Fix format string warnings Also fixes bug #768199: https://bugzilla.gnome.org/show_bug.cgi?id=768199
Nick Wellnhofer 1fc55ca7 2016-06-25T12:35:09 Don't print generic error messages in XPath tests
Pranjal Jumde a820dbea 2016-03-01T11:34:04 Bug 758605: Heap-based buffer overread in xmlDictAddString <https://bugzilla.gnome.org/show_bug.cgi?id=758605> Reviewed by David Kilzer. * HTMLparser.c: (htmlParseName): Add bounds check. (htmlParseNameComplex): Ditto. * result/HTML/758605.html: Added. * result/HTML/758605.html.err: Added. * result/HTML/758605.html.sax: Added. * runtest.c: (pushParseTest): The input for the new test case was so small (4 bytes) that htmlParseChunk() was never called after htmlCreatePushParserCtxt(), thereby creating a false positive test failure. Fixed by using a do-while loop so we always call htmlParseChunk() at least once. * test/HTML/758605.html: Added.
Daniel Veillard 9f2416c6 2016-05-22T11:14:45 Add more debugging info to runtest When there is a failure, indicates what failed instead of just dumping the tested file name.
David Kilzer 5c37382f 2016-05-22T09:58:30 Implement "runtest -u" mode For https://bugzilla.gnome.org/show_bug.cgi?id=611807 Using "make tests" to add new tests is error prone. This patch implements a "runtest -u" mode that makes it much easier to create baselines for new tests.
Philip Withnall 5777ae75 2014-06-20T21:15:16 runtest: Fix a memory leak on parse failure Coverity issue: #60439 https://bugzilla.gnome.org/show_bug.cgi?id=731990
Daniel Veillard a7982ce2 2012-10-25T15:39:39 Adding streaming validation to runtest checks
Daniel Veillard ff7227f2 2012-08-20T20:58:24 Patch for portability of latin characters in C files Coming from LibreOffice repository: http://cgit.freedesktop.org/libreoffice/core/plain/libxml2/libxml2-latin.patch
Roumen Petrov c3b1d09b 2012-08-13T16:50:48 clean redefinition of {v}snprintf in C-source as those from *config.h are preferable (e.g. win32config.h)
Roumen Petrov 1f0453f7 2012-08-13T16:56:11 minimize use of HAVE_CONFIG_H as build process for supported platforms provide "config.h" header file
Daniel Richard G 495a73df 2012-08-07T10:14:56 fix runtests to use pthreads support for various Unix platforms The runtests program currently fails with Specific platform thread support not detected on HP-UX, AIX and other Unix systems which do not match the conditional #if defined(linux) || defined(__sun) || defined(__APPLE_CC__) It is silly to try to enumerate all systems which use pthreads in a conditional like this. I am attaching a patch (against git master) that rewrites the cpp conditional structure so that pthreads is used if HAVE_PTHREAD_H is defined, and moves that section of code down below the Win32 and BeOS cases so that native thread libraries are used preferentially in those two cases.
Daniel Veillard 22030ef8 2012-05-23T15:52:45 Restore code for Windows compilation Try to keep as close to rc1 but still allow the change from Roumen for mingw
Roumen Petrov 978ff224 2012-05-20T16:07:54 use mingw C99 compatible functions {v}snprintf instead those from MSVC runtime
Rob Richards c9667907 2010-01-22T08:24:25 Fix relaxNG tests in runtest for Windows * runtest.c: initialize ret
Daniel Veillard 594e5dfb 2009-09-07T14:58:47 Chasing dead assignments reported by clang-scan * SAX2.c dict.c error.c hash.c nanohttp.c parser.c python/libxml.c relaxng.c runtest.c tree.c valid.c xinclude.c xmlregexp.c xmlsave.c xmlschemas.c xpath.c xpointer.c: mostly removing unneded affectations, but this led to a few real bugs and some part not yet understood (relaxng/interleave)
Daniel Veillard 13cee4e3 2009-09-05T14:52:55 Fix a bunch of scan 'dead increments' and cleanup * HTMLparser.c c14n.c debugXML.c entities.c nanohttp.c parser.c testC14N.c uri.c xmlcatalog.c xmllint.c xmlregexp.c xpath.c: fix unused variables, or unneeded increments as well as a couple of space issues * runtest.c: check for NULL before calling unlink()
Daniel Veillard ec18c960 2009-08-26T18:37:43 558452 fight with reg test and error report * relaxng.c: tiny fix and provide more context on some errors * result/relaxng/558452_0* test/relaxng/558452*: add some regression tests for the bugs * Makefile.am runtest.c: fight with the fact streaming error messages can differ due to missing node context
Tim Rice 85b07d18 2009-08-25T12:38:29 Runtest portability patch for Solaris * runtest.c: use defined(__sun) instead of defined(solaris)
Aleksey Sanin 83868247 2009-07-09T10:26:22 Aleksey Sanin support for c14n 1.1 * c14n.c include/libxml/c14n.h: adds support for C14N 1.1, new flags at the API level * runtest.c Makefile.am testC14N.c xmllint.c: add support in CLI tools and test binaries * result/c14n/1-1-without-comments/* test/c14n/1-1-without-comments/*: add a new batch of tests
Daniel Veillard aa6de47e 2008-08-25T14:53:31 applied patch from Aswin to fix tree skipping fixed a comment and added a * xmlreader.c: applied patch from Aswin to fix tree skipping * include/libxml/entities.h entities.c: fixed a comment and added a new xmlNewEntity() entry point * runtest.c: be less verbose * tree.c: space and tabs cleanups daniel svn path=/trunk/; revision=3774
CEST 2008 Sven Herzberg dc41d862 2008-08-07T13:52:30 Bug 546629 – runtests doesn't pass on my mac Reviewed by William M. Thu Aug 7 15:51:31 CEST 2008 Sven Herzberg <sven@imendio.com> Bug 546629 – runtests doesn't pass on my mac Reviewed by William M. Brack. * runtest.c: use libpthread on Mac OS X as well svn path=/trunk/; revision=3766
Daniel Veillard 438ebbd5 2008-05-12T12:58:46 fx compilation when configured without the reader should fix #513110 * xmlschemas.c runtest.c testapi.c include/libxml/xmlreader.h python/types.c python/libxml_wrap.h python/libxml.c: fx compilation when configured without the reader should fix #513110 * doc/*: regenerated Daniel svn path=/trunk/; revision=3743
Daniel Veillard 381ff364 2006-06-18T17:31:31 applied patch from Boz for VMS and reporting Schemas errors. Daniel * runtest.c: applied patch from Boz for VMS and reporting Schemas errors. Daniel
Daniel Veillard 11ce4004 2006-03-10T00:36:23 end of first pass on coverity reports. Daniel * runtest.c schematron.c testAutomata.c tree.c valid.c xinclude.c xmlcatalog.c xmlreader.c xmlregexp.c xpath.c: end of first pass on coverity reports. Daniel
Daniel Veillard 6a0baa0c 2005-12-10T11:11:12 fixed a number of warnings shown by HP-UX compiler and reported by Rick * HTMLparser.c configure.in parserInternals.c runsuite.c runtest.c testapi.c xmlschemas.c xmlschemastypes.c xmlstring.c: fixed a number of warnings shown by HP-UX compiler and reported by Rick Jones Daniel
Daniel Veillard 93e577f1 2005-11-15T08:50:04 Hisashi Fujinaka pointed that errors in Schemas tests were not properly * runtest.c: Hisashi Fujinaka pointed that errors in Schemas tests were not properly reported. Daniel
Daniel Veillard f93a67e9 2005-10-28T16:37:05 tiny fix from Albert Chin portability cleanup for arch needing trio for * libxml.3: tiny fix from Albert Chin * runsuite.c runtest.c testapi.c: portability cleanup for arch needing trio for *printf Daniel
Daniel Veillard 567a45b5 2005-10-18T19:11:55 removed the error message removed 2 instability warnings from function * runtest.c: removed the error message * relaxng.c xmlschemas.c: removed 2 instability warnings from function documentation * include/libxml/schemasInternals.h: changed warning about API stability * xmlregexp.c: trying to improve runtime execution of non-deterministic regexps and automata. Not fully finished but should be way better. Daniel
Daniel Veillard 8874b94c 2005-08-25T13:19:21 added a parser XML_PARSE_COMPACT option to allocate small text nodes (less * HTMLparser.c parser.c SAX2.c debugXML.c tree.c valid.c xmlreader.c xmllint.c include/libxml/HTMLparser.h include/libxml/parser.h: added a parser XML_PARSE_COMPACT option to allocate small text nodes (less than 8 bytes on 32bits, less than 16bytes on 64bits) directly within the node, various changes to cope with this. * result/XPath/tests/* result/XPath/xptr/* result/xmlid/*: this slightly change the output Daniel
Daniel Veillard bca3ad25 2005-08-23T22:14:02 fixed compilation when configured --without-sax1 and other cleanups fixes * SAX2.c globals.c runtest.c testC14N.c testapi.c tree.c include/libxml/SAX2.h include/libxml/xmlregexp.h: fixed compilation when configured --without-sax1 and other cleanups fixes bug #172683 * doc/* elfgcchack.h: regenerated Daniel
Daniel Veillard 60faf528 2005-08-10T16:23:57 fixed bug #307377 about validation of choices in list values. added * relaxng.c: fixed bug #307377 about validation of choices in list values. * test/relaxng/307377* result/relaxng/307377* Makefile.am runtest.c: added examples to the regression tests, problem is that streaming version gives slightly more informations. Daniel
Daniel Veillard 336a8e13 2005-08-07T10:46:19 get rid of the dependancy on a locally installed DTD try to cleanup the * test/relaxng/docbook_0.xml: get rid of the dependancy on a locally installed DTD * uri.c include/libxml/uri.h xmlIO.c nanoftp.c nanohttp.c: try to cleanup the Path/URI conversion mess, needed fixing in various layers and a new API to the uri module which also fixes #306861 * runtest.c: integrated a regression test specific to check the URI conversions done before calling the I/O handlers. Daniel
Daniel Veillard db68b74d 2005-07-30T13:18:24 allows an extra argument to subset the tests big speedup for validation, * runtest.c: allows an extra argument to subset the tests * xmlregexp.c: big speedup for validation, basically avoided transition creation explosion when removing epsilon transition Daniel
Daniel Veillard 24505b0f 2005-07-28T23:49:35 a lot of small cleanups based on Linus' sparse check output. Daniel * HTMLparser.c SAX2.c encoding.c globals.c parser.c relaxng.c runsuite.c runtest.c schematron.c testHTML.c testReader.c testRegexp.c testSAX.c testThreads.c valid.c xinclude.c xmlIO.c xmllint.c xmlmodule.c xmlschemas.c xpath.c xpointer.c: a lot of small cleanups based on Linus' sparse check output. Daniel
Daniel Veillard ffa3c749 2005-07-21T13:24:09 applied a patch from Marcus Boerger to fix problems with calling * error.c globals.c parser.c runtest.c testHTML.c testSAX.c threads.c valid.c xmllint.c xmlreader.c xmlschemas.c xmlstring.c xmlwriter.c include/libxml/parser.h include/libxml/relaxng.h include/libxml/valid.h include/libxml/xmlIO.h include/libxml/xmlerror.h include/libxml/xmlexports.h include/libxml/xmlschemas.h: applied a patch from Marcus Boerger to fix problems with calling conventions on Windows this should fix #309757 Daniel
William M. Brack ca15a546 2005-07-06T20:41:33 Reformatted on Windows, then re-committed to CVS
William M. Brack 12baaecd 2005-07-06T20:22:00 fix #define for windows
William M. Brack fa8d5d96 2005-07-06T19:44:03 removed spurious ^M added check for option O_BINARY changed sticky tag to * win32/Makefile.msvc: removed spurious ^M * runtest.c: added check for option O_BINARY * test/schemas/bug309338*, result/schemas/bug309338*: changed sticky tag to 'binary'
William M. Brack 0357a308 2005-07-06T17:39:14 excluded content string check for XML_ELEMENT_DECL in * debugXML.c: excluded content string check for XML_ELEMENT_DECL in xmlCtxtGenericNodeCheck * runtest.c: changed "open" calls to include O_BINARY for Windows
Kasimier T. Buchcik 87db1cf6 2005-07-05T10:40:52 Tiny portability adjustment for win. Added runtest.exe and runsuite.exe to * runsuite.c runtest.c: Tiny portability adjustment for win. * win32/Makefile.*: Added runtest.exe and runsuite.exe to be created.
Daniel Veillard 91fe3edc 2005-07-04T18:13:15 Windows fixup++, Daniel
Daniel Veillard cfbb0dd8 2005-07-04T17:12:01 Trying to fix CR/LF troubles, Daniel
Daniel Veillard 73c0f71a 2005-07-04T16:53:16 atempt++, Daniel
Daniel Veillard f7d1660d 2005-07-04T16:47:58 windows_sucks++ , Daniel
Daniel Veillard 9e09c144 2005-07-04T16:31:10 Yet Another Windows Debugging Remote Patch From CVS Hell, Daniel
Daniel Veillard 89074392 2005-07-04T16:24:31 One more fixup, Daniel
Daniel Veillard 25450d06 2005-07-04T16:02:38 One more fixup, daniel
Daniel Veillard 90837789 2005-07-04T15:45:10 first stb at unimplemnted detection fixing Windows code Daniel * runsuite.c: first stb at unimplemnted detection * runtest.c: fixing Windows code Daniel
Daniel Veillard 4ac5f9af 2005-07-04T15:20:27 fix on schemas error portability glob() on Windows Daniel * runsuite.c: fix on schemas error * runtest.c: portability glob() on Windows Daniel