From 000ff46417f12806a15b2949b27aaacc3f5fa6a3 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Tue, 4 Jul 2023 12:10:35 +0100 Subject: [PATCH] Fix tests in arch Linux In the latest iteration of the arch Linux container, we need to also deactivate seccomp to be able to run `gcore` and `ptrace` in the container. In addition to that, seems that the new libc is too optimized and some of our tests are too strict over the number of native frames that must be present in pthread-based threads, so we need to be a bit more permissive. Signed-off-by: Pablo Galindo --- .github/workflows/build_wheels.yml | 3 +-- tests/integration/test_core_analyzer.py | 2 +- tests/integration/test_gather_stacks.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index dc40ca7d..98a8551c 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -211,8 +211,7 @@ jobs: container: image: archlinux - options: --cap-add=SYS_PTRACE - + options: --cap-add=SYS_PTRACE --security-opt seccomp=unconfined steps: - uses: actions/checkout@v3 - uses: actions/download-artifact@v3 diff --git a/tests/integration/test_core_analyzer.py b/tests/integration/test_core_analyzer.py index 34157476..6e77e51e 100644 --- a/tests/integration/test_core_analyzer.py +++ b/tests/integration/test_core_analyzer.py @@ -395,7 +395,7 @@ def test_thread_registered_with_python_with_other_threads(tmpdir): assert lines == [13, 10] native_frames = list(non_python_thread.native_frames) - assert len(native_frames) >= 5 + assert len(native_frames) >= 4 symbols = {frame.symbol for frame in native_frames} assert any( [ diff --git a/tests/integration/test_gather_stacks.py b/tests/integration/test_gather_stacks.py index bcae32c8..183c630c 100644 --- a/tests/integration/test_gather_stacks.py +++ b/tests/integration/test_gather_stacks.py @@ -553,7 +553,7 @@ def test_thread_registered_with_python_with_other_threads(tmpdir): assert lines == [13, 10] native_frames = list(non_python_thread.native_frames) - assert len(native_frames) >= 5 + assert len(native_frames) >= 4 symbols = {frame.symbol for frame in native_frames} assert any( [