Fix treating sockets as paths in tests

Resolves: RHEL-58359
This commit is contained in:
Karolina Surma 2024-08-21 12:43:57 +02:00
parent 7564b2429d
commit 95765c0418
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,13 @@
diff --git a/psutil/tests/test_process_all.py b/psutil/tests/test_process_all.py
index afb3195..fd9c96c 100755
--- a/psutil/tests/test_process_all.py
+++ b/psutil/tests/test_process_all.py
@@ -404,7 +404,7 @@ class TestFetchAllProcesses(PsutilTestCase):
for fname in nt._fields:
value = getattr(nt, fname)
if fname == 'path':
- if not value.startswith(("[", "anon_inode:")):
+ if not value.startswith(("[", "anon_inode:", "socket:")):
assert os.path.isabs(nt.path), nt.path
# commented as on Linux we might get
# '/foo/bar (deleted)'

View File

@ -29,6 +29,11 @@ Patch: python-psutil-skip-test_debug.patch
# Failure reported upstream: https://github.com/giampaolo/psutil/issues/2434
#
Patch: python-psutil-skip-test-sensors-temperatures.patch
#
# Don't treat sockets as paths
# Reported upstream: https://github.com/giampaolo/psutil/pull/2435
#
Patch: python-psutil-sockets-are-not-paths.patch
BuildRequires: gcc
BuildRequires: sed
@ -119,6 +124,7 @@ APPVEYOR=1 %{py3_test_envvars} %{python3} psutil/tests/runner.py
%changelog
* Tue Aug 20 2024 Karolina Surma <ksurma@redhat.com> - 5.9.8-4
- Skip unreliable test_sensors_temperatures
- Don't treat sockets as paths in tests
* Mon Jun 24 2024 Troy Dawson <tdawson@redhat.com> - 5.9.8-3
- Bump release for June 2024 mass rebuild