From 697569771e1f0bcbd080c9dfaf144e704dfe14f3 Mon Sep 17 00:00:00 2001 From: Nathan Goldbaum Date: Tue, 30 Jun 2026 15:12:45 -0600 Subject: [PATCH] Mark test using inet_ntoa as thread-unsafe --- testing/cffi0/test_function.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/testing/cffi0/test_function.py b/testing/cffi0/test_function.py index 7921c697..3cdd8f6a 100644 --- a/testing/cffi0/test_function.py +++ b/testing/cffi0/test_function.py @@ -307,9 +307,9 @@ def test_strchr(self): q = ffi.C.strchr(p, ord('w')) assert ffi.string(q) == b"world!" + @pytest.mark.skipif(sys.platform == "win32", reason="no 'inet_ntoa'") + @pytest.mark.thread_unsafe(reason="inet_ntoa returns a globally shared static buffer on some systems") def test_function_with_struct_argument(self): - if sys.platform == 'win32': - pytest.skip("no 'inet_ntoa'") if (self.Backend is CTypesBackend and '__pypy__' in sys.builtin_module_names): pytest.skip("ctypes limitation on pypy")