Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upbpo-40334: Rewrite test_c_parser to avoid memory leaks #19694
Conversation
This comment has been minimized.
This comment has been minimized.
Why do you remove tests? It may be worth it to explain it in the commit message. |
I will land once tests pass. |
5731030
to
5f04be3
This comment has been minimized.
This comment has been minimized.
Commit message updated. Thanks for the advice. |
This comment has been minimized.
This comment has been minimized.
(Hmm, there's a plan to skip the tests rather than delete the file.) |
This comment has been minimized.
This comment has been minimized.
Or maybe even fix them.. |
Previously every test was building an extension module and loading it into sys.modules. The tearDown function was thus not able to clean up correctly, resulting in memory leaks. With this PR every test function now builds the extension module and runs the actual test code in a new process (using assert_python_ok), so that sys.modules stays intact and no memory gets leaked.
5f04be3
to
4c02d3b
This comment has been minimized.
This comment has been minimized.
PR updated! It now fixes the tests that were causing the memory leaks, instead of removing them. (I didn't open a new one, because we needed to preserve the PR number) |
This comment has been minimized.
This comment has been minimized.
bedevere-bot
commented
Apr 24, 2020
If you want to schedule another build, you need to add the " |
This comment has been minimized.
This comment has been minimized.
Checking with the buildbots to confirm that there were no more leaks. |
This comment has been minimized.
This comment has been minimized.
On RHEL 7 it's only |
This comment has been minimized.
This comment has been minimized.
Yup, all the buildbot failures are unrelated to this PR (and the refleaks ones do not leak anymore because of this) |
24ffe70
into
python:master
lysnikolaou commentedApr 23, 2020
•
edited
Previously every test was building an extension module and
loading it into sys.modules. The tearDown function was thus
not able to clean up correctly, resulting in memory leaks.
With this PR every test function now builds the extension
module and runs the actual test code in a new process
(using assert_python_ok), so that sys.modules stays intact
and no memory gets leaked.
https://bugs.python.org/issue40334