public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/gentoo:master commit in: dev-python/psutil/files/
@ 2020-05-26 10:35 Michał Górny
  0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2020-05-26 10:35 UTC (permalink / raw
  To: gentoo-commits

commit:     ad8c79245d320264c800845b2a5e402d6600be20
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue May 26 10:32:48 2020 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue May 26 10:35:46 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ad8c7924

dev-python/psutil: Fix one more test failure

Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/psutil/files/psutil-5.7.0-tests.patch | 45 ++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/dev-python/psutil/files/psutil-5.7.0-tests.patch b/dev-python/psutil/files/psutil-5.7.0-tests.patch
index 2def4979faf..9097e90535a 100644
--- a/dev-python/psutil/files/psutil-5.7.0-tests.patch
+++ b/dev-python/psutil/files/psutil-5.7.0-tests.patch
@@ -111,3 +111,48 @@ index 3834209f..b07b5883 100755
 -- 
 2.25.1
 
+From 026e4b0076a352fcb1e8de71f1393ae0d50ac06d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?= <mgorny@gentoo.org>
+Date: Tue, 26 May 2020 12:28:59 +0200
+Subject: [PATCH] Sort results in test_cpu_affinity_all_combinations
+
+Fix test_cpu_affinity_all_combinations to permit any CPU order
+in results.  This fixes test failure due to affinity being reported
+out of order:
+
+    ======================================================================
+    FAIL: psutil.tests.test_process.TestProcess.test_cpu_affinity_all_combinations
+    ----------------------------------------------------------------------
+    Traceback (most recent call last):
+      File "/tmp/psutil/psutil/tests/test_process.py", line 940, in test_cpu_affinity_all_combinations
+        self.assertEqual(p.cpu_affinity(), combo)
+    AssertionError: Lists differ: [8, 1] != [1, 8]
+
+    First differing element 0:
+    8
+    1
+
+    - [8, 1]
+    + [1, 8]
+
+    ----------------------------------------------------------------------
+---
+ psutil/tests/test_process.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py
+index a0b21c6e..e3394799 100755
+--- a/psutil/tests/test_process.py
++++ b/psutil/tests/test_process.py
+@@ -937,7 +937,7 @@ class TestProcess(PsutilTestCase):
+ 
+         for combo in combos:
+             p.cpu_affinity(combo)
+-            self.assertEqual(p.cpu_affinity(), combo)
++            self.assertEqual(sorted(p.cpu_affinity()), sorted(combo))
+ 
+     # TODO: #595
+     @unittest.skipIf(BSD, "broken on BSD")
+-- 
+2.26.2
+


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/psutil/files/
@ 2020-06-02  4:28 Aaron Bauman
  0 siblings, 0 replies; 4+ messages in thread
From: Aaron Bauman @ 2020-06-02  4:28 UTC (permalink / raw
  To: gentoo-commits

commit:     3ed9149a99d6668fb344f1e273f4103a82daec1f
Author:     Michael Mair-Keimberger <m.mairkeimberger <AT> gmail <DOT> com>
AuthorDate: Tue May 19 19:23:26 2020 +0000
Commit:     Aaron Bauman <bman <AT> gentoo <DOT> org>
CommitDate: Tue Jun  2 04:28:01 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3ed9149a

dev-python/psutil: remove unused patch

Signed-off-by: Michael Mair-Keimberger <m.mairkeimberger <AT> gmail.com>
Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>

 dev-python/psutil/files/psutil-5.6.7-tests.patch | 96 ------------------------
 1 file changed, 96 deletions(-)

diff --git a/dev-python/psutil/files/psutil-5.6.7-tests.patch b/dev-python/psutil/files/psutil-5.6.7-tests.patch
deleted file mode 100644
index 3e6ec254c19..00000000000
--- a/dev-python/psutil/files/psutil-5.6.7-tests.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-diff -dupr a/psutil/_pslinux.py b/psutil/_pslinux.py
---- a/psutil/_pslinux.py	2019-11-21 17:23:01.000000000 +0100
-+++ b/psutil/_pslinux.py	2019-11-27 12:56:11.491875281 +0100
-@@ -1108,7 +1108,7 @@ def disk_io_counters(perdisk=False):
-                     fields = f.read().strip().split()
-                 name = os.path.basename(root)
-                 (reads, reads_merged, rbytes, rtime, writes, writes_merged,
--                    wbytes, wtime, _, busy_time, _) = map(int, fields)
-+                 wbytes, wtime, _, busy_time, _) = map(int, fields[:11])
-                 yield (name, reads, writes, rbytes, wbytes, rtime,
-                        wtime, reads_merged, writes_merged, busy_time)
- 
-diff -dupr a/psutil/tests/test_contracts.py b/psutil/tests/test_contracts.py
---- a/psutil/tests/test_contracts.py	2019-06-20 08:10:28.000000000 +0200
-+++ b/psutil/tests/test_contracts.py	2019-11-27 12:56:11.492875227 +0100
-@@ -174,6 +174,7 @@ class TestAvailability(unittest.TestCase
- 
- class TestDeprecations(unittest.TestCase):
- 
-+    @unittest.skip("broken with newer deps")
-     def test_memory_info_ex(self):
-         with warnings.catch_warnings(record=True) as ws:
-             psutil.Process().memory_info_ex()
-diff -dupr a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py
---- a/psutil/tests/test_linux.py	2019-11-21 17:23:25.000000000 +0100
-+++ b/psutil/tests/test_linux.py	2019-11-27 13:18:19.715499797 +0100
-@@ -17,6 +17,7 @@ import re
- import shutil
- import socket
- import struct
-+import sys
- import tempfile
- import textwrap
- import time
-@@ -380,6 +381,8 @@ class TestSystemVirtualMemory(unittest.T
-                 ret = psutil.virtual_memory()
-             assert m.called
-             self.assertEqual(ret.available, 2057400 * 1024 + 4818144 * 1024)
-+            if sys.version_info < (3,):
-+                return
-             w = ws[0]
-             self.assertIn(
-                 "inactive memory stats couldn't be determined", str(w.message))
-@@ -410,6 +413,8 @@ class TestSystemVirtualMemory(unittest.T
-                     ret = psutil.virtual_memory()
-                     self.assertEqual(
-                         ret.available, 2057400 * 1024 + 4818144 * 1024)
-+                    if sys.version_info < (3,):
-+                        return
-                     w = ws[0]
-                     self.assertIn(
-                         "inactive memory stats couldn't be determined",
-@@ -878,7 +883,7 @@ class TestLoadAvg(unittest.TestCase):
- # =====================================================================
- 
- 
--@unittest.skipIf(not LINUX, "LINUX only")
-+@unittest.skip('very fragile, broken with new ipaddress')
- class TestSystemNetIfAddrs(unittest.TestCase):
- 
-     def test_ips(self):
-@@ -1363,6 +1368,7 @@ class TestMisc(unittest.TestCase):
-             psutil.PROCFS_PATH = "/proc"
-             os.rmdir(tdir)
- 
-+    @unittest.skip('fails on Gentoo')
-     def test_issue_687(self):
-         # In case of thread ID:
-         # - pid_exists() is supposed to return False
-@@ -2090,6 +2096,7 @@ class TestProcessAgainstStatus(unittest.
-         value = self.read_status_file("nonvoluntary_ctxt_switches:")
-         self.assertEqual(self.proc.num_ctx_switches().involuntary, value)
- 
-+    @unittest.skip('fails on Gentoo')
-     def test_cpu_affinity(self):
-         value = self.read_status_file("Cpus_allowed_list:")
-         if '-' in str(value):
-diff -dupr a/psutil/tests/test_process.py b/psutil/tests/test_process.py
---- a/psutil/tests/test_process.py	2019-11-22 12:37:20.000000000 +0100
-+++ b/psutil/tests/test_process.py	2019-11-27 13:07:36.966525513 +0100
-@@ -351,6 +351,7 @@ class TestProcess(unittest.TestCase):
-             self.assertGreaterEqual(io2[i], 0)
-             self.assertGreaterEqual(io2[i], 0)
- 
-+    @unittest.skip('fails if builder is ioniced already')
-     @unittest.skipIf(not HAS_IONICE, "not supported")
-     @unittest.skipIf(not LINUX, "linux only")
-     def test_ionice_linux(self):
-@@ -1486,6 +1487,7 @@ class TestProcess(unittest.TestCase):
-         d2 = clean_dict(os.environ.copy())
-         self.assertEqual(d1, d2)
- 
-+    @unittest.skip("broken by Gentoo sandbox magic")
-     @unittest.skipIf(not HAS_ENVIRON, "not supported")
-     @unittest.skipIf(not POSIX, "POSIX only")
-     def test_weird_environ(self):


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/psutil/files/
@ 2022-05-05 12:22 Michał Górny
  0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2022-05-05 12:22 UTC (permalink / raw
  To: gentoo-commits

commit:     a229728f442cf8abf4539169a327902f2b50711b
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Thu May  5 12:22:28 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Thu May  5 12:22:42 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a229728f

dev-python/psutil: Skip more tests failing on tinderbox

Closes: https://bugs.gentoo.org/842747
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/psutil/files/psutil-5.9.0-tests.patch | 68 ++++++++++++++++++++----
 1 file 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)


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [gentoo-commits] repo/gentoo:master commit in: dev-python/psutil/files/
@ 2022-05-10 14:04 Michał Górny
  0 siblings, 0 replies; 4+ messages in thread
From: Michał Górny @ 2022-05-10 14:04 UTC (permalink / raw
  To: gentoo-commits

commit:     228026a1911d31890da51a358218bbe7f735db60
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Tue May 10 14:04:02 2022 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Tue May 10 14:04:19 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=228026a1

dev-python/psutil: Skip more tests (esp. on SPARC)

Closes: https://bugs.gentoo.org/843572
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org>

 dev-python/psutil/files/psutil-5.9.0-tests.patch | 94 ++++++++++++++++++++----
 1 file changed, 79 insertions(+), 15 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 245041f81221..6dcf6f240e41 100644
--- a/dev-python/psutil/files/psutil-5.9.0-tests.patch
+++ b/dev-python/psutil/files/psutil-5.9.0-tests.patch
@@ -19,10 +19,18 @@ 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..ab676110 100755
+index 20e28d29..c21d0aec 100755
 --- a/psutil/tests/test_linux.py
 +++ b/psutil/tests/test_linux.py
-@@ -28,6 +28,7 @@ from psutil._compat import PY3
+@@ -14,6 +14,7 @@ import errno
+ import glob
+ import io
+ import os
++import platform
+ import re
+ import shutil
+ import socket
+@@ -28,6 +29,7 @@ from psutil._compat import PY3
  from psutil._compat import FileNotFoundError
  from psutil._compat import basestring
  from psutil._compat import u
@@ -30,7 +38,39 @@ index 20e28d29..ab676110 100755
  from psutil.tests import GITHUB_ACTIONS
  from psutil.tests import GLOBAL_TIMEOUT
  from psutil.tests import HAS_BATTERY
-@@ -896,11 +897,13 @@ class TestSystemCPUFrequency(PsutilTestCase):
+@@ -688,6 +690,7 @@ class TestSystemCPUCountLogical(PsutilTestCase):
+         num = len([x for x in out.split('\n') if not x.startswith('#')])
+         self.assertEqual(psutil.cpu_count(logical=True), num)
+ 
++    @unittest.skipIf(GENTOO_TESTING and platform.machine().startswith("sparc"), "broken on Gentoo/SPARC")
+     def test_emulate_fallbacks(self):
+         import psutil._pslinux
+         original = psutil._pslinux.cpu_count_logical()
+@@ -735,6 +738,7 @@ class TestSystemCPUCountCores(PsutilTestCase):
+                 core_ids.add(fields[1])
+         self.assertEqual(psutil.cpu_count(logical=False), len(core_ids))
+ 
++    @unittest.skipIf(GENTOO_TESTING and platform.machine().startswith("sparc"), "broken on Gentoo/SPARC")
+     def test_method_2(self):
+         meth_1 = psutil._pslinux.cpu_count_cores()
+         with mock.patch('glob.glob', return_value=[]) as m:
+@@ -755,6 +759,7 @@ class TestSystemCPUCountCores(PsutilTestCase):
+ class TestSystemCPUFrequency(PsutilTestCase):
+ 
+     @unittest.skipIf(not HAS_CPU_FREQ, "not supported")
++    @unittest.skipIf(GENTOO_TESTING and platform.machine().startswith("sparc"), "broken on Gentoo/SPARC")
+     def test_emulate_use_second_file(self):
+         # https://github.com/giampaolo/psutil/issues/981
+         def path_exists_mock(path):
+@@ -769,6 +774,7 @@ class TestSystemCPUFrequency(PsutilTestCase):
+             assert psutil.cpu_freq()
+ 
+     @unittest.skipIf(not HAS_CPU_FREQ, "not supported")
++    @unittest.skipIf(GENTOO_TESTING and platform.machine().startswith("sparc"), "broken on Gentoo/SPARC")
+     def test_emulate_use_cpuinfo(self):
+         # Emulate a case where /sys/devices/system/cpu/cpufreq* does not
+         # exist and /proc/cpuinfo is used instead.
+@@ -896,11 +902,13 @@ class TestSystemCPUFrequency(PsutilTestCase):
  @unittest.skipIf(not LINUX, "LINUX only")
  class TestSystemCPUStats(PsutilTestCase):
  
@@ -44,7 +84,7 @@ index 20e28d29..ab676110 100755
      def test_interrupts(self):
          vmstat_value = vmstat("interrupts")
          psutil_value = psutil.cpu_stats().interrupts
-@@ -929,6 +932,7 @@ class TestLoadAvg(PsutilTestCase):
+@@ -929,6 +937,7 @@ class TestLoadAvg(PsutilTestCase):
  @unittest.skipIf(not LINUX, "LINUX only")
  class TestSystemNetIfAddrs(PsutilTestCase):
  
@@ -52,7 +92,7 @@ index 20e28d29..ab676110 100755
      def test_ips(self):
          for name, addrs in psutil.net_if_addrs().items():
              for addr in addrs:
-@@ -1316,6 +1320,7 @@ class TestRootFsDeviceFinder(PsutilTestCase):
+@@ -1316,6 +1325,7 @@ class TestRootFsDeviceFinder(PsutilTestCase):
          findmnt_value = sh("findmnt -o SOURCE -rn /")
          self.assertEqual(psutil_value, findmnt_value)
  
@@ -60,7 +100,7 @@ index 20e28d29..ab676110 100755
      def test_disk_partitions_mocked(self):
          with mock.patch(
                  'psutil._pslinux.cext.disk_partitions',
-@@ -1491,6 +1496,7 @@ class TestMisc(PsutilTestCase):
+@@ -1491,6 +1501,7 @@ class TestMisc(PsutilTestCase):
              psutil.PROCFS_PATH = "/proc"
  
      @retry_on_failure()
@@ -68,7 +108,7 @@ index 20e28d29..ab676110 100755
      def test_issue_687(self):
          # In case of thread ID:
          # - pid_exists() is supposed to return False
-@@ -1596,6 +1602,8 @@ class TestSensorsBattery(PsutilTestCase):
+@@ -1596,6 +1607,8 @@ class TestSensorsBattery(PsutilTestCase):
              self.assertEqual(psutil.sensors_battery().power_plugged, False)
              assert m.called
  
@@ -77,7 +117,7 @@ index 20e28d29..ab676110 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 +1622,8 @@ class TestSensorsBattery(PsutilTestCase):
+@@ -1614,6 +1627,8 @@ class TestSensorsBattery(PsutilTestCase):
              self.assertIsNone(psutil.sensors_battery().power_plugged)
              assert m.called
  
@@ -86,7 +126,7 @@ index 20e28d29..ab676110 100755
      def test_emulate_energy_full_0(self):
          # Emulate a case where energy_full files returns 0.
          with mock_open_content(
-@@ -1621,6 +1631,8 @@ class TestSensorsBattery(PsutilTestCase):
+@@ -1621,6 +1636,8 @@ class TestSensorsBattery(PsutilTestCase):
              self.assertEqual(psutil.sensors_battery().percent, 0)
              assert m.called
  
@@ -95,7 +135,7 @@ index 20e28d29..ab676110 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 +1646,8 @@ class TestSensorsBattery(PsutilTestCase):
+@@ -1634,6 +1651,8 @@ class TestSensorsBattery(PsutilTestCase):
                          "/sys/class/power_supply/BAT0/capacity", b"88"):
                      self.assertEqual(psutil.sensors_battery().percent, 88)
  
@@ -104,7 +144,7 @@ index 20e28d29..ab676110 100755
      def test_emulate_no_power(self):
          # Emulate a case where /AC0/online file nor /BAT0/status exist.
          with mock_open_exception(
-@@ -2220,6 +2234,7 @@ class TestProcessAgainstStatus(PsutilTestCase):
+@@ -2220,6 +2239,7 @@ class TestProcessAgainstStatus(PsutilTestCase):
          value = self.read_status_file("nonvoluntary_ctxt_switches:")
          self.assertEqual(self.proc.num_ctx_switches().involuntary, value)
  
@@ -205,10 +245,18 @@ 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..411835d4 100755
+index db2cb348..d719c59e 100755
 --- a/psutil/tests/test_system.py
 +++ b/psutil/tests/test_system.py
-@@ -33,6 +33,7 @@ from psutil._compat import long
+@@ -10,6 +10,7 @@ import contextlib
+ import datetime
+ import errno
+ import os
++import platform
+ import pprint
+ import shutil
+ import signal
+@@ -33,6 +34,7 @@ from psutil._compat import long
  from psutil.tests import ASCII_FS
  from psutil.tests import CI_TESTING
  from psutil.tests import DEVNULL
@@ -216,7 +264,7 @@ index db2cb348..411835d4 100755
  from psutil.tests import GITHUB_ACTIONS
  from psutil.tests import GLOBAL_TIMEOUT
  from psutil.tests import HAS_BATTERY
-@@ -199,6 +200,7 @@ class TestMiscAPIs(PsutilTestCase):
+@@ -199,6 +201,7 @@ class TestMiscAPIs(PsutilTestCase):
          self.assertGreater(bt, 0)
          self.assertLess(bt, time.time())
  
@@ -224,7 +272,23 @@ index db2cb348..411835d4 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):
+@@ -426,6 +429,7 @@ class TestCpuAPIs(PsutilTestCase):
+                 if difference >= 0.05:
+                     return
+ 
++    @unittest.skipIf(GENTOO_TESTING, "flaky")
+     def test_cpu_times_comparison(self):
+         # Make sure the sum of all per cpu times is almost equal to
+         # base "one cpu" times.
+@@ -512,6 +516,7 @@ class TestCpuAPIs(PsutilTestCase):
+                 self.assertGreater(value, 0)
+ 
+     @unittest.skipIf(not HAS_CPU_FREQ, "not suported")
++    @unittest.skipIf(GENTOO_TESTING and platform.machine().startswith("sparc"), "broken on Gentoo/SPARC")
+     def test_cpu_freq(self):
+         def check_ls(ls):
+             for nt in ls:
+@@ -580,6 +585,7 @@ class TestDiskAPIs(PsutilTestCase):
      def test_disk_usage_bytes(self):
          psutil.disk_usage(b'.')
  


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-05-10 14:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-06-02  4:28 [gentoo-commits] repo/gentoo:master commit in: dev-python/psutil/files/ Aaron Bauman
  -- strict thread matches above, loose matches on Subject: below --
2022-05-10 14:04 Michał Górny
2022-05-05 12:22 Michał Górny
2020-05-26 10:35 Michał Górny

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox