[proxy] web.archive.org← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light

/ cpython Public

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

bpo-33873: Add warning when using less than 3 warmup runs in runtest.py. #7736

Merged
merged 4 commits into from Jun 16, 2018

Conversation

Copy link
Member

pablogsal commented Jun 15, 2018

pablogsal changed the title Add warning when using less than 3 warmup runs in runtest.py. bpo-33873: Add warning when using less than 3 warmup runs in runtest.py. Jun 15, 2018
@@ -98,6 +98,13 @@ def runtest(ns, test):

output_on_failure = ns.verbose3

if ns.huntrleaks:
Copy link
Member

vstinner Jun 15, 2018

Choose a reason for hiding this comment

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

If you put the warning here, you get one warning per test file. It would be better to put it in Regrtest.runtest().

Copy link
Member Author

pablogsal Jun 15, 2018

Choose a reason for hiding this comment

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

My bad. I did not notice this because I usually only run one file.

warmup, repetitions, _ = ns.huntrleaks
if warmup < 3:
msg = ("WARNING: Using less than 3 warmup repetitions can "
"give false positives!")
Copy link
Member

vstinner Jun 15, 2018

Choose a reason for hiding this comment

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

Somewhere you should mention the option "--huntrleaks/-R".

Copy link

bedevere-bot commented Jun 15, 2018

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

And if you don't make the requested changes, you will be put in the comfy chair!

Copy link
Member Author

pablogsal commented Jun 15, 2018

I have made the requested changes; please review again

Copy link

bedevere-bot commented Jun 15, 2018

Thanks for making the requested changes!

@vstinner: please review the changes made to this pull request.

if self.ns.huntrleaks:
warmup, repetitions, _ = self.ns.huntrleaks
if warmup < 3:
msg = ("WARNING: Runing tests with --huntrleaks/-R and less than "
Copy link
Member

vstinner Jun 16, 2018

Choose a reason for hiding this comment

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

Runing: typo => Running

Copy link
Member Author

pablogsal Jun 16, 2018

Choose a reason for hiding this comment

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

Done in 1696a14

Copy link
Member

vstinner left a comment

LGTM.

vstinner merged commit cac4fef into python:master Jun 16, 2018
5 of 9 checks passed
vstinner pushed a commit to vstinner/cpython that referenced this issue Jun 26, 2018
regrtest: Add warning when using less than 3 warmup runs like -R 1:3.
(cherry picked from commit cac4fef)
vstinner pushed a commit to vstinner/cpython that referenced this issue Jun 26, 2018
regrtest: Add warning when using less than 3 warmup runs like -R 1:3.

(cherry picked from commit cac4fef)
vstinner added a commit that referenced this issue Jun 26, 2018
* bpo-33718: regrtest: use format_duration() to display failed tests (GH-7686)

* Enhance also format_duration(): work on integers and rounds towards
  +infinity (math.ceil).
* Write unit tests on format_duration()

(cherry picked from commit 4ffe9c2)

* bpo-33873: regrtest: Add warning on -R 1:3 (GH-7736)

regrtest: Add warning when using less than 3 warmup runs like -R 1:3.
(cherry picked from commit cac4fef)

* bpo-33873: Fix bug in `runtest.py` and add checks for invalid `-R` parameters (GH-7735)

Fix bug in `Lib/test/libregrtest/runtest.py` that makes running tests an extra time than the specified number of runs.

Add check for invalid --huntrleaks/-R parameters.

(cherry picked from commit 58ed730)
vstinner added a commit to vstinner/cpython that referenced this issue Jun 26, 2018
* bpo-33718: regrtest: use format_duration() to display failed tests (pythonGH-7686)

* Enhance also format_duration(): work on integers and rounds towards
  +infinity (math.ceil).
* Write unit tests on format_duration()

(cherry picked from commit 4ffe9c2)

* bpo-33873: regrtest: Add warning on -R 1:3 (pythonGH-7736)

regrtest: Add warning when using less than 3 warmup runs like -R 1:3.
(cherry picked from commit cac4fef)

* bpo-33873: Fix bug in `runtest.py` and add checks for invalid `-R` parameters (pythonGH-7735)

Fix bug in `Lib/test/libregrtest/runtest.py` that makes running tests an extra time than the specified number of runs.

Add check for invalid --huntrleaks/-R parameters.

(cherry picked from commit 58ed730)
(cherry picked from commit d1f9481)
vstinner added a commit that referenced this issue Jun 26, 2018
* bpo-33718: regrtest: use format_duration() to display failed tests (GH-7686)

* Enhance also format_duration(): work on integers and rounds towards
  +infinity (math.ceil).
* Write unit tests on format_duration()

(cherry picked from commit 4ffe9c2)

* bpo-33873: regrtest: Add warning on -R 1:3 (GH-7736)

regrtest: Add warning when using less than 3 warmup runs like -R 1:3.

(cherry picked from commit cac4fef)

* bpo-33873: Fix bug in `runtest.py` and add checks for invalid `-R` parameters (GH-7735)

Fix bug in `Lib/test/libregrtest/runtest.py` that makes running tests an extra time than the specified number of runs.

Add check for invalid --huntrleaks/-R parameters.

(cherry picked from commit 58ed730)
vstinner added a commit that referenced this issue Jun 26, 2018
* bpo-33718: regrtest: use format_duration() to display failed tests (GH-7686)

* Enhance also format_duration(): work on integers and rounds towards
  +infinity (math.ceil).
* Write unit tests on format_duration()

(cherry picked from commit 4ffe9c2)

* bpo-33873: regrtest: Add warning on -R 1:3 (GH-7736)

regrtest: Add warning when using less than 3 warmup runs like -R 1:3.
(cherry picked from commit cac4fef)

* bpo-33873: Fix bug in `runtest.py` and add checks for invalid `-R` parameters (GH-7735)

Fix bug in `Lib/test/libregrtest/runtest.py` that makes running tests an extra time than the specified number of runs.

Add check for invalid --huntrleaks/-R parameters.

(cherry picked from commit 58ed730)
(cherry picked from commit d1f9481)
pablogsal deleted the bpo33873-2 branch Jul 31, 2018
lisroach pushed a commit to lisroach/cpython that referenced this issue Sep 10, 2018
regrtest: Add warning when using less than 3 warmup runs like -R 1:3.
yahya-abou-imran pushed a commit to yahya-abou-imran/cpython that referenced this issue Nov 2, 2018
regrtest: Add warning when using less than 3 warmup runs like -R 1:3.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants