Skip to content

Commit 5bbc9e2

Browse files
Added refleak checker option under testing
1 parent b70b763 commit 5bbc9e2

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

testing/run-write-tests.rst

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,16 @@ if the failures are transient or consistent.
8686
The ``-uall`` flag allows the use of all available
8787
resources so as to not skip tests requiring, e.g., Internet access.
8888

89-
To check for reference leaks (only needed if you modified C code), use the
90-
``-R`` flag. For example, ``-R 3:2`` will first run the test 3 times to settle
91-
down the reference count, and then run it 2 more times to verify if there are
92-
any leaks.
89+
To check for reference leaks (only needed if you modified C code),
90+
you can enable reference leak checking during testing using the ``-R`` flag.
91+
For example, using the command::
92+
93+
python -m test <test_name> -R <warmups>:<repeats>
94+
95+
This enables the refleak checker option, allowing you to perform warm-up runs
96+
to stabilize reference counts followed by additional runs to verify any leaks.
97+
For instance, ``-R 3:2`` will first run the test 3 times to settle down the
98+
reference count, and then run it 2 more times to check for leaks.
9399

94100
You can also execute the ``Tools/scripts/run_tests.py`` script as found in a
95101
CPython checkout. The script tries to balance speed with thoroughness. But if

0 commit comments

Comments
 (0)