#20 Skip more tests as unreliable in mock
Merged 11 months ago by kevin. Opened 11 months ago by yselkowitz.
rpms/ yselkowitz/python-psutil rawhide  into  rawhide

@@ -1,6 +1,15 @@ 

  diff --color -Nur psutil-release-5.8.0.orig/psutil/tests/test_linux.py psutil-release-5.8.0/psutil/tests/test_linux.py

  --- psutil-release-5.8.0.orig/psutil/tests/test_linux.py	2020-12-18 16:45:00.000000000 -0800

  +++ psutil-release-5.8.0/psutil/tests/test_linux.py	2021-01-10 15:38:31.104890945 -0800

+ @@ -261,7 +261,7 @@

+          self.assertAlmostEqual(

+              vmstat_value, psutil_value, delta=TOLERANCE_SYS_MEM)

+  

+ -    @retry_on_failure()

+ +    @unittest.skip("Unreliable on mock")

+      def test_used(self):

+          # Older versions of procps used slab memory to calculate used memory.

+          # This got changed in:

  @@ -661,14 +661,13 @@

               value = int(value.split('-')[1]) + 1

               self.assertEqual(psutil.cpu_count(), value)
@@ -36,6 +45,15 @@ 

       def test_emulate_use_cpuinfo(self):

           # Emulate a case where /sys/devices/system/cpu/cpufreq* does not

           # exist and /proc/cpuinfo is used instead.

+ @@ -829,7 +828,7 @@

+                  if freq.max != 0.0:

+                      self.assertEqual(freq.max, 700.0)

+  

+ -    @unittest.skipIf(not HAS_CPU_FREQ, "not supported")

+ +    @unittest.skip("Unreliable in mock")

+      def test_emulate_multi_cpu(self):

+          def open_mock(name, *args, **kwargs):

+              n = name

  @@ -888,7 +887,7 @@

                       self.assertEqual(freq.current, 200)

   
@@ -45,6 +63,15 @@ 

   class TestSystemCPUStats(PsutilTestCase):

   

       def test_ctx_switches(self):

+ @@ -931,7 +931,7 @@

+  # =====================================================================

+  

+  

+ -@unittest.skipIf(not LINUX, "LINUX only")

+ +@unittest.skip("Unreliable in mock")

+  class TestSystemNetIfAddrs(PsutilTestCase):

+  

+      def test_ips(self):

  @@ -2126,13 +2125,14 @@

           value = tuple(map(int, value.split()[1:4]))

           self.assertEqual(self.proc.gids(), value)

Something has changed since this was last built, causing more tests to fail in (at least) rawhide and ELN:

https://koji.fedoraproject.org/koji/taskinfo?taskID=103206546
https://koji.fedoraproject.org/koji/taskinfo?taskID=103011778

This is blocking the ongoing ELN and forthcoming F39 mass rebuilds.

Yeah, the test suite here has always been subject to races and weird effects. ;(
No objection to just disabling more flaky ones. ;(

Pull-Request has been merged by kevin

11 months ago
Metadata