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: hide segfault #2559

Merged
merged 4 commits into from
Oct 8, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ jobs:
python: pypy3
arch: x64

# TODO: renable
# Currently segfaults on macOS Python 3.9
- runs-on: macos-latest
python: 3.9
arch: x64

name: "🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • ${{ matrix.arch }} ${{ matrix.args }}"
runs-on: ${{ matrix.runs-on }}

Expand Down
16 changes: 4 additions & 12 deletions tests/test_gil_scoped.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
import multiprocessing
import threading

import pytest

import env # noqa: F401

from pybind11_tests import gil_scoped as m


Expand Down Expand Up @@ -54,8 +50,7 @@ def _python_to_cpp_to_python_from_threads(num_threads, parallel=False):
thread.join()


# TODO: FIXME, sometimes returns -11 instead of 0
@pytest.mark.xfail("env.PY >= (3,9) and env.MACOS", strict=False)
# TODO: FIXME, sometimes returns -11 (segfault) instead of 0 on macOS Python 3.9
def test_python_to_cpp_to_python_from_thread():
"""Makes sure there is no GIL deadlock when running in a thread.

Expand All @@ -64,8 +59,7 @@ def test_python_to_cpp_to_python_from_thread():
assert _run_in_process(_python_to_cpp_to_python_from_threads, 1) == 0


# TODO: FIXME
@pytest.mark.xfail("env.PY >= (3,9) and env.MACOS", strict=False)
# TODO: FIXME on macOS Python 3.9
def test_python_to_cpp_to_python_from_thread_multiple_parallel():
"""Makes sure there is no GIL deadlock when running in a thread multiple times in parallel.

Expand All @@ -74,8 +68,7 @@ def test_python_to_cpp_to_python_from_thread_multiple_parallel():
assert _run_in_process(_python_to_cpp_to_python_from_threads, 8, parallel=True) == 0


# TODO: FIXME
@pytest.mark.xfail("env.PY >= (3,9) and env.MACOS", strict=False)
# TODO: FIXME on macOS Python 3.9
def test_python_to_cpp_to_python_from_thread_multiple_sequential():
"""Makes sure there is no GIL deadlock when running in a thread multiple times sequentially.

Expand All @@ -84,8 +77,7 @@ def test_python_to_cpp_to_python_from_thread_multiple_sequential():
assert _run_in_process(_python_to_cpp_to_python_from_threads, 8, parallel=False) == 0


# TODO: FIXME
@pytest.mark.xfail("env.PY >= (3,9) and env.MACOS", strict=False)
# TODO: FIXME on macOS Python 3.9
def test_python_to_cpp_to_python_from_process():
"""Makes sure there is no GIL deadlock when using processes.

Expand Down