From 99227cb8c6f7715d3ee709e05a59dae3d11a043e Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Wed, 14 Feb 2024 18:22:16 -0500 Subject: [PATCH] Skip unreliable multi-cpu test on ppc64le Signed-off-by: Stephen Gallagher --- ...ip-test_emulate_multi_cpu-on-aarch64.patch | 21 ----------- ...n-psutil-skip-test_emulate_multi_cpu.patch | 36 +++++++++++++++++++ python-psutil.spec | 9 +++-- 3 files changed, 42 insertions(+), 24 deletions(-) delete mode 100644 python-psutil-skip-test_emulate_multi_cpu-on-aarch64.patch create mode 100644 python-psutil-skip-test_emulate_multi_cpu.patch diff --git a/python-psutil-skip-test_emulate_multi_cpu-on-aarch64.patch b/python-psutil-skip-test_emulate_multi_cpu-on-aarch64.patch deleted file mode 100644 index 05f70fd..0000000 --- a/python-psutil-skip-test_emulate_multi_cpu-on-aarch64.patch +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py -index 1096d3c..a9cc7ba 100755 ---- a/psutil/tests/test_linux.py -+++ b/psutil/tests/test_linux.py -@@ -14,6 +14,7 @@ import errno - import glob - import io - import os -+import platform - import re - import shutil - import socket -@@ -884,6 +885,8 @@ class TestSystemCPUFrequency(PsutilTestCase): - self.assertEqual(freq.max, 700.0) - - @unittest.skipIf(not HAS_CPU_FREQ, "not supported") -+ @unittest.skipIf(platform.machine() == "aarch64", -+ "https://github.com/giampaolo/psutil/issues/2373") - def test_emulate_multi_cpu(self): - def open_mock(name, *args, **kwargs): - n = name diff --git a/python-psutil-skip-test_emulate_multi_cpu.patch b/python-psutil-skip-test_emulate_multi_cpu.patch new file mode 100644 index 0000000..835f65f --- /dev/null +++ b/python-psutil-skip-test_emulate_multi_cpu.patch @@ -0,0 +1,36 @@ +From 35d3054307a6f2e607026101e6f0b19b6c472864 Mon Sep 17 00:00:00 2001 +From: Stephen Gallagher +Date: Wed, 14 Feb 2024 18:14:08 -0500 +Subject: [PATCH] Skip on aarch64 and ppc64le + +Signed-off-by: Stephen Gallagher +--- + psutil/tests/test_linux.py | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py +index 0583e619de59931a9ee80411a95ef8eb7ef6c171..7f6cfd5431086b108c1a7fa140b407cc9b6b0836 100755 +--- a/psutil/tests/test_linux.py ++++ b/psutil/tests/test_linux.py +@@ -14,6 +14,7 @@ import errno + import glob + import io + import os ++import platform + import re + import shutil + import socket +@@ -888,6 +889,10 @@ class TestSystemCPUFrequency(PsutilTestCase): + self.assertEqual(freq.max, 700.0) + + @unittest.skipIf(not HAS_CPU_FREQ, "not supported") ++ @unittest.skipIf(platform.machine() == "aarch64", ++ "https://github.com/giampaolo/psutil/issues/2373") ++ @unittest.skipIf(platform.machine() == "ppc64le", ++ "https://github.com/giampaolo/psutil/issues/2373") + def test_emulate_multi_cpu(self): + def open_mock(name, *args, **kwargs): + n = name +-- +2.43.0 + diff --git a/python-psutil.spec b/python-psutil.spec index ef18456..0953bb7 100644 --- a/python-psutil.spec +++ b/python-psutil.spec @@ -1,6 +1,6 @@ Name: python-psutil Version: 5.9.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: A process and system utilities module for Python License: BSD-3-Clause @@ -15,10 +15,10 @@ Patch: python-psutil-skip-tests-in-mock.patch # Patch: https://github.com/giampaolo/psutil/pull/2372.patch # -# Skip test_emulate_multi_cpu on aarch64 +# Skip test_emulate_multi_cpu on aarch64 and ppc64le # Failure reported upstream: https://github.com/giampaolo/psutil/issues/2373 # -Patch: python-psutil-skip-test_emulate_multi_cpu-on-aarch64.patch +Patch: python-psutil-skip-test_emulate_multi_cpu.patch # # Skip test_misc.TestCommonModule.test_debug # Failure reported upstream: https://github.com/giampaolo/psutil/issues/2374 @@ -106,6 +106,9 @@ APPVEYOR=1 %{py3_test_envvars} %{python3} psutil/tests/runner.py %changelog +* Wed Feb 14 2024 Stephen Gallagher - 5.9.8-2 +- Skip unreliable multi-cpu test on ppc64le + * Fri Feb 09 2024 Miro HronĨok - 5.9.8-1 - Update to 5.9.8 - Fixes: rhbz#2244271