python/tests/thread2.py


Log

Author Commit Date CI Message
Nick Wellnhofer fc26934e 2023-09-21T23:29:18 memory: Fix memory debugging with Windows threads On Windows, malloc hooks can be called after the final call to xmlCleanupParser in various tests. This means that xmlMemMutex can still be accessed if memory debugging is enabled, so the mutex should not be cleaned. This also means that tests may report spurious memory leaks on Windows. The old implementation avoided the issue by keeping track of all global state objects in a doubly linked list, so they could be cleaned during xmlCleanupParser. But as far as I can tell all memory will be freed eventually, so this is mostly an issue with our test suite.
Nick Wellnhofer 89ee0369 2023-09-21T15:13:16 python: Fix potential crash in tests/thread2.py Memory debugging must be initialized.
Nick Wellnhofer 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.
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.
Ross Burton 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.
David Seifert 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.
Daniel Veillard 2cb6bf8e 2013-03-30T21:38:20 update all tests for Python3 and Python2
Daniel Veillard 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