Compare commits

...

No commits in common. 'c8-beta-stream-3.9' and 'c9' have entirely different histories.

@ -0,0 +1,25 @@
From 4ffbcb458ff0b838f2bfe387b6305c4817e363ae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miro=20Hron=C4=8Dok?= <miro@hroncok.cz>
Date: Thu, 15 Apr 2021 17:07:38 +0200
Subject: [PATCH] Add tolerance to
test_linux.TestSystemVirtualMemory.test_total
We see this test as very flaky without tolerance in Fedora and CentOS
---
psutil/tests/test_linux.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py
index 0c6d498c8..f5243c2cd 100755
--- a/psutil/tests/test_linux.py
+++ b/psutil/tests/test_linux.py
@@ -243,7 +243,8 @@ def test_total(self):
# self.assertEqual(free_value, psutil_value)
vmstat_value = vmstat('total memory') * 1024
psutil_value = psutil.virtual_memory().total
- self.assertAlmostEqual(vmstat_value, psutil_value)
+ self.assertAlmostEqual(
+ vmstat_value, psutil_value, delta=TOLERANCE_SYS_MEM)
@retry_on_failure()
def test_used(self):

@ -1,23 +0,0 @@
From 2dda5cf427161ebb66a2de2429395d67fbba3955 Mon Sep 17 00:00:00 2001
From: Tomas Orsava <torsava@redhat.com>
Date: Tue, 26 Jan 2021 15:02:57 +0100
Subject: [PATCH] Skip flaky tests
---
psutil/tests/test_system.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/psutil/tests/test_system.py b/psutil/tests/test_system.py
index a55164c..912a254 100755
--- a/psutil/tests/test_system.py
+++ b/psutil/tests/test_system.py
@@ -724,6 +724,7 @@ class TestNetAPIs(PsutilTestCase):
self.assertEqual(psutil.net_io_counters(pernic=True), {})
assert m.called
+ @unittest.skip("Skip flaky tests")
def test_net_if_addrs(self):
nics = psutil.net_if_addrs()
assert nics, nics
--
2.29.2

@ -1,26 +0,0 @@
From 19faccd7ebef5c1c8095848909b2b6a629ec0d91 Mon Sep 17 00:00:00 2001
From: Tomas Orsava <torsava@redhat.com>
Date: Tue, 26 Jan 2021 12:49:50 +0100
Subject: [PATCH] Test skipped due to broken handling of IPv6 addresses
See: https://github.com/giampaolo/psutil/issues/1909
---
psutil/tests/test_linux.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py
index 2c5d701..ef77157 100755
--- a/psutil/tests/test_linux.py
+++ b/psutil/tests/test_linux.py
@@ -920,7 +920,7 @@ class TestLoadAvg(PsutilTestCase):
# =====================================================================
-@unittest.skipIf(not LINUX, "LINUX only")
+@unittest.skip("Test skipped due to broken handling of IPv6 addresses: https://github.com/giampaolo/psutil/issues/1909")
class TestSystemNetIfAddrs(PsutilTestCase):
def test_ips(self):
--
2.29.2

@ -0,0 +1,24 @@
diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py
index c1d0a94..e9914a9 100755
--- a/psutil/tests/test_linux.py
+++ b/psutil/tests/test_linux.py
@@ -924,6 +924,7 @@ class TestLoadAvg(PsutilTestCase):
@unittest.skipIf(not LINUX, "LINUX only")
class TestSystemNetIfAddrs(PsutilTestCase):
+ @unittest.skip("Broken in brew")
def test_ips(self):
for name, addrs in psutil.net_if_addrs().items():
for addr in addrs:
diff --git a/psutil/tests/test_system.py b/psutil/tests/test_system.py
index a55164c..21a04bb 100755
--- a/psutil/tests/test_system.py
+++ b/psutil/tests/test_system.py
@@ -724,6 +724,7 @@ class TestNetAPIs(PsutilTestCase):
self.assertEqual(psutil.net_io_counters(pernic=True), {})
assert m.called
+ @unittest.skip("Broken in brew")
def test_net_if_addrs(self):
nics = psutil.net_if_addrs()
assert nics, nics

