8000 bpo-36560: regrtest: don't collect the GC twice by vstinner · Pull Request #12747 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-36560: regrtest: don't collect the GC twice #12747

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
Apr 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bpo-36560: regrtest: don't collect the GC twice
dash_R() function of libregrtest doesn't call support.gc_collect()
directly anymore: it's already called by dash_R_cleanup().

Call dash_R_cleanup() before starting the loop.
  • Loading branch information
vstinner committed Apr 9, 2019
commit 259f5f7c773887081280b8ad1ba5c4bd2677ac02
6 changes: 4 additions & 2 deletions Lib/test/libregrtest/refleak.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,14 @@ def get_pooled_int(value):
print(("1234567890"*(repcount//10 + 1))[:repcount], file=sys.stderr,
flush=True)

dash_R_cleanup(fs, ps, pic, zdc, abcs)

for i in rep_range:
test_func()
dash_R_cleanup(fs, ps, pic, zdc, abcs)

# Collect cyclic trash and read memory statistics immediately after.
support.gc_collect()
# dash_R_cleanup() ends with collecting cyclic trash:
# read memory statistics immediately after.
alloc_after = getallocatedblocks()
rc_after = gettotalrefcount()
fd_after = fd_count()
Expand Down
0