GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-109739: regrtest disables load tracker if refleak · vstinner/cpython@9fdae73

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • Lib/test/libregrtest
    • main.py
  • Misc/NEWS.d/next/Tests
    • 2023-09-25-23-59-37.gh-issue-109739.MUn7K5.rst
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎Lib/test/libregrtest/main.py‎

Copy file name to clipboardExpand all lines: Lib/test/libregrtest/main.py
+13-3Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
StrPath, StrJSON, TestName, TestList, TestTuple, FilterTuple,
2121
strip_py_suffix, count, format_duration,
2222
printlist, get_temp_dir, get_work_dir, exit_timeout,
23-
display_header, cleanup_temp_dir)
23+
display_header, cleanup_temp_dir,
24+
MS_WINDOWS)
2425

2526

2627
class Regrtest:
@@ -435,7 +436,15 @@ def _run_tests(self, selected: TestTuple, tests: TestList | None) -> int:
435436

436437
setup_process()
437438

438-
self.logger.start_load_tracker()
439+
if self.hunt_refleak and not self.num_workers:
440+
# gh-109739: WindowsLoadTracker thread interfers with refleak check
441+
use_load_tracker = False
442+
else:
443+
# WindowsLoadTracker is only needed on Windows
444+
use_load_tracker = MS_WINDOWS
445+
446+
if use_load_tracker:
447+
self.logger.start_load_tracker()
439448
try:
440449
if self.num_workers:
441450
self._run_tests_mp(runtests, self.num_workers)
@@ -448,7 +457,8 @@ def _run_tests(self, selected: TestTuple, tests: TestList | None) -> int:
448457
if self.want_rerun and self.results.need_rerun():
449458
self.rerun_failed_tests(runtests)
450459
finally:
451-
self.logger.stop_load_tracker()
460+
if use_load_tracker:
461+
self.logger.stop_load_tracker()
452462

453463
self.display_summary()
454464
self.finalize_tests(tracer)
Collapse file

‎Misc/NEWS.d/next/Tests/2023-09-25-23-59-37.gh-issue-109739.MUn7K5.rst‎

Copy file name to clipboard
+3Lines changed: 3 additions & 0 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
regrtest: Fix reference leak check on Windows. Disable the load tracker on
2+
Windows in the reference leak check mode (-R option). Patch by Victor
3+
Stinner.

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.