runtest.c


Log

Author Commit Date CI Message
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
Daniel Veillard c935253f 2005-07-04T14:25:34 cleanups, logfile and portability fixed a memory leak Daniel * runsuite.c runtest.c: cleanups, logfile and portability * xmllint.c: fixed a memory leak Daniel
Daniel Veillard 39e5c890 2005-07-03T22:48:50 fixing a leak detected by testapi in xmlDOMWrapAdoptNode, and fixing * testapi.c tree.c: fixing a leak detected by testapi in xmlDOMWrapAdoptNode, and fixing another side effect in testapi seems to pass tests fine now. * include/libxml/parser.h parser.c: xmlStopParser() is no more limited to push mode * error.c: remove a warning * runtest.c xmllint.c: avoid compilation errors if only some parts of the library are compiled in. Daniel
Daniel Veillard 6b6d6809 2005-07-03T21:00:34 fixing compilations when disabling parts of the library at configure time. * runsuite.c runtest.c tree.c: fixing compilations when disabling parts of the library at configure time. Daniel
Daniel Veillard 95175012 2005-07-03T16:09:51 fixing #307823 and a couple of assorted bugs fixed conditionals in * testapi.c runsuite.c runtest.c: fixing #307823 and a couple of assorted bugs * python/generator.py python/libxml2-python-api.xml: fixed conditionals in generator too * doc/apibuild.py doc/libxml2-api.xml doc/* elfgcchack.h: some cleanups too and rebuilt Daniel
Daniel Veillard f2e066ac 2005-06-30T13:04:44 complete, checking on other platforms is needed updated fix a bug raised * runtest.c: complete, checking on other platforms is needed * README: updated * debugXML.c: fix a bug raised by bill on IRC * relaxng.c: fix a leak in weird circumstances * runsuite.c Makefile.am: standalone test tool agaisnt the regression suites, work in progress Daniel
Daniel Veillard 3056404d 2005-06-28T07:30:41 adding URI tests Daniel * runtest.c: adding URI tests Daniel
Daniel Veillard 48dec9d3 2005-06-27T22:56:11 adding xml:id Daniel * runtest.c: adding xml:id Daniel
Daniel Veillard 54a203c1 2005-06-27T22:29:56 finishing XPath, adding XPointer Daniel * runtest.c: finishing XPath, adding XPointer Daniel
Daniel Veillard 970adf5d 2005-06-27T16:40:10 adding more coverage, XInclude and starting XPath Daniel * runtest.c: adding more coverage, XInclude and starting XPath Daniel
Daniel Veillard dbee0f19 2005-06-27T13:42:57 working some weird error reporting problem for DTD validation. augmented * error.c valid.c: working some weird error reporting problem for DTD validation. * runtest.c: augmented with DTD validation tests * result/VC/OneID*: slight change in validation output. Daniel
Daniel Veillard fc319af5 2005-06-27T12:44:55 added most HTML tests Daniel * runtest.c: added most HTML tests Daniel
Daniel Veillard 4a5a964c 2005-06-27T10:40:55 added SAXv2 regression tests apparently missing. added SAX1/SAX2 checks. * result/*.sax2 MAkefile.am: added SAXv2 regression tests apparently missing. * runtest.c: added SAX1/SAX2 checks. Daniel
Daniel Veillard c950d709 2005-06-27T09:15:06 continue to increase the tests Daniel * runtest.c: continue to increase the tests Daniel
Daniel Veillard c111c153 2005-06-27T08:22:10 continue to increase the tests Daniel * runtest.c: continue to increase the tests Daniel
Daniel Veillard fd110d29 2005-06-27T00:02:02 continue to increase the tests Daniel * runtest.c: continue to increase the tests Daniel
Daniel Veillard 1b75c3bd 2005-06-26T21:49:08 avoid name glob in agruments as it matches the glob() routine. first steps * include/libxml/valid.h valid.c: avoid name glob in agruments as it matches the glob() routine. * runtest.c Makefile.am: first steps toward a C regression test framework. Daniel