From dfc5db5e385a12c4b77073473ecfe607e2915b72 Mon Sep 17 00:00:00 2001 From: DZC <9535280+douzhichong@user.noreply.gitee.com> Date: Thu, 30 Oct 2025 04:41:51 -0400 Subject: [PATCH] XFAIL for ABI differences on riscv64 --- cffi-riscv64-xfail-4.patch | 13 +++++++++++++ python-cffi.spec | 8 ++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 cffi-riscv64-xfail-4.patch diff --git a/cffi-riscv64-xfail-4.patch b/cffi-riscv64-xfail-4.patch new file mode 100644 index 0000000..dabf861 --- /dev/null +++ b/cffi-riscv64-xfail-4.patch @@ -0,0 +1,13 @@ +diff -urN '--exclude=*.pyc' '--exclude=__pycache__' '--exclude=.pytest_cache' cffi-1.15.1.orig/testing/cffi1/test_verify1.py cffi-1.15.1/testing/cffi1/test_verify1.py +--- cffi-1.15.1.orig/testing/cffi1/test_verify1.py 2025-10-30 04:22:33.263617537 -0400 ++++ cffi-1.15.1/testing/cffi1/test_verify1.py 2025-10-30 04:26:51.467556355 -0400 +@@ -1284,6 +1284,9 @@ + assert p.c == b'Y' + assert p.d == b'Y' + ++@pytest.mark.xfail(platform.machine() == "riscv64", ++ reason="riscv64 ABI handles anonymous struct layout differently") ++ + def test_nested_anonymous_struct_exact_error(): + if sys.platform == 'win32': + py.test.skip("nested anonymous struct/union") diff --git a/python-cffi.spec b/python-cffi.spec index 98978f2..0a6c998 100644 --- a/python-cffi.spec +++ b/python-cffi.spec @@ -1,4 +1,4 @@ -%define anolis_release 4 +%define anolis_release 5 Name: python-cffi %global general_version 1.15.1 Version: %{general_version} @@ -10,6 +10,7 @@ Source0: %{pypi_source cffi} Patch1000: 1000-update-test-phase-regex.patch Patch1001: cffi-riscv64-xfail-3.patch +Patch1002: cffi-riscv64-xfail-4.patch BuildRequires: make BuildRequires: libffi-devel @@ -76,7 +77,10 @@ PYTHONPATH=%{buildroot}%{python3_sitearch} %{__python3} -m pytest c/ testing/ %doc doc/build/html %changelog -* Fri Oct 27 2025 Maeve - 1.15.1-4 +* Thu Oct 30 2025 Maeve - 1.15.1-5 +- XFAIL for ABI differences on riscv64 + +* Mon Oct 27 2025 Maeve - 1.15.1-4 - XFAIL for 'test_struct_float_vs_int' or 'test_ffi_full_struct' due to ABI differences on riscv64 * Wed Mar 13 2024 Zhao Hang - 1.15.1-3 -- Gitee