This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: regrtest: -j0 fails the check -j is not allowed together with -T/-l
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.7, Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: kumaar.nd, python-dev, vstinner, xiang.zhang
Priority: normal Keywords: patch

Created on 2016-12-12 18:15 by xiang.zhang, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
test-command-line-j0.patch xiang.zhang, 2016-12-12 18:15 review
test-command-line-j0-with-test.patch xiang.zhang, 2016-12-13 03:15 review
Pull Requests
URL Status Linked Edit
PR 552 closed dstufft, 2017-03-31 16:36
Messages (6)
msg283032 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2016-12-12 18:15
For python test command line arguments, -j is not allowed together with -T/-l (don't know why):

[cpython]$ ./python -m test -j4 -T
usage: python -m test [options] [test_name1 [test_name2 ...]]
python path/to/Lib/test/regrtest.py [options] [test_name1 [test_name2 ...]]
regrtest.py: error: -T and -j don't go together!
Pass -h or --help for complete help.
[cpython]$ ./python -m test -j4 -l
usage: python -m test [options] [test_name1 [test_name2 ...]]
python path/to/Lib/test/regrtest.py [options] [test_name1 [test_name2 ...]]
regrtest.py: error: -l and -j don't go together!
Pass -h or --help for complete help.

But -j0 which also spawns multiple progresses fails the check.
msg283097 - (view) Author: kumaar.nd (kumaar.nd) Date: 2016-12-13 11:56
hi,
I reviewed the changes of patch set-2.
In the test_regrtest.py, instead of adding new condition
229:self.checkError([opt, '0', '-T'], "don't go together")
230:self.checkError([opt, '0', '-l'], "don't go together")
isnt it easier to just tweak and replace the existing 
227:self.checkError([opt, '2', '-T'], "don't go together")
228:self.checkError([opt, '2', '-l'], "don't go together")
with teh above changes?

If the suggestion sound naive, this is my first developer review and am new to python too.
msg283162 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2016-12-14 04:27
Thanks for your review kumaar.nd. :-)

As for your suggestion, in this case adding can not be any harder than replacing. And the old cases could represent the truth value.
msg283603 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-12-19 10:22
test-command-line-j0-with-test.patch LGTM.
msg283624 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-12-19 14:15
New changeset cf564121f9f0 by Xiang Zhang in branch '3.5':
Issue #28950: Disallow -j0 combined with -T/-l/-M in regrtest.
https://hg.python.org/cpython/rev/cf564121f9f0

New changeset 692834062e80 by Xiang Zhang in branch '3.6':
Issue #28950: Disallow -j0 combined with -T/-l in regrtest.
https://hg.python.org/cpython/rev/692834062e80

New changeset 3b4d00e20694 by Xiang Zhang in branch 'default':
Issue #28950: Merge 3.6.
https://hg.python.org/cpython/rev/3b4d00e20694
msg283630 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2016-12-19 16:21
Thanks Victor. 2.7 is not affected since in 2.7 -j0 does not spawn processes.
History
Date User Action Args
2022-04-11 14:58:40adminsetgithub: 73136
2017-03-31 16:36:08dstufftsetpull_requests: + pull_request841
2016-12-19 16:21:11xiang.zhangsetstatus: open -> closed
versions: - Python 2.7
messages: + msg283630

resolution: fixed
stage: patch review -> resolved
2016-12-19 14:15:08python-devsetnosy: + python-dev
messages: + msg283624
2016-12-19 10:22:51vstinnersetmessages: + msg283603
2016-12-14 04:27:33xiang.zhangsetmessages: + msg283162
2016-12-13 11:56:22kumaar.ndsetnosy: + kumaar.nd
messages: + msg283097
2016-12-13 03:15:07xiang.zhangsetfiles: + test-command-line-j0-with-test.patch
versions: + Python 2.7
2016-12-12 18:21:48xiang.zhangsettitle: regrtest: -j0 fails the check -j are not allowed together with -T/-l -> regrtest: -j0 fails the check -j is not allowed together with -T/-l
2016-12-12 18:21:03serhiy.storchakasetnosy: + vstinner

title: -j0 fails the check -j are not allowed together with -T/-l -> regrtest: -j0 fails the check -j are not allowed together with -T/-l
2016-12-12 18:15:13xiang.zhangcreate