[Python-Dev] New work-in-progress bisection tool for the Python test suite (in regrtest) (original) (raw)

Victor Stinner victor.stinner at gmail.com
Mon Jun 26 12:36:38 EDT 2017


Hi,

I updated my bisect_test.py script to simplify its command line:

https://github.com/haypo/misc/blob/master/python/bisect_test.py

To debug a reference leak in test_os, now just type:

$ ./python bisect_test.py -R 3:3 test_os

Example of output:

(...) Failing tests (1):

Bisection completed in 24 iterations and 0:02:11

In 2 minutes, you get the guilty: test_execve_invalid_env()! It's now fully automated!

I also added --fail-env-changed option to regrtest. Using this option, you can find which test leaked a file, and modified any other resource tracked by regrtest. For examle, I used this command to find which test method of test_subprocess created a core dump file:

$ ./python bisect_test.py --fail-env-changed test_subprocess

Later, I will try to integrate this tiny tool in Python. Maybe somewhere in Tools/. Or better, maybe directly in regrtest?

Victor



More information about the Python-Dev mailing list