#19 Update to 5.9.1. Fixes rhbz#2036137
Merged 2 years ago by kevin. Opened 2 years ago by jonathanspw.
Unknown source rawhide  into  rawhide

@@ -1,25 +0,0 @@

- 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):

@@ -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():

file modified
+5 -5
@@ -2,8 +2,8 @@

  %global sum A process and system utilities module for Python

  

  Name:           python-%{srcname}

- Version:        5.8.0

- Release:        16%{?dist}

+ Version:        5.9.1

+ Release:        1%{?dist}

  Summary:        %{sum}

  

  License:        BSD
@@ -14,9 +14,6 @@

  #

  Patch0:         python-psutil-skip-tests-in-mock.patch

  

- # Add tolerance to psutil.tests.test_linux.TestSystemVirtualMemory.test_total

- Patch1:         https://github.com/giampaolo/psutil/pull/1935.patch#/python-psutil-add-tolerance.patch

- 

  BuildRequires:  gcc

  BuildRequires:  grep

  BuildRequires:  make
@@ -94,6 +91,9 @@

  

  

  %changelog

+ * Sun Jul 31 2022 Jonathan Wright <jonathan@almalinux.org> - 5.9.1-1

+ - Update to 5.9.1.  Fixes rhbz#2036137

+ 

  * Fri Jul 22 2022 Fedora Release Engineering <releng@fedoraproject.org> - 5.8.0-16

  - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild

  

file modified
+1 -1
@@ -1,1 +1,1 @@

- SHA512 (psutil-5.8.0.tar.gz) = 156dffb660fcfb23b420d0455296c6b1ab366844390706af40788d89335eb946bb2e66f792755071c09ca282ad0d5503bb62175344753c88ba35613756e22fa3

+ SHA512 (psutil-5.9.1.tar.gz) = 44008ce813157c09772420c1c5d1f02bc47648286f451e61d3976d36f0c45a7f520bdaaeb59701197ddcb3d7b50b2c83b55190f10667edbf216e44bf08d1eca8

There is a missing > after the email address.

1 new commit added

  • fix typo in changelog
2 years ago

There is a missing > after the email address.

Fixed, thanks for the catch.

The i686 tests seem to be hanging. ;(

The i686 tests seem to be hanging. ;(

Got a log of the hang? I haven't been able to recreate it in scratch builds but if you have a log I'll look into patching whichever tests are being problematic.

EDIT - I see it. Wonder if it's just a one-off quirk...wish I could restart that build.

Just for the record, there is a Fedora CI - scratch build (marked as pending here) associated with each PR in Fedora dist-git.

That comment above normally restarts the build.

Yeah, look at any of the pending scratch builds...

Looks like one is hanging on aarch64 and the other 2 on i686.

90309139 20 bpeck/jenkins-continuous-infra.apps.ci.centos.org OPEN noarch build (f37, fedora-ci_62f60577a07643bc955f0919214d55dc_6ec7291d0c4448505cb313041ef00e4f62b4de76_111933;forks:jonathanspw:rpms:python-psutil.f37.src.rpm)
90309160 19 bpeck/jenkins-continuous-infra.apps.ci.centos.org OPEN i386 +buildArch (python-psutil-5.9.1-1.fc37.src.rpm, i686)
90366073 20 bpeck/jenkins-continuous-infra.apps.ci.centos.org OPEN noarch build (f37, fedora-ci_62f60577a07643bc955f0919214d55dc_6ec7291d0c4448505cb313041ef00e4f62b4de76_111986;forks:jonathanspw:rpms:python-psutil.f37.src.rpm)
90366129 19 bpeck/jenkins-continuous-infra.apps.ci.centos.org OPEN aarch64 +buildArch (python-psutil-5.9.1-1.fc37.src.rpm, aarch64)
90366332 20 bpeck/jenkins-continuous-infra.apps.ci.centos.org OPEN noarch build (f37, fedora-ci_62f60577a07643bc955f0919214d55dc_6ec7291d0c4448505cb313041ef00e4f62b4de76_111986;forks:jonathanspw:rpms:python-psutil.f37.src.rpm)
90366403 19 bpeck/jenkins-continuous-infra.apps.ci.centos.org OPEN i386 +buildArch (python-psutil-5.9.1-1.fc37.src.rpm, i686)

1 new commit added

  • disable test that I think is causing hang
2 years ago

aarch64 failed with

======================================================================
FAIL: psutil.tests.test_linux.TestSystemCPUFrequency.test_emulate_multi_cpu
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/builddir/build/BUILD/psutil-release-5.9.1/psutil/tests/test_linux.py", line 870, in test_emulate_multi_cpu
    self.assertEqual(freq[1].current, 400.0)
AssertionError: 665.039 != 400.0
----------------------------------------------------------------------

The most recent build you kicked off was successful.

Lets give this a try then... ;)

Pull-Request has been merged by kevin

2 years ago