Skip to content

regrtest: Only report a leak if all test runs leak at least one file descriptor #157628

Description

@vstinner

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsTests in the Lib/test dirtype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions