Skip to content
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

regrtest: -j0 fails the check -j is not allowed together with -T/-l #73136

Closed
zhangyangyu opened this issue Dec 12, 2016 · 6 comments
Closed
Labels
3.7 (EOL) end of life tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@zhangyangyu
Copy link
Member

BPO 28950
Nosy @vstinner, @zhangyangyu, @Piython
PRs
  • [Do Not Merge] Convert Misc/NEWS so that it is managed by towncrier #552
  • Files
  • test-command-line-j0.patch
  • test-command-line-j0-with-test.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2016-12-19.16:21:11.812>
    created_at = <Date 2016-12-12.18:15:13.233>
    labels = ['3.7', 'type-bug', 'tests']
    title = 'regrtest: -j0 fails the check -j is not allowed together with -T/-l'
    updated_at = <Date 2017-03-31.16:36:08.649>
    user = 'https://github.com/zhangyangyu'

    bugs.python.org fields:

    activity = <Date 2017-03-31.16:36:08.649>
    actor = 'dstufft'
    assignee = 'none'
    closed = True
    closed_date = <Date 2016-12-19.16:21:11.812>
    closer = 'xiang.zhang'
    components = ['Tests']
    creation = <Date 2016-12-12.18:15:13.233>
    creator = 'xiang.zhang'
    dependencies = []
    files = ['45864', '45867']
    hgrepos = []
    issue_num = 28950
    keywords = ['patch']
    message_count = 6.0
    messages = ['283032', '283097', '283162', '283603', '283624', '283630']
    nosy_count = 4.0
    nosy_names = ['vstinner', 'python-dev', 'xiang.zhang', 'kumaar.nd']
    pr_nums = ['552']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue28950'
    versions = ['Python 3.5', 'Python 3.6', 'Python 3.7']

    @zhangyangyu
    Copy link
    Member Author

    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.

    @zhangyangyu zhangyangyu added 3.7 (EOL) end of life tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Dec 12, 2016
    @serhiy-storchaka serhiy-storchaka changed the 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 Dec 12, 2016
    @zhangyangyu zhangyangyu changed the title 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 Dec 12, 2016
    @piython
    Copy link
    Mannequin

    piython mannequin commented Dec 13, 2016

    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.

    @zhangyangyu
    Copy link
    Member Author

    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.

    @vstinner
    Copy link
    Member

    test-command-line-j0-with-test.patch LGTM.

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Dec 19, 2016

    New changeset cf564121f9f0 by Xiang Zhang in branch '3.5':
    Issue bpo-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 bpo-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 bpo-28950: Merge 3.6.
    https://hg.python.org/cpython/rev/3b4d00e20694

    @zhangyangyu
    Copy link
    Member Author

    Thanks Victor. 2.7 is not affected since in 2.7 -j0 does not spawn processes.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.7 (EOL) end of life tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants