minor cleanups
This commit is contained in:
@@ -1,6 +1,3 @@
|
||||
AUX psutil-5.6.5-tests.patch 3942 BLAKE2B 95c1f1c65b68a274d4bae00acc7872dbc25e646a94cb466f811efa90883cc233fdcad9f268c77f56a0a4cacdb65089e0c4038c16a7ddf275260055b2b7127a92 SHA512 de6e199927e548cda039c8296b8f8402391ea48586db873e8d1337145428eaebcb5f64847f3c661883a2898be1345edef4ff1cb30da3da84daecede2eff4907c
|
||||
AUX psutil-5.6.6-tests.patch 4286 BLAKE2B c0170138af6e1dac482f4c3589c2311186916a4a6150fa8679df01bba7fe99925f97bdaab61cac7ffa19341ea33c7a68260d644fea09a4774b795e813e12c4a4 SHA512 e33a7d375b72b3d43169adb493d8ad0684a2ce88159fdeb2e92ed966b2de1a6381a023f2e226b8d91194c66eeee4ce2b936cc08a9a84152a7119fecd8679723e
|
||||
AUX psutil-5.6.7-tests.patch 4286 BLAKE2B c0170138af6e1dac482f4c3589c2311186916a4a6150fa8679df01bba7fe99925f97bdaab61cac7ffa19341ea33c7a68260d644fea09a4774b795e813e12c4a4 SHA512 e33a7d375b72b3d43169adb493d8ad0684a2ce88159fdeb2e92ed966b2de1a6381a023f2e226b8d91194c66eeee4ce2b936cc08a9a84152a7119fecd8679723e
|
||||
AUX psutil-5.7.2-tests.patch 4427 BLAKE2B 8b2847eb445eb39080123dc1018ccf8c68c0ceb88538d9abef454724d298225ba3f65f735fd8528d3ed22d4f463e8025677144442ac471aeeea44bbe7c607d55 SHA512 46145825084b5d09e2dfa7f7b765757a8d5ac7ff2379ae66bb628ea30f010daff2fe9d389f7846a1f63f9b03c4b7bd8ac4f4d07a4ed977e06a68b63a4e27231b
|
||||
DIST psutil-5.8.0.tar.gz 470886 BLAKE2B f3d8d55dcbc2e0821f1ce96b9187692b2389681e13599b04e33b10f11fbe02f768a4dfc0802fe506713c8c3306d4c7011f2ac659c78f6a23a5523c7e36abc318 SHA512 b716bcbf33ceacdc30ddd0d0cf9bca0ab7751225b8f20dea664a82751dc88cb590720b098ae26056c8b3cdabcfe2fa198d618cea24c21465b1368a52ee182818
|
||||
EBUILD psutil-5.8.0.ebuild 1034 BLAKE2B 46952c44a50f9a5718730338c823607876711bb130ff42b7801ef1f50fce7a7be77f2e44015dff8212fced599b515e9d23cec523951ce886aff0f6009bfa6094 SHA512 a29169586bf294ee402c30537c6c4d99eb72b51a80d252fc0633e686ad9b4615f9ebd06be5e6a6a5d25df13219094695ab60bf5f064231e5d05ebae3d31728b7
|
||||
|
||||
@@ -1,90 +0,0 @@
|
||||
diff --git a/psutil/_pslinux.py b/psutil/_pslinux.py
|
||||
index 80fbf8bf..13c195b8 100644
|
||||
--- a/psutil/_pslinux.py
|
||||
+++ b/psutil/_pslinux.py
|
||||
@@ -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 --git a/psutil/tests/test_contracts.py b/psutil/tests/test_contracts.py
|
||||
index cb4a2b96..1ff7f6ca 100755
|
||||
--- a/psutil/tests/test_contracts.py
|
||||
+++ b/psutil/tests/test_contracts.py
|
||||
@@ -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 --git a/psutil/tests/test_linux.py b/psutil/tests/test_linux.py
|
||||
index ccde735d..db7183af 100755
|
||||
--- a/psutil/tests/test_linux.py
|
||||
+++ b/psutil/tests/test_linux.py
|
||||
@@ -380,9 +380,10 @@ class TestSystemVirtualMemory(unittest.TestCase):
|
||||
ret = psutil.virtual_memory()
|
||||
assert m.called
|
||||
self.assertEqual(ret.available, 2057400 * 1024 + 4818144 * 1024)
|
||||
- w = ws[0]
|
||||
- self.assertIn(
|
||||
- "inactive memory stats couldn't be determined", str(w.message))
|
||||
+ # i have no idea what they are trying to do here
|
||||
+ #w = ws[0]
|
||||
+ #self.assertIn(
|
||||
+ # "inactive memory stats couldn't be determined", str(w.message))
|
||||
|
||||
def test_avail_old_missing_zoneinfo(self):
|
||||
# Remove /proc/zoneinfo file. Make sure fallback is used
|
||||
@@ -410,10 +411,12 @@ class TestSystemVirtualMemory(unittest.TestCase):
|
||||
ret = psutil.virtual_memory()
|
||||
self.assertEqual(
|
||||
ret.available, 2057400 * 1024 + 4818144 * 1024)
|
||||
- w = ws[0]
|
||||
- self.assertIn(
|
||||
- "inactive memory stats couldn't be determined",
|
||||
- str(w.message))
|
||||
+
|
||||
+ # i have no idea what they are trying to do here
|
||||
+ #w = ws[0]
|
||||
+ #self.assertIn(
|
||||
+ # "inactive memory stats couldn't be determined",
|
||||
+ # str(w.message))
|
||||
|
||||
def test_virtual_memory_mocked(self):
|
||||
# Emulate /proc/meminfo because neither vmstat nor free return slab.
|
||||
@@ -878,7 +881,7 @@ class TestLoadAvg(unittest.TestCase):
|
||||
# =====================================================================
|
||||
|
||||
|
||||
-@unittest.skipIf(not LINUX, "LINUX only")
|
||||
+@unittest.skipIf(not LINUX or True, "Not working with latest ipaddress")
|
||||
class TestSystemNetIfAddrs(unittest.TestCase):
|
||||
|
||||
def test_ips(self):
|
||||
diff --git a/psutil/tests/test_process.py b/psutil/tests/test_process.py
|
||||
index 24a29b5a..9d9d36d2 100755
|
||||
--- a/psutil/tests/test_process.py
|
||||
+++ b/psutil/tests/test_process.py
|
||||
@@ -950,7 +950,7 @@ class TestProcess(unittest.TestCase):
|
||||
|
||||
for combo in combos:
|
||||
p.cpu_affinity(combo)
|
||||
- self.assertEqual(p.cpu_affinity(), combo)
|
||||
+ self.assertEqual(set(p.cpu_affinity()), set(combo))
|
||||
|
||||
# TODO: #595
|
||||
@unittest.skipIf(BSD, "broken on BSD")
|
||||
@@ -1486,6 +1486,7 @@ class TestProcess(unittest.TestCase):
|
||||
d2 = clean_dict(os.environ.copy())
|
||||
self.assertEqual(d1, d2)
|
||||
|
||||
+ @unittest.skipIf(TRAVIS, "broken under sandbox, using TRAVIS for Gentoo")
|
||||
@unittest.skipIf(not HAS_ENVIRON, "not supported")
|
||||
@unittest.skipIf(not POSIX, "POSIX only")
|
||||
def test_weird_environ(self):
|
||||
@@ -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):
|
||||
@@ -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):
|
||||
Reference in New Issue
Block a user