|
e8fb3d63
|
2024-01-02T17:45:54
|
|
parser: Convert some "internal errors" to meaningful codes
|
|
d944a415
|
2023-12-26T02:10:35
|
|
parser: Fix in-parameter-entity and in-external-dtd checks
Use in ctxt->input->entity instead of ctxt->inputNr to determine whether
we are inside a parameter entity.
Stop using ctxt->external to check whether we're in an external DTD.
This is signaled by ctxt->inSubset == 2.
|
|
138213ac
|
2023-08-15T12:49:27
|
|
python: Fix tests on MinGW
Add the directory containing libxml2.dll with os.add_dll_directory to
make tests work on MinGW.
This has changed in Python 3.8 but for some reason, the issue only
turned up with Python 3.11 on MinGW. Contrary to documentation, copying
libxml2.dll into the directory containing the .pyd file doesn't work.
|
|
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.
|
|
cb1b8b85
|
2023-04-10T13:06:18
|
|
xmlValidatePopElement() can return invalid value (-1)
Covered by: test/VC/ElementValid5
This only affects XML Reader API with LIBXML_REGEXP_ENABLED and
LIBXML_VALID_ENABLED turned on.
* result/VC/ElementValid5.rdr:
- Update result to add missing error message.
* python/tests/reader2.py:
* result/VC/ElementValid6.rdr:
* result/VC/ElementValid7.rdr:
* result/valid/781333.xml.err.rdr:
- Update result to fix grammar issue.
* valid.c:
(xmlValidatePopElement):
- Check return value of xmlRegExecPushString() to handle -1, and
assign 'ret = 0;' to return 0 from xmlValidatePopElement().
This change affects xmlTextReaderValidatePop() from
xmlreader.c.
- Fix grammar of error message by changing 'child' to
'children'.
|
|
74aa61e0
|
2023-01-22T13:09:03
|
|
parser: Halt parser on DTD errors
If we try to continue parsing after an error in the internal or external
subset, entity expansion accounting gets more complicated. Simply halt
the parser.
Found with libFuzzer.
|
|
4762c856
|
2022-12-06T21:40:01
|
|
Use python3 not python
As per https://peps.python.org/pep-0394/, the python binary can be one
of the following options:
- Python 2
- Python 3
- Not exist
All of the scripts in libxml2 use 'python', which may not exist.
As Python 2 reached EOL on the 1st January 2020, it's safe to move the
scripts to use python3 explicitly.
|
|
0ac8c15e
|
2022-12-06T15:48:55
|
|
python/tests/reader2: use absolute paths everywhere
The expected errors contain an relative path, but the messages from the
parser contain absolute paths. However, due to the tests not actually
failing if there was an error this wasn't noticed.
Instead of putting relative paths in the expected messages use format()
to embed the correct absolute path.
Also use os.path.join() consistently when constructing paths to ensure
uniformly formatted paths.
|
|
b9ba5e1d
|
2022-12-06T15:34:04
|
|
python/tests/reader2: always exit(1) if a test fails
Batch up the errors in the first parse tests and ensure that the last
tests exit with an error if they fail.
Also remove an unused import.
|
|
a62b31f4
|
2022-04-06T19:57:30
|
|
Use portable python shebangs
* In conda or Gentoo Prefix, we don't want to use the system python and
instead rely on PATH lookup.
|
|
0137d987
|
2022-03-30T22:00:50
|
|
python/tests: open() relative to test scripts
|
|
8f62ac92
|
2020-01-01T19:16:10
|
|
Updated Python test reader2.py
Added all test cases that have a non-empty error in result/valid/*.xml.err
Restructured to make it easier extensible with new test cases
Added coding cookie because there is non-ASCII in the error messages
|
|
2cb6bf8e
|
2013-03-30T21:38:20
|
|
update all tests for Python3 and Python2
|
|
4c004147
|
2003-10-07T11:33:24
|
|
switched Relax-NG module to teh new error reporting. Better default
* error.c relaxng.c include/libxml/xmlerror.h: switched Relax-NG
module to teh new error reporting. Better default report, adds
the element associated if found, context and node are included
in the xmlError
* python/tests/reader2.py: the error messages changed.
* result/relaxng/*: error message changed too.
Daniel
|
|
bb5ababa
|
2003-10-03T22:21:51
|
|
more cleanup in make tests more work in the transition to the new error
* Makefile.am: more cleanup in make tests
* error.c valid.c parser.c include/libxml/xmlerror.h: more work
in the transition to the new error reporting strategy.
* python/tests/reader2.py result/VC/* result/valid/*:
few changes in the strings generated by the validation output
Daniel
|
|
4432df23
|
2003-09-28T18:58:27
|
|
cleanup, creating a new legacy.c module, made sure make tests ran in
* Makefile.am: cleanup, creating a new legacy.c module,
made sure make tests ran in reduced conditions
* SAX.c SAX2.c configure.in entities.c globals.c parser.c
parserInternals.c tree.c valid.c xlink.c xmlIO.c xmlcatalog.c
xmlmemory.c xpath.c xmlmemory.c include/libxml/xmlversion.h.in:
increased the modularization, allow to configure out
validation code and legacy code, added a configuration
option --with-minimum compiling only the mandatory code
which then shrink to 200KB.
Daniel
|
|
8d73bcb5
|
2003-08-04T01:06:15
|
|
added a new API to split a QName without generating any memory allocation
* tree.c include/libxml/tree.h: added a new API to split a
QName without generating any memory allocation
* valid.c: fixed another problem with namespaces on element
in mixed content case
* python/tests/reader2.py: updated the testcase with
Bjorn Reese fix to reader for unsignificant white space
* parser.c HTMLparser.c: cleanup.
Daniel
|
|
781ac8b1
|
2003-05-15T22:11:36
|
|
patch from Stéphane Bidoul for setting up threads global defaults. this
* build_glob.py global.data globals.c parser.c
include/libxml/globals.h: patch from Stéphane Bidoul for setting
up threads global defaults.
* doc/libxml2-api.xml: this extends the API with new functions
* python/tests/Makefile.am python/tests/reader2.py
python/tests/thread2.py: integrated the associated testcase and
fixed the error string used in reader2
Daniel
|
|
a880b124
|
2003-04-21T21:36:41
|
|
a lot of performance work especially the speed of streaming through the
* globals.c libxml.h parser.c parserInternals.c tree.c xmllint.c
xmlreader.c include/libxml/parser.h: a lot of performance work
especially the speed of streaming through the reader and push
interface. Some thread related optimizations. Nearly doubled the
speed of parsing through the reader.
Daniel
|
|
067bae5f
|
2003-01-05T01:27:54
|
|
seriously changed the way data are pushed to the underlying parser, go by
* xmlreader.c: seriously changed the way data are pushed to
the underlying parser, go by block of 512 bytes instead of
tryng to detect tag boundaries at that level. Changed the
way empty element are detected and tagged.
* python/tests/reader.py python/tests/reader2.py
python/tests/reader3.py: small changes mostly due to context
reporting being different and DTD node being reported. Some
errors previously undetected are now caught and fixed.
* doc/xmlreader.html: flagged last section as TODO
Daniel
|
|
2bc13cac
|
2003-01-04T19:06:55
|
|
fixed a small problem related to order of files in dir, Daniel
|
|
a80ff6ec
|
2003-01-03T12:52:08
|
|
okay the DTD validation code on top of the XMLTextParser API should be
* xmlreader.c python/tests/reader2py: okay the DTD validation
code on top of the XMLTextParser API should be solid now.
Daniel
|
|
1fdfd115
|
2003-01-03T01:18:43
|
|
Fixing some more mess with validation and recursive entities while using
* xmlreader.c python/tests/reader2py: Fixing some more mess
with validation and recursive entities while using the
reader interface, it's getting a bit messy...
Daniel
|
|
9e395c28
|
2003-01-01T14:50:44
|
|
fixed another validity checking in external parsed entities raised by
* xmlreader.c python/tests/reader2.py: fixed another validity
checking in external parsed entities raised by Stéphane Bidoul
and added a specific regression test.
* python/tests/reader3.py: cleanup
Daniel
|
|
d5896140
|
2002-12-31T14:45:26
|
|
fixed a problem with validation within entities pointed by Stéphane
* xmlreader.c python/tests/reader2.py: fixed a problem with
validation within entities pointed by Stéphane Bidoul, augmented
the tests to catch those.
Daniel
|
|
e18fc185
|
2002-12-28T22:56:33
|
|
extended the XmlTextReader API a bit, addding accessors for the current
* xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml:
extended the XmlTextReader API a bit, addding accessors for
the current doc and node, and an entity substitution mode for
the parser.
* python/libxml.py python/libxml2class.txt: related updates
* python/tests/Makefile.am python/tests/reader.py
python/tests/reader2.py python/tests/reader3.py: updated a bit
the old tests and added a new one to test the entities handling
Daniel
|
|
aba976d8
|
2002-12-28T21:14:18
|
|
changed the generator to provide casing for the XmlTextReader similar to
* python/generator.py python/libxml2class.txt
python/tests/reader.py python/tests/reader2.py: changed the
generator to provide casing for the XmlTextReader similar to
C# so that examples and documentation are more directly transposable.
Fixed the couple of tests in the suite.
Daniel
|
|
336fc7d3
|
2002-12-27T19:37:04
|
|
final touch running DTD validation on the XmlTextReader added a specific
* valid.c xmlreader.c: final touch running DTD validation
on the XmlTextReader
* python/tests/Makefile.am python/tests/reader2.py: added a
specific run based on the examples from test/valid/*.xml
Daniel
|