| |
@@ -18,15 +18,6 @@
|
| |
def test_against_nproc(self):
|
| |
num = int(sh("nproc --all"))
|
| |
self.assertEqual(psutil.cpu_count(logical=True), num)
|
| |
- @@ -713,7 +712,7 @@
|
| |
- m.called
|
| |
-
|
| |
-
|
| |
- -@unittest.skipIf(not LINUX, "LINUX only")
|
| |
- +@unittest.skip("Unreliable in mock")
|
| |
- class TestSystemCPUCountPhysical(PsutilTestCase):
|
| |
-
|
| |
- @unittest.skipIf(not which("lscpu"), "lscpu utility not available")
|
| |
@@ -745,7 +744,7 @@
|
| |
@unittest.skipIf(not LINUX, "LINUX only")
|
| |
class TestSystemCPUFrequency(PsutilTestCase):
|
| |
@@ -70,18 +61,40 @@
|
| |
def test_cpu_affinity(self):
|
| |
value = self.read_status_file("Cpus_allowed_list:")
|
| |
if '-' in str(value):
|
| |
- diff --color -Nur psutil-release-5.8.0.orig/psutil/tests/test_misc.py psutil-release-5.8.0/psutil/tests/test_misc.py
|
| |
- --- psutil-release-5.8.0.orig/psutil/tests/test_misc.py 2020-12-18 16:45:00.000000000 -0800
|
| |
- +++ psutil-release-5.8.0/psutil/tests/test_misc.py 2021-01-10 15:38:31.104890945 -0800
|
| |
- @@ -355,7 +355,7 @@
|
| |
-
|
| |
- def test_setup_script(self):
|
| |
- setup_py = os.path.join(ROOT_DIR, 'setup.py')
|
| |
- - if CI_TESTING and not os.path.exists(setup_py):
|
| |
- + if not os.path.exists(setup_py):
|
| |
- return self.skipTest("can't find setup.py")
|
| |
- module = import_module_by_path(setup_py)
|
| |
- self.assertRaises(SystemExit, module.setup)
|
| |
+ diff -uNr psutil-release-5.9.1.orig/psutil/tests/test_linux.py psutil-release-5.9.1/psutil/tests/test_linux.py
|
| |
+ --- psutil-release-5.9.1.orig/psutil/tests/test_linux.py 2022-07-31 00:44:02.758574274 -0500
|
| |
+ +++ psutil-release-5.9.1/psutil/tests/test_linux.py 2022-07-31 00:57:10.164798702 -0500
|
| |
+ @@ -727,7 +727,7 @@
|
| |
+ m.called
|
| |
+
|
| |
+
|
| |
+ -@unittest.skipIf(not LINUX, "LINUX only")
|
| |
+ +@unittest.skip("Unreliable in mock")
|
| |
+ class TestSystemCPUCountCores(PsutilTestCase):
|
| |
+
|
| |
+ @unittest.skipIf(not which("lscpu"), "lscpu utility not available")
|
| |
+ @@ -1294,6 +1294,7 @@
|
| |
+ finder.ask_sys_class_block()
|
| |
+
|
| |
+ @unittest.skipIf(GITHUB_ACTIONS, "unsupported on GITHUB_ACTIONS")
|
| |
+ + @unittest.skip("Unreliable in mock")
|
| |
+ def test_comparisons(self):
|
| |
+ finder = RootFsDeviceFinder()
|
| |
+ self.assertIsNotNone(finder.find())
|
| |
+ @@ -1316,11 +1317,13 @@
|
| |
+
|
| |
+ @unittest.skipIf(not which("findmnt"), "findmnt utility not available")
|
| |
+ @unittest.skipIf(GITHUB_ACTIONS, "unsupported on GITHUB_ACTIONS")
|
| |
+ + @unittest.skip("Unreliable in mock")
|
| |
+ def test_against_findmnt(self):
|
| |
+ psutil_value = RootFsDeviceFinder().find()
|
| |
+ findmnt_value = sh("findmnt -o SOURCE -rn /")
|
| |
+ self.assertEqual(psutil_value, findmnt_value)
|
| |
+
|
| |
+ + @unittest.skip("Unreliable in mock")
|
| |
+ def test_disk_partitions_mocked(self):
|
| |
+ with mock.patch(
|
| |
+ 'psutil._pslinux.cext.disk_partitions',
|
| |
diff --color -Nur psutil-release-5.8.0.orig/psutil/tests/test_system.py psutil-release-5.8.0/psutil/tests/test_system.py
|
| |
--- psutil-release-5.8.0.orig/psutil/tests/test_system.py 2020-12-18 16:45:00.000000000 -0800
|
| |
+++ psutil-release-5.8.0/psutil/tests/test_system.py 2021-01-10 15:38:31.105890946 -0800
|
| |
@@ -98,7 +111,7 @@
|
| |
if not AIX and name in ('ctx_switches', 'interrupts'):
|
| |
self.assertGreater(value, 0)
|
| |
|
| |
- - @unittest.skipIf(not HAS_CPU_FREQ, "not suported")
|
| |
+ - @unittest.skipIf(not HAS_CPU_FREQ, "not supported")
|
| |
+ @unittest.skip("Unreliable in mock")
|
| |
def test_cpu_freq(self):
|
| |
def check_ls(ls):
|
| |
@@ -131,4 +144,15 @@
|
| |
+ @unittest.skip("Unreliable in mock")
|
| |
def test_leak_mem(self):
|
| |
ls = []
|
| |
-
|
| |
+
|
| |
+ diff -uNr psutil-release-5.9.1.orig/psutil/tests/test_contracts.py psutil-release-5.9.1/psutil/tests/test_contracts.py
|
| |
+ --- psutil-release-5.9.1.orig/psutil/tests/test_contracts.py 2022-07-31 00:44:02.758574274 -0500
|
| |
+ +++ psutil-release-5.9.1/psutil/tests/test_contracts.py 2022-08-01 18:13:07.225928037 -0500
|
| |
+ @@ -409,6 +409,7 @@
|
| |
+ from psutil.tests.test_contracts import proc_info
|
| |
+ return self.pool.imap_unordered(proc_info, psutil.pids())
|
| |
+
|
| |
+ + @unittest.skip("Unreliable in mock")
|
| |
+ def test_all(self):
|
| |
+ failures = []
|
| |
+ for info in self.iter_proc_info():
|
| |
Successful scratch-build: https://koji.fedoraproject.org/koji/taskinfo?taskID=90288438