Skip to content

[2.7] bpo-30675: Fix refleak hunting in regrtest #2227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 16, 2017
Merged

[2.7] bpo-30675: Fix refleak hunting in regrtest #2227

merged 1 commit into from
Jun 16, 2017

Conversation

vstinner
Copy link
Member

regrtest now warms up caches: create explicitly all internal
singletons which are created on demand to prevent false positives
when checking for reference leaks.

@@ -438,6 +438,8 @@ def main(tests=None, testdir=None, verbose=0, quiet=False,

if slaveargs is not None:
args, kwargs = json.loads(slaveargs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to backport the slaveargs changes just backported to 3.5? Or there is no need?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not interested to backport this change. While regrtest of 3.5 is old, regrtest of 2.7 is even older. Backporting regrtest enhancements is more and more complex :-/

If we want to get more new regrtest features, I would prefer to "simply" copy regrtest from master to other branches.

@@ -1418,6 +1423,18 @@ def clear_caches():
# Collect cyclic trash.
gc.collect()

def warm_caches():
"""Create explicitly internal singletons which are created on demand
to prevent false positive when hunting reference leaks (-R 3:3)."""
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just -R. It can be used with other values.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed (-R 3:3).

regrtest now warms up caches: create explicitly all internal
singletons which are created on demand to prevent false positives
when checking for reference leaks.
@vstinner vstinner merged commit 8bb0863 into python:2.7 Jun 16, 2017
@vstinner vstinner deleted the regrtest_huntrefleak27 branch June 16, 2017 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants