diff --git a/0001-skip-test_negative_refcount-on-loongarch64.patch b/0001-skip-test_negative_refcount-on-loongarch64.patch new file mode 100644 index 0000000000000000000000000000000000000000..045e23453a28eb378a63f2840b5583d25ee67ce9 --- /dev/null +++ b/0001-skip-test_negative_refcount-on-loongarch64.patch @@ -0,0 +1,34 @@ +From 5b961b28d5e4fc36714276b5826655e46372c50b Mon Sep 17 00:00:00 2001 +From: Liwei Ge +Date: Mon, 26 Jun 2023 16:38:51 +0800 +Subject: [PATCH] skip test_negative_refcount on loongarch64 + +Signed-off-by: Liwei Ge +--- + Lib/test/test_capi.py | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py +index 7547127..6e6da66 100644 +--- a/Lib/test/test_capi.py ++++ b/Lib/test/test_capi.py +@@ -3,6 +3,7 @@ + + from collections import OrderedDict + import os ++import platform + import pickle + import random + import re +@@ -326,6 +327,8 @@ class CAPITest(unittest.TestCase): + + @unittest.skipUnless(hasattr(_testcapi, 'negative_refcount'), + 'need _testcapi.negative_refcount') ++ @unittest.skipIf(platform.machine() == "loongarch64", ++ 'do not run on loongarch64') + def test_negative_refcount(self): + # bpo-35059: Check that Py_DECREF() reports the correct filename + # when calling _Py_NegativeRefcount() to abort Python. +-- +2.27.0 + diff --git a/python38.spec b/python38.spec index 9090a0de1642cbd07d4e34556e3700683a3c2497..c0d6fb1d561bde35761ab2efe9a3af5c2646d6c9 100644 --- a/python38.spec +++ b/python38.spec @@ -400,6 +400,7 @@ Patch378: 00378-support-expat-2-4-5.patch Patch1000: 1000-add-anolis-platform.patch Patch1001: 1001-anolis-python-support-loongarch64.patch Patch1002: 00399-cve-2023-24329.patch +Patch1003: 0001-skip-test_negative_refcount-on-loongarch64.patch # ========================================== # Descriptions, and metadata for subpackages @@ -748,6 +749,7 @@ rm Lib/ensurepip/_bundled/*.whl %patch1000 -p1 %patch1001 -p1 %patch1002 -p1 +%patch1003 -p1 # Remove files that should be generated by the build # (This is after patching, so that we can use patches directly from upstream)