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

test_capi: test_trashcan_python_class1() and test_trashcan_python_class2() take one minute on my laptop #83056

Closed
vstinner opened this issue Nov 21, 2019 · 3 comments
Labels
3.9 only security fixes tests Tests in the Lib/test dir

Comments

@vstinner
Copy link
Member

BPO 38875
Nosy @vstinner, @miss-islington
PRs
  • bpo-38875: test_capi: trashcan tests require cpu resource #17314
  • [3.8] bpo-38875: test_capi: trashcan tests require cpu resource (GH-17314) #17319
  • 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 2019-11-21.12:15:10.617>
    created_at = <Date 2019-11-21.08:10:35.914>
    labels = ['tests', '3.9']
    title = 'test_capi: test_trashcan_python_class1() and test_trashcan_python_class2() take one minute on my laptop'
    updated_at = <Date 2019-11-21.12:15:10.616>
    user = 'https://github.com/vstinner'

    bugs.python.org fields:

    activity = <Date 2019-11-21.12:15:10.616>
    actor = 'vstinner'
    assignee = 'none'
    closed = True
    closed_date = <Date 2019-11-21.12:15:10.617>
    closer = 'vstinner'
    components = ['Tests']
    creation = <Date 2019-11-21.08:10:35.914>
    creator = 'vstinner'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 38875
    keywords = ['patch']
    message_count = 3.0
    messages = ['357142', '357161', '357164']
    nosy_count = 2.0
    nosy_names = ['vstinner', 'miss-islington']
    pr_nums = ['17314', '17319']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue38875'
    versions = ['Python 3.9']

    @vstinner
    Copy link
    Member Author

    bpo-35983 added new tests to test_capi: test_capi now takes 1 minute 31 seconds :-( Previously, test_capi only took 9.5 seconds!

    commit 351c674
    Author: Jeroen Demeyer <J.Demeyer@UGent.be>
    Date: Fri May 10 19:21:11 2019 +0200

    bpo-35983: skip trashcan for subclasses (GH-11841)
    
    Add new trashcan macros to deal with a double deallocation that could occur when the `tp_dealloc` of a subclass calls the `tp_dealloc` of a base class and that base class uses the trashc
    

    an mechanism.

    Patch by Jeroen Demeyer.
    

    Attached PR modify these two tests to require the "cpu" resource. So by default, tests are not run and test_capi takes again 9.5 seconds instead of 1 min 30 sec.

    Note: Travis CI runs the test suite using -uall,-cpu.

    @vstinner vstinner added 3.9 only security fixes tests Tests in the Lib/test dir labels Nov 21, 2019
    @vstinner
    Copy link
    Member Author

    New changeset 0127bb1 by Victor Stinner in branch 'master':
    bpo-38875: test_capi: trashcan tests require cpu resource (GH-17314)
    0127bb1

    @miss-islington
    Copy link
    Contributor

    New changeset 767b426 by Miss Islington (bot) in branch '3.8':
    bpo-38875: test_capi: trashcan tests require cpu resource (GH-17314)
    767b426

    @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