From 2f138f5ff3a156b07f95dcf8e13aca131964145e Mon Sep 17 00:00:00 2001 From: wb-zh951434 Date: Mon, 26 Jun 2023 16:37:53 +0800 Subject: [PATCH] Skip test case test_negative_refcount Signed-off-by: wb-zh951434 --- 1003-skip-test-negative-refcount.patch | 14 ++++++++++++++ python38.spec | 3 +++ 2 files changed, 17 insertions(+) create mode 100644 1003-skip-test-negative-refcount.patch diff --git a/1003-skip-test-negative-refcount.patch b/1003-skip-test-negative-refcount.patch new file mode 100644 index 0000000..b1598fd --- /dev/null +++ b/1003-skip-test-negative-refcount.patch @@ -0,0 +1,14 @@ +diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py +index 7547127..5c1c449 100644 +--- a/Lib/test/test_capi.py ++++ b/Lib/test/test_capi.py +@@ -324,8 +324,7 @@ class CAPITest(unittest.TestCase): + self.assertRaises(TypeError, _testcapi.get_mapping_values, bad_mapping) + self.assertRaises(TypeError, _testcapi.get_mapping_items, bad_mapping) + +- @unittest.skipUnless(hasattr(_testcapi, 'negative_refcount'), +- 'need _testcapi.negative_refcount') ++ @unittest.skip('skip test_negative_refcount') + def test_negative_refcount(self): + # bpo-35059: Check that Py_DECREF() reports the correct filename + # when calling _Py_NegativeRefcount() to abort Python. diff --git a/python38.spec b/python38.spec index 9090a0d..344502b 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: 1003-skip-test-negative-refcount.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) @@ -1839,6 +1841,7 @@ fi * Mon Jun 26 2023 Jacob Wang - 3.8.16-2 - Pick up fix from upstream Fix for CVE-2023-24329 [3f4e9b9] (cstratak@redhat.com) +- Skip test_negative_refcount unit test (Zhao Hang) * Mon Jun 19 2023 Liwei Ge - 3.8.16-1.0.1 - Rebrand for Anolis OS -- Gitee