]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.7] bpo-36560: regrtest: don't collect the GC twice (GH-12747) (GH-12749)
authorVictor Stinner <vstinner@redhat.com>
Tue, 9 Apr 2019 16:55:50 +0000 (18:55 +0200)
committerGitHub <noreply@github.com>
Tue, 9 Apr 2019 16:55:50 +0000 (18:55 +0200)
commit86f0354fcb815312295b923c55e39364d85d0388
treede61161ec75c3a02bfb61d48b82e94c631036164
parent0a16bb15afec28f355bc28203b6b10610293f026
[3.7] bpo-36560: regrtest: don't collect the GC twice (GH-12747) (GH-12749)

* bpo-36560: Fix reference leak hunting in regrtest (GH-12744)

Fix reference leak hunting in regrtest: compute also deltas (of
reference count, allocated memory blocks, file descriptor count)
during warmup, to ensure that everything is initialized before
starting to hunt reference leaks.

Other changes:

* Replace gc.collect() with support.gc_collect()
* Move calls to read memory statistics from dash_R_cleanup() to
  dash_R()
* Pass regrtest 'ns' to dash_R()
* dash_R() is now more quiet with --quiet option (don't display
  progress).
* Precompute the full range for "for it in range(repcount):" to
  ensure that the iteration doesn't allocate anything new.
* dash_R() now is responsible to call warm_caches().

(cherry picked from commit 5aaac94eeb44697e92b0951385cd557bc27e0f6a)

* bpo-36560: regrtest: don't collect the GC twice (GH-12747)

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.

(cherry picked from commit bb4447897a5f141eecf42987a1191a3330c5d7ed)
Lib/test/libregrtest/refleak.py
Lib/test/libregrtest/runtest.py
Lib/test/libregrtest/setup.py
Misc/NEWS.d/next/Tests/2019-04-09-14-08-02.bpo-36560._ejeOr.rst [new file with mode: 0644]