@ -1,42 +1,32 @@
%global srcname psutil
%global sum A process and system utilities module for Python
%bcond_without tests
Name: python-%{srcname}
Version: 5.8.0
Release: 4%{?dist}
Release: 12%{?dist}
Summary: %{sum}
License: BSD
URL: https://github.com/giampaolo/psutil
Source0: %{url}/archive/release-%{version}/%{srcname}-%{version}.tar.gz
# Exclude i686 arch. Due to a modularity issue it's being added to the
# x86_64 compose of CRB, but we don't want to ship it at all.
# See: https://projects.engineering.redhat.com/browse/RCM-72605
ExcludeArch: i686
#
# skip 2 tests that fail in mock chroots
#
Patch0: python-psutil-skip-tests-in-mock.patch
#
# skip 2 tests that fail in brew due to broken IPv6
#
Patch1: python-psutil-skip-tests-in-brew.patch
# Skip test due to broken handling of IPv6 addresses
# See: https://github.com/giampaolo/psutil/issues/1909
Patch1: python-psutil-skip-test-broken-ipv6.patch
# Skip flaky tests
Patch2: python-psutil-skip-flaky-tests.patch
# Add tolerance to psutil.tests.test_linux.TestSystemVirtualMemory.test_total
Patch2: https://github.com/giampaolo/psutil/pull/1935.patch#/python-psutil-add-tolerance.patch
BuildRequires: make
BuildRequires: gcc
BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: python%{python3_pkgversion}-rpm-macros
# Test dependencies
%if %{with tests}
BuildRequires: procps-ng
BuildRequires: python%{python3_pkgversion}-setuptools
%endif
%description
psutil is a module providing an interface for retrieving information on all
@ -57,6 +47,12 @@ a portable way by using Python 3, implementing many functionalities offered by
command line tools such as: ps, top, df, kill, free, lsof, free, netstat,
ifconfig, nice, ionice, iostat, iotop, uptime, pidof, tty, who, taskset, pmap.
%package -n python%{python3_pkgversion}-psutil-tests
Summary: %{sum}, test suite
Requires: python%{python3_pkgversion}-psutil%{?_isa} = %{?epoch:%{epoch}:}%{version}-%{release}
%description -n python%{python3_pkgversion}-psutil-tests
The test suite for psutil.
%prep
%autosetup -p1 -n %{srcname}-release-%{version}
@ -77,10 +73,8 @@ done
%py3_install
%if %{with tests}
%check
make test CI_TESTING=1 PYTHON=%{__python3} PYTHONPATH=%{buildroot}/%{python3_sitearch}
%endif
%files -n python%{python3_pkgversion}-%{srcname}
@ -88,12 +82,46 @@ make test CI_TESTING=1 PYTHON=%{__python3} PYTHONPATH=%{buildroot}/%{python3_sit
%doc CREDITS HISTORY.rst README.rst
%{python3_sitearch}/%{srcname}/
%{python3_sitearch}/*.egg-info
%exclude %{python3_sitearch}/%{srcname}/tests
%files -n python%{python3_pkgversion}-%{srcname}-tests
%{python3_sitearch}/%{srcname}/tests/
%changelog
* Fri Jan 15 2021 Tomas Orsava <torsava@redhat.com> - 5.8.0-4
- Convert from Fedora to the python39 module in RHEL8
- Resolves: rhbz#1877430
* Tue Feb 08 2022 Tomáš Hrnčiar <thrnciar@redhat.com> - 5.8.0-12
- Add automatically generated Obsoletes tag with the python39- prefix
for smoother upgrade from RHEL8
- Related: rhbz#1990421
* Fri Aug 20 2021 Charalampos Stratakis <cstratak@redhat.com> - 5.8.0-11
- Separate the tests to their own subpackage
Resolves: rhbz#1990466
* Tue Aug 10 2021 Mohan Boddu <mboddu@redhat.com> - 5.8.0-10
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 5.8.0-9
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
* Thu Apr 15 2021 Miro Hrončok <mhroncok@redhat.com> - 5.8.0-8
- Skip 2 tests that fail in brew due to broken IPv6
Resolves: rhbz#1913682
* Thu Apr 15 2021 Miro Hrončok <mhroncok@redhat.com> - 5.8.0-7
- Add tolerance to a flaky test
Resolves: rhbz#1913682
* Tue Apr 06 2021 Miro Hrončok <mhroncok@redhat.com> - 5.8.0-6
- Drop python2-psutil
Resolves: rhbz#1913682
* Thu Jan 28 2021 Tomas Orsava <torsava@redhat.com> - 5.8.0-5
- Remove unnecessary test dependency on python3-mock
- Remove unnecessary macro __provides_exclude_from
* Wed Jan 27 2021 Fedora Release Engineering <releng@fedoraproject.org> - 5.8.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sun Jan 10 2021 Kevin Fenzi <kevin@scrye.com> - 5.8.0-3
- Disable test_leak_mem test.

Loading…
Cancel
Save