From 0bfb47d7910a0389b8bd88b97ccda308e95b52b2 Mon Sep 17 00:00:00 2001 From: Jonas Rembser Date: Mon, 19 Oct 2026 15:00:06 +0200 Subject: [PATCH] [test] Disable test that corrupts memory regulator Disable test that corrupts the memory regulator, resulting in crashes on newer macOS. --- test/test_datatypes.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/test_datatypes.py b/test/test_datatypes.py index cb25ec7..7e48796 100644 --- a/test/test_datatypes.py +++ b/test/test_datatypes.py @@ -1,3 +1,4 @@ +import subprocess import sys import py @@ -7,6 +8,20 @@ currpath = py.path.local(__file__).dirpath() test_dct = str(currpath.join("cpp/datatypesDict")) +IS_MACOS_27_PLUS = False + +try: + vers = ( + subprocess.check_output(["xcrun", "--sdk", "macosx", "--show-sdk-version"]) + .decode() + .strip() + ) + if int(vers.split(".")[0]) >= 27: + IS_MACOS_27_PLUS = True +except FileNotFoundError: + # If xcrun is not on the system, we assume it's not macOS 27+ + pass + def setup_module(mod): setup_make("datatypes") @@ -1016,6 +1031,10 @@ def test15_object_returns(self): assert c.get_pod_ptrref().m_int == 666 assert c.get_pod_ptrref().m_double == 3.14 + @mark.xfail( + condition=IS_MACOS_27_PLUS, + reason="Mutating proxy pointee via T** corrupts memory regulator, resulting in crashes on newer macOS", + ) def test16_object_arguments(self): """Test setting and returning of a POD through arguments"""