Example on a recent buildbot run on AMD64 CentOS9 NoGIL Refleaks 3.x: https://buildbot.python.org/#/builders/1610/builds/4004
test_free_threading leaked [0, 1, 0] references, sum=1 (this is fine)
test_free_threading leaked [0, 1, -1] file descriptors, sum=0
For references, regrtest considers that a test leaks only if all test runs leak at least 1 reference.
For file descriptors, regrtest considers that a test leaks if at least one test run leaks a file descriptor.
In this example, leaked [0, 1, -1] file descriptors, sum=0 says that a test run creates a file descriptor without closing it (first run test, after the warmup): delta +1, but the following test run closes the file descriptor: delta -1. The sum=0 says that there is no leak at the end, all created file descriptors have been closed.
I propose to change the leak detection to only consider that there is a leak if all test runs leak at least one file descriptors.
Linked PRs
Example on a recent buildbot run on AMD64 CentOS9 NoGIL Refleaks 3.x: https://buildbot.python.org/#/builders/1610/builds/4004
For references, regrtest considers that a test leaks only if all test runs leak at least 1 reference.
For file descriptors, regrtest considers that a test leaks if at least one test run leaks a file descriptor.
In this example,
leaked [0, 1, -1] file descriptors, sum=0says that a test run creates a file descriptor without closing it (first run test, after the warmup): delta+1, but the following test run closes the file descriptor: delta-1. Thesum=0says that there is no leak at the end, all created file descriptors have been closed.I propose to change the leak detection to only consider that there is a leak if all test runs leak at least one file descriptors.
Linked PRs