Skip to content

deliberately crashing tests should prevent core dumps #63148

Closed

Description

@pitrou
BPO 18948
Nosy @pitrou, @vstinner, @zware
Files
  • issue-18948.patch
  • issue-18948_v2.patch
  • issue18948-combined.diff: Combine suppression CMs, update Valerie's 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 2013-10-08.21:05:58.300>
    created_at = <Date 2013-09-06.18:56:05.249>
    labels = ['easy', 'type-feature', 'tests']
    title = 'deliberately crashing tests should prevent core dumps'
    updated_at = <Date 2013-10-08.21:05:58.299>
    user = 'https://github.com/pitrou'

    bugs.python.org fields:

    activity = <Date 2013-10-08.21:05:58.299>
    actor = 'pitrou'
    assignee = 'none'
    closed = True
    closed_date = <Date 2013-10-08.21:05:58.300>
    closer = 'pitrou'
    components = ['Tests']
    creation = <Date 2013-09-06.18:56:05.249>
    creator = 'pitrou'
    dependencies = []
    files = ['31743', '31752', '31987']
    hgrepos = []
    issue_num = 18948
    keywords = ['patch', 'easy']
    message_count = 11.0
    messages = ['197090', '197602', '197661', '197679', '197907', '198766', '198768', '199161', '199164', '199248', '199250']
    nosy_count = 6.0
    nosy_names = ['pitrou', 'vstinner', 'neologix', 'python-dev', 'zach.ware', 'lambertv']
    pr_nums = []
    priority = 'low'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue18948'
    versions = ['Python 3.4']

    Activity

    1. pitrou commented on Sep 6, 2013

      @pitrou
      MemberAuthor

      Here is a (exhaustive?) list of tests which deliberately crash the interpreter:

      • test_daemon_threads_fatal_error() in test_threading
      • several fatal error tests in test_faulthandler
      • test_recursionlimit_fatalerror() in test_sys
      • test_no_FatalError_infinite_loop() in test_capi

      They should reuse the new SuppressCoreFiles facility from test.support.

    2. added
      testsTests in the Lib/test dir
      type-featureA feature request or enhancement
      on Sep 6, 2013
    3. lambertv commented on Sep 13, 2013

      lambertvmannequin
      Mannequin

      Great! Thanks for putting together a list. I've incorporated SuppressCoreFiles into these tests and have used the test suite without any errors. Again, I'm testing these on Ubuntu.

    4. pitrou commented on Sep 13, 2013

      @pitrou
      MemberAuthor

      Ok, I've left a comment on the review tool above. You can click on the "review" link if you haven't received an e-mail.

    5. lambertv commented on Sep 14, 2013

      lambertvmannequin
      Mannequin

      Oops! That was careless. Fixed.

    6. zware commented on Sep 16, 2013

      @zware
      Member

      Perhaps it would be best to either combine SuppressCoreFiles and suppress_crash_popup, or provide a new construct that does so since both are used in almost every place one is used. Also, test_daemon_threads_fatal_error in test_threading should be using suppress_crash_popup, but isn't currently, which I believe falls under the scope of this issue.

    7. vstinner commented on Oct 1, 2013

      @vstinner
      Member

      Perhaps it would be best to either combine SuppressCoreFiles
      and suppress_crash_popup

      Yes, these two tools must be merged into one unique portable tool. Example of names:

      • ignore_fatal_errors()
      • dont_report_crashes()
      • ignore_crashes()

      Doc: "On Windows, don't display the Windows Error Reporting dialog. On UNIX, disable the creation of coredump file."

    8. vstinner commented on Oct 1, 2013

      @vstinner
      Member

      test.support.SuppressCoreFiles was added by bpo-18623.

      I implemented a similar tool in my tracemalloc fork:
      http://hg.python.org/features/tracemalloc/rev/b91450e51388

    9. zware commented on Oct 7, 2013

      @zware
      Member

      Here's a patch that combines Valerie's patch with a merged suppress_crash_popup and SuppressCoreFiles called SuppressCrashReport.

      Tests ok on Windows; I haven't been able to test on Unix yet.

    10. pitrou commented on Oct 7, 2013

      @pitrou
      MemberAuthor

      Thanks! The patch works fine here under Linux, too (though I haven't tried to figure out if it really prevented core files from being generated).

    11. python-dev commented on Oct 8, 2013

      python-devmannequin
      Mannequin

      New changeset 1cbd3d9f7d61 by Antoine Pitrou in branch 'default':
      Issue bpo-18948: improve SuppressCoreFiles to include Windows crash popup suppression, and use it in more tests.
      http://hg.python.org/cpython/rev/1cbd3d9f7d61

    12. pitrou commented on Oct 8, 2013

      @pitrou
      MemberAuthor

      Patch committed. Thanks to both of you!

    13. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      easytestsTests in the Lib/test dirtype-featureA feature request or enhancement

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions