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

Increase Code Coverage for multiprocessing.shared_memory #82199

Closed
vinay0410 mannequin opened this issue Sep 3, 2019 · 11 comments
Closed

Increase Code Coverage for multiprocessing.shared_memory #82199

vinay0410 mannequin opened this issue Sep 3, 2019 · 11 comments
Labels
3.9 only security fixes tests Tests in the Lib/test dir

Comments

@vinay0410
Copy link
Mannequin

vinay0410 mannequin commented Sep 3, 2019

BPO 38018
Nosy @applio, @pablogsal, @vinay0410
PRs
  • bpo-38018: increase code coverage for multiprocessing.shared_memory #15662
  • bpo-38018: fix test for multiprocessing.shared_memory #15821
  • 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 2020-07-20.09:15:11.655>
    created_at = <Date 2019-09-03.13:58:05.424>
    labels = ['tests', '3.9']
    title = 'Increase Code Coverage for multiprocessing.shared_memory'
    updated_at = <Date 2020-07-20.09:15:11.654>
    user = 'https://github.com/vinay0410'

    bugs.python.org fields:

    activity = <Date 2020-07-20.09:15:11.654>
    actor = 'vinay0410'
    assignee = 'none'
    closed = True
    closed_date = <Date 2020-07-20.09:15:11.655>
    closer = 'vinay0410'
    components = ['Tests']
    creation = <Date 2019-09-03.13:58:05.424>
    creator = 'vinay0410'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38018
    keywords = ['patch']
    message_count = 11.0
    messages = ['351085', '351113', '351531', '351544', '351553', '351557', '351560', '351570', '351572', '351579', '373995']
    nosy_count = 3.0
    nosy_names = ['davin', 'pablogsal', 'vinay0410']
    pr_nums = ['15662', '15821']
    priority = 'normal'
    resolution = None
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue38018'
    versions = ['Python 3.9']

    @vinay0410
    Copy link
    Mannequin Author

    vinay0410 mannequin commented Sep 3, 2019

    Increase Code coverage for multiprocessing.shared_memory.SharedMemory Class

    @vinay0410 vinay0410 mannequin added 3.9 only security fixes tests Tests in the Lib/test dir labels Sep 3, 2019
    @vinay0410
    Copy link
    Mannequin Author

    vinay0410 mannequin commented Sep 4, 2019

    Can anyone please review my pull request. No Reviewer has been assigned yet to it. And I don't have permissions to request a review.

    @applio
    Copy link
    Member

    applio commented Sep 9, 2019

    New changeset d14e39c by Davin Potts (Vinay Sharma) in branch 'master':
    bpo-38018: Increase code coverage for multiprocessing.shared_memory (GH-15662)
    d14e39c

    @pablogsal
    Copy link
    Member

    PR15552 introduced a regression in FreeBSD buildbots:

    https://buildbot.python.org/all/#/builders/168/builds/1417

    Could you take a look?

    @applio
    Copy link
    Member

    applio commented Sep 9, 2019

    Initial review of the test failure suggests a likely flaw in the mechanism used by the resource tracker.

    I will continue investigating more tomorrow.

    @pablogsal
    Copy link
    Member

    This is the failure for reference:

    ======================================================================
    ERROR: test_shared_memory_basics (test.test_multiprocessing_spawn.WithProcessesTestSharedMemory)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/_test_multiprocessing.py", line 3737, in test_shared_memory_basics
        shm1 = shared_memory.SharedMemory(create=True, size=1)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/multiprocessing/shared_memory.py", line 89, in __init__
        self._fd = _posixshmem.shm_open(
    OSError: [Errno 22] Invalid argument: 'test01_fn'

    @pablogsal
    Copy link
    Member

    Correction, is PR 15662 the one that introduced the recession (the one in this issue) not the previous one I linked. Apologies for that.

    @vinay0410
    Copy link
    Mannequin Author

    vinay0410 mannequin commented Sep 10, 2019

    Hi I have opened another PR: #15821
    This should fix test failures in FreeBSD.

    FreeBSD requires a leading slash in shared memory names. That's why it was throwing the below error:

    ======================================================================
    ERROR: test_shared_memory_basics (test.test_multiprocessing_spawn.WithProcessesTestSharedMemory)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/_test_multiprocessing.py", line 3737, in test_shared_memory_basics
        shm1 = shared_memory.SharedMemory(create=True, size=1)
      File "/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/multiprocessing/shared_memory.py", line 89, in __init__
        self._fd = _posixshmem.shm_open(
    OSError: [Errno 22] Invalid argument: 'test01_fn'

    test01_fn doesn't contain a leading slash that's why it is an invalid argument.

    @vinay0410
    Copy link
    Mannequin Author

    vinay0410 mannequin commented Sep 10, 2019

    Also, I haven't made a NEWS entry since it's just a short bug fix

    @pablogsal
    Copy link
    Member

    New changeset 2fc1160 by Pablo Galindo (Vinay Sharma) in branch 'master':
    bpo-38018: Fix test for multiprocessing.shared_memory in BSD systems (GH-15821)
    2fc1160

    @vinay0410
    Copy link
    Mannequin Author

    vinay0410 mannequin commented Jul 20, 2020

    Closing this, as all the necessary PRs have been merged.

    @vinay0410 vinay0410 mannequin closed this as completed Jul 20, 2020
    @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.9 only security fixes tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants