New submission from Richard Oudkerk: regrtest already tests for refcount leaks and memory allocation leaks. It can also be made to check for file descriptor leaks (and perhaps also handles on Windows).
Running with the attached patch makes it look like test_openpty, test_shutil, test_subprocess, test_uuid all leak fds on Linux, but I have not investigated: $ ./python -m test.regrtest -R 3:3 test_openpty test_shutil test_subprocess test_uuid [1/4] test_openpty 123456 ...... test_openpty leaked [2, 2, 2] fds, sum=6 [2/4/1] test_shutil beginning 6 repetitions 123456 ...... test_shutil leaked [4, 4, 4] fds, sum=12 [3/4/2] test_subprocess beginning 6 repetitions 123456 ...... test_subprocess leaked [5, 5, 5] fds, sum=15 [4/4/3] test_uuid beginning 6 repetitions 123456 ...... test_uuid leaked [1, 1, 1] fds, sum=3 4 tests failed: test_openpty test_shutil test_subprocess test_uuid ---------- files: fdleak.patch keywords: patch messages: 190871 nosy: sbt priority: normal severity: normal status: open title: Make regrtest with --huntrleaks check for fd leaks Added file: http://bugs.python.org/file30518/fdleak.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18174> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com