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

android: test_faulthandler fails also on API 24 #76319

Closed
xdegaye mannequin opened this issue Nov 26, 2017 · 3 comments
Closed

android: test_faulthandler fails also on API 24 #76319

xdegaye mannequin opened this issue Nov 26, 2017 · 3 comments
Labels
3.7 (EOL) end of life tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@xdegaye
Copy link
Mannequin

xdegaye mannequin commented Nov 26, 2017

BPO 32138
Nosy @vstinner, @xdegaye
PRs
  • bpo-32138: Skip on Android test_faulthandler tests that raise SIGSEGV #4604
  • 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 2017-11-29.10:45:17.160>
    created_at = <Date 2017-11-26.09:58:59.003>
    labels = ['3.7', 'type-bug', 'tests']
    title = 'android: test_faulthandler fails also on API 24'
    updated_at = <Date 2017-11-29.10:45:17.160>
    user = 'https://github.com/xdegaye'

    bugs.python.org fields:

    activity = <Date 2017-11-29.10:45:17.160>
    actor = 'xdegaye'
    assignee = 'none'
    closed = True
    closed_date = <Date 2017-11-29.10:45:17.160>
    closer = 'xdegaye'
    components = ['Tests']
    creation = <Date 2017-11-26.09:58:59.003>
    creator = 'xdegaye'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 32138
    keywords = ['patch']
    message_count = 3.0
    messages = ['306999', '307047', '307218']
    nosy_count = 2.0
    nosy_names = ['vstinner', 'xdegaye']
    pr_nums = ['4604']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue32138'
    versions = ['Python 3.7']

    @xdegaye
    Copy link
    Mannequin Author

    xdegaye mannequin commented Nov 26, 2017

    bpo-26934 skipped some tests of test_faulthandler on Android API < 24 to fix the problem that python does not crash upon _sigsegv(). But the same problem occurs on API 24 except randomly, you need to run test_faulthandler many times before reproducing it, see below few results in that case.

    I propose to skip those tests whatever the value of the Android API level.
    In that case the test.support.requires_android_level decorator is not used anymore and should be removed.

    1 test failed:
    test_faulthandler

        generic_x86_64:/data/local/tmp/python $ python -m test test_faulthandler
        Run tests sequentially
        0:00:00 [1/1] test_faulthandler
        test test_faulthandler failed -- Traceback (most recent call last):
          File "/sdcard/org.python/lib/python3.7/test/test_faulthandler.py", line 265, in test_enable_file
            filename=filename)
          File "/sdcard/org.python/lib/python3.7/test/test_faulthandler.py", line 114, in check_fatal_error
            self.check_error(code, line_number, fatal_error, **kw)
          File "/sdcard/org.python/lib/python3.7/test/test_faulthandler.py", line 107, in check_error
            output, exitcode = self.get_output(code, filename=filename, fd=fd)
          File "/sdcard/org.python/lib/python3.7/test/test_faulthandler.py", line 67, in get_output
            self.assertEqual(output, '')
        AssertionError: "sys:1: ResourceWarning: unclosed file <_[49 chars]c3'>" != ''
        - sys:1: ResourceWarning: unclosed file <_io.BufferedWriter name='/data/local/tmp/tmp17fv9xc3'>
        + 

    ======================================================================
    FAIL: test_disable (test.test_faulthandler.FaultHandlerTests)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/sdcard/org.python/lib/python3.7/test/test_faulthandler.py", line 307, in test_disable
        self.assertNotEqual(exitcode, 0)
    AssertionError: 0 == 0

    ======================================================================
    FAIL: test_gil_released (test.test_faulthandler.FaultHandlerTests)
    ----------------------------------------------------------------------

    Traceback (most recent call last):
      File "/sdcard/org.python/lib/python3.7/test/test_faulthandler.py", line 252, in test_gil_released
        'Segmentation fault')
      File "/sdcard/org.python/lib/python3.7/test/test_faulthandler.py", line 114, in check_fatal_error
        self.check_error(code, line_number, fatal_error, **kw)
      File "/sdcard/org.python/lib/python3.7/test/test_faulthandler.py", line 110, in check_error
        self.assertNotEqual(exitcode, 0)
    AssertionError: 0 == 0

    @xdegaye xdegaye mannequin added 3.7 (EOL) end of life tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error labels Nov 26, 2017
    @vstinner
    Copy link
    Member

    I propose to skip those tests whatever the value of the Android API level.

    Works for me.

    @xdegaye
    Copy link
    Mannequin Author

    xdegaye mannequin commented Nov 29, 2017

    New changeset ef83806 by xdegaye in branch 'master':
    bpo-32138: Skip on Android test_faulthandler tests that raise SIGSEGV (GH-4604)
    ef83806

    @xdegaye xdegaye mannequin closed this as completed Nov 29, 2017
    @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

    1 participant