summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2022-05-05 14:22:28 +0200
committerMichał Górny <mgorny@gentoo.org>2022-05-05 14:22:42 +0200
commita229728f442cf8abf4539169a327902f2b50711b (patch)
tree4a2e619e9589a83a9a9ac40fc9e63133f25678c6 /dev-python/psutil
parentdev-lang/idris2: rebuild on chez/racket slot change (diff)
downloadgentoo-a229728f442cf8abf4539169a327902f2b50711b.tar.gz
gentoo-a229728f442cf8abf4539169a327902f2b50711b.tar.bz2
gentoo-a229728f442cf8abf4539169a327902f2b50711b.zip
dev-python/psutil: Skip more tests failing on tinderbox
Closes: https://bugs.gentoo.org/842747 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/psutil')
-rw-r--r--dev-python/psutil/files/psutil-5.9.0-tests.patch68
1 files changed, 57 insertions, 11 deletions
diff --git a/dev-python/psutil/files/psutil-5.9.0-tests.patch b/dev-python/psutil/files/psutil-5.9.0-tests.patch
index 56a5e1168733..245041f81221 100644
--- a/dev-python/psutil/files/psutil-5.9.0-tests.patch
+++ b/dev-python/psutil/files/psutil-5.9.0-tests.patch
@@ -19,7 +19,7 @@ index 21bb3e61..6c45c9e0 100644
IS_64BIT = sys.maxsize > 2 ** 32
diff --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py
-index 20e28d29..ce5d10a0 100755
+index 20e28d29..ab676110 100755
--- a/psutil/tests/test_linux.py
+++ b/psutil/tests/test_linux.py
@@ -28,6 +28,7 @@ from psutil._compat import PY3
@@ -30,7 +30,21 @@ index 20e28d29..ce5d10a0 100755
from psutil.tests import GITHUB_ACTIONS
from psutil.tests import GLOBAL_TIMEOUT
from psutil.tests import HAS_BATTERY
-@@ -929,6 +930,7 @@ class TestLoadAvg(PsutilTestCase):
+@@ -896,11 +897,13 @@ class TestSystemCPUFrequency(PsutilTestCase):
+ @unittest.skipIf(not LINUX, "LINUX only")
+ class TestSystemCPUStats(PsutilTestCase):
+
++ @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
+ def test_ctx_switches(self):
+ vmstat_value = vmstat("context switches")
+ psutil_value = psutil.cpu_stats().ctx_switches
+ self.assertAlmostEqual(vmstat_value, psutil_value, delta=500)
+
++ @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
+ def test_interrupts(self):
+ vmstat_value = vmstat("interrupts")
+ psutil_value = psutil.cpu_stats().interrupts
+@@ -929,6 +932,7 @@ class TestLoadAvg(PsutilTestCase):
@unittest.skipIf(not LINUX, "LINUX only")
class TestSystemNetIfAddrs(PsutilTestCase):
@@ -38,7 +52,15 @@ index 20e28d29..ce5d10a0 100755
def test_ips(self):
for name, addrs in psutil.net_if_addrs().items():
for addr in addrs:
-@@ -1491,6 +1493,7 @@ class TestMisc(PsutilTestCase):
+@@ -1316,6 +1320,7 @@ class TestRootFsDeviceFinder(PsutilTestCase):
+ findmnt_value = sh("findmnt -o SOURCE -rn /")
+ self.assertEqual(psutil_value, findmnt_value)
+
++ @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
+ def test_disk_partitions_mocked(self):
+ with mock.patch(
+ 'psutil._pslinux.cext.disk_partitions',
+@@ -1491,6 +1496,7 @@ class TestMisc(PsutilTestCase):
psutil.PROCFS_PATH = "/proc"
@retry_on_failure()
@@ -46,7 +68,7 @@ index 20e28d29..ce5d10a0 100755
def test_issue_687(self):
# In case of thread ID:
# - pid_exists() is supposed to return False
-@@ -1596,6 +1599,8 @@ class TestSensorsBattery(PsutilTestCase):
+@@ -1596,6 +1602,8 @@ class TestSensorsBattery(PsutilTestCase):
self.assertEqual(psutil.sensors_battery().power_plugged, False)
assert m.called
@@ -55,7 +77,7 @@ index 20e28d29..ce5d10a0 100755
def test_emulate_power_undetermined(self):
# Pretend we can't know whether the AC power cable not
# connected (assert fallback to False).
-@@ -1614,6 +1619,8 @@ class TestSensorsBattery(PsutilTestCase):
+@@ -1614,6 +1622,8 @@ class TestSensorsBattery(PsutilTestCase):
self.assertIsNone(psutil.sensors_battery().power_plugged)
assert m.called
@@ -64,7 +86,7 @@ index 20e28d29..ce5d10a0 100755
def test_emulate_energy_full_0(self):
# Emulate a case where energy_full files returns 0.
with mock_open_content(
-@@ -1621,6 +1628,8 @@ class TestSensorsBattery(PsutilTestCase):
+@@ -1621,6 +1631,8 @@ class TestSensorsBattery(PsutilTestCase):
self.assertEqual(psutil.sensors_battery().percent, 0)
assert m.called
@@ -73,7 +95,7 @@ index 20e28d29..ce5d10a0 100755
def test_emulate_energy_full_not_avail(self):
# Emulate a case where energy_full file does not exist.
# Expected fallback on /capacity.
-@@ -1634,6 +1643,8 @@ class TestSensorsBattery(PsutilTestCase):
+@@ -1634,6 +1646,8 @@ class TestSensorsBattery(PsutilTestCase):
"/sys/class/power_supply/BAT0/capacity", b"88"):
self.assertEqual(psutil.sensors_battery().percent, 88)
@@ -82,7 +104,7 @@ index 20e28d29..ce5d10a0 100755
def test_emulate_no_power(self):
# Emulate a case where /AC0/online file nor /BAT0/status exist.
with mock_open_exception(
-@@ -2220,6 +2231,7 @@ class TestProcessAgainstStatus(PsutilTestCase):
+@@ -2220,6 +2234,7 @@ class TestProcessAgainstStatus(PsutilTestCase):
value = self.read_status_file("nonvoluntary_ctxt_switches:")
self.assertEqual(self.proc.num_ctx_switches().involuntary, value)
@@ -111,7 +133,7 @@ index d946eb62..a53de565 100755
if PY3:
from io import StringIO
diff --git a/psutil/tests/test_posix.py b/psutil/tests/test_posix.py
-index 31b81926..7eb9bac5 100755
+index 31b81926..53b17953 100755
--- a/psutil/tests/test_posix.py
+++ b/psutil/tests/test_posix.py
@@ -23,6 +23,7 @@ from psutil import OPENBSD
@@ -122,7 +144,23 @@ index 31b81926..7eb9bac5 100755
from psutil.tests import HAS_NET_IO_COUNTERS
from psutil.tests import PYTHON_EXE
from psutil.tests import PsutilTestCase
-@@ -326,6 +327,7 @@ class TestSystemAPIs(PsutilTestCase):
+@@ -193,6 +194,7 @@ class TestProcess(PsutilTestCase):
+ vsz_psutil = psutil.Process(self.pid).memory_info()[1] / 1024
+ self.assertEqual(vsz_ps, vsz_psutil)
+
++ @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
+ def test_name(self):
+ name_ps = ps_name(self.pid)
+ # remove path if there is any, from the command
+@@ -271,6 +273,7 @@ class TestProcess(PsutilTestCase):
+ adjusted_ps_pathname = ps_pathname[:len(ps_pathname)]
+ self.assertEqual(ps_pathname, adjusted_ps_pathname)
+
++ @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
+ def test_cmdline(self):
+ ps_cmdline = ps_args(self.pid)
+ psutil_cmdline = " ".join(psutil.Process(self.pid).cmdline())
+@@ -326,6 +329,7 @@ class TestSystemAPIs(PsutilTestCase):
"couldn't find %s nic in 'ifconfig -a' output\n%s" % (
nic, output))
@@ -167,7 +205,7 @@ index c9059e33..0050c42a 100755
@unittest.skipIf(not POSIX, "POSIX only")
def test_weird_environ(self):
diff --git a/psutil/tests/test_system.py b/psutil/tests/test_system.py
-index db2cb348..b1faa154 100755
+index db2cb348..411835d4 100755
--- a/psutil/tests/test_system.py
+++ b/psutil/tests/test_system.py
@@ -33,6 +33,7 @@ from psutil._compat import long
@@ -186,3 +224,11 @@ index db2cb348..b1faa154 100755
@unittest.skipIf(CI_TESTING and not psutil.users(), "unreliable on CI")
def test_users(self):
users = psutil.users()
+@@ -580,6 +582,7 @@ class TestDiskAPIs(PsutilTestCase):
+ def test_disk_usage_bytes(self):
+ psutil.disk_usage(b'.')
+
++ @unittest.skipIf(GENTOO_TESTING, "broken in Gentoo test env")
+ def test_disk_partitions(self):
+ def check_ntuple(nt):
+ self.assertIsInstance(nt.device, str)