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

Some tests in test_socket are not run #89350

Closed
serhiy-storchaka opened this issue Sep 13, 2021 · 10 comments
Closed

Some tests in test_socket are not run #89350

serhiy-storchaka opened this issue Sep 13, 2021 · 10 comments
Labels
3.9 only security fixes 3.10 only security fixes 3.11 only security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@serhiy-storchaka
Copy link
Member

BPO 45187
Nosy @vstinner, @ambv, @serhiy-storchaka, @miss-islington
PRs
  • bpo-45187: Collect test_socket tests using unittest. #28317
  • [3.10] bpo-45187: Collect test_socket tests using unittest (GH-28317) #28412
  • [3.9] bpo-45187: Collect test_socket tests using unittest (GH-28317) #28413
  • bpo-45187: Fix dangling threads in test_socket.CreateServerFunctionalTest #28422
  • [3.10] bpo-45187: Fix dangling threads in test_socket.CreateServerFunctionalTest (GH-28422) #28423
  • [3.9] bpo-45187: Fix dangling threads in test_socket.CreateServerFunctionalTest (GH-28422) #28424
  • Dependencies
  • bpo-45212: Dangling threads in skipped tests in test_socket
  • bpo-45228: Stack buffer overflow in parsing J1939 network address
  • 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 2021-09-17.13:21:30.740>
    created_at = <Date 2021-09-13.20:34:45.054>
    labels = ['type-bug', 'tests', '3.9', '3.10', '3.11']
    title = 'Some tests in test_socket are not run'
    updated_at = <Date 2021-09-20.07:56:00.391>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2021-09-20.07:56:00.391>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2021-09-17.13:21:30.740>
    closer = 'serhiy.storchaka'
    components = ['Tests']
    creation = <Date 2021-09-13.20:34:45.054>
    creator = 'serhiy.storchaka'
    dependencies = ['45212', '45228']
    files = []
    hgrepos = []
    issue_num = 45187
    keywords = ['patch']
    message_count = 10.0
    messages = ['401725', '401732', '402004', '402031', '402034', '402041', '402074', '402077', '402084', '402207']
    nosy_count = 4.0
    nosy_names = ['vstinner', 'lukasz.langa', 'serhiy.storchaka', 'miss-islington']
    pr_nums = ['28317', '28412', '28413', '28422', '28423', '28424']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue45187'
    versions = ['Python 3.9', 'Python 3.10', 'Python 3.11']

    @serhiy-storchaka
    Copy link
    Member Author

    Test classes ISOTPTest, J1939Test, BasicUDPLITETest, UDPLITETimeoutTest in test_socket are not included in the list of test classes and are not run by regrtest.

    @serhiy-storchaka serhiy-storchaka added 3.9 only security fixes 3.10 only security fixes 3.11 only security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Sep 13, 2021
    @serhiy-storchaka
    Copy link
    Member Author

    PR 28317 makes test classes in test_socket be autocollected instead of explicitly enumerated. This will save as from similar errors in future.

    @serhiy-storchaka
    Copy link
    Member Author

    Running omitted tests exposed some real bugs. See bpo-45212, bpo-45228.

    @ambv
    Copy link
    Contributor

    ambv commented Sep 17, 2021

    New changeset 0361335 by Serhiy Storchaka in branch 'main':
    bpo-45187: Collect test_socket tests using unittest (GH-28317)
    0361335

    @miss-islington
    Copy link
    Contributor

    New changeset 5a5684a by Miss Islington (bot) in branch '3.10':
    bpo-45187: Collect test_socket tests using unittest (GH-28317)
    5a5684a

    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 0f4449e by Łukasz Langa in branch '3.9':
    [3.9] bpo-45187: Collect test_socket tests using unittest (GH-28317) (GH-28413)
    0f4449e

    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 51ebb7f by Serhiy Storchaka in branch 'main':
    bpo-45187: Fix dangling threads in test_socket.CreateServerFunctionalTest (GH-28422)
    51ebb7f

    @miss-islington
    Copy link
    Contributor

    New changeset 21711d5 by Miss Islington (bot) in branch '3.10':
    bpo-45187: Fix dangling threads in test_socket.CreateServerFunctionalTest (GH-28422)
    21711d5

    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 6c50f23 by Miss Islington (bot) in branch '3.9':
    bpo-45187: Fix dangling threads in test_socket.CreateServerFunctionalTest (GH-28422) (GH-28424)
    6c50f23

    @vstinner
    Copy link
    Member

    bpo-45187: Collect test_socket tests using unittest (GH-28317)

    Nice enhancement! Thanks.

    self.addCleanup(thread.join, self.timeout)

    I suggest to use test.support.threading_helper.join_thread() to avoid blocking if the thread raises an exception or never completes. The function has a timeout with a reasonable default value (adapted per buildbot).

    @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 3.10 only security fixes 3.11 only security fixes tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    4 participants