python-psutil/skip-obs.patch

129 lines
5.4 KiB
Diff
Raw Normal View History

Index: psutil-5.9.0/psutil/tests/test_misc.py
- Add patch to skip more tests that won't work in OBS: * skip-obs.patch - Update to 5.6.3: * 1494: [AIX] added support for Process.environ(). (patch by Arnon Yaari) * 1276: [AIX] can't get whole cmdline(). (patch by Arnon Yaari) * 1501_: [Windows] Process cmdline() and exe() raise unhandled "WinError 1168 element not found" exceptions for "Registry" and "Memory Compression" psuedo processes on Windows 10. * 1526_: [NetBSD] process cmdline() could raise MemoryError. (patch by Kamil Rytarowski) - Update to 5.6.2: * 1404: [Linux] cpu_count(logical=False) uses a second method (read from /sys/devices/system/cpu/cpu[0-9]/topology/core_id) in order to determine the number of physical CPUs in case /proc/cpuinfo does not provide this info. * 1458: provide coloured test output. Also show failures on KeyboardInterrupt. * 1464: various docfixes (always point to python3 doc, fix links, etc.). * 1478: add make command to re-run tests failed on last run. * 1456: [Linux] cpu_freq() returns None instead of 0.0 when min/max not available (patch by Alex Manuskin) * 1462: [Linux] (tests) make tests invariant to LANG setting (patch by Benjamin Drung) * 1463: cpu_distribution.py script was broken. * 1470: [Linux] disk_partitions(): fix corner case when /etc/mtab doesn't exist. (patch by Cedric Lamoriniere) * 1472: [Linux] cpu_freq() does not return all CPUs on Rasbperry-pi 3. * 1493: [Linux] cpu_freq(): handle the case where /sys/devices/system/cpu/cpufreq/ exists but is empty. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=107
2019-09-10 13:20:31 +00:00
===================================================================
--- psutil-5.9.0.orig/psutil/tests/test_misc.py
+++ psutil-5.9.0/psutil/tests/test_misc.py
@@ -368,6 +368,7 @@ class TestMisc(PsutilTestCase):
Accepting request 866659 from home:alarrosa:branches:devel:languages:python - update to 5.8.0: * Enhancements: - 1863: disk_partitions() exposes 2 extra fields: maxfile and maxpath, which are the maximum file name and path name length. - 1872: [Windows] added support for PyPy 2.7. - 1879: provide pre-compiled wheels for Linux and macOS. - 1880: get rid of Travis and Cirrus CI services (they are no longer free). CI testing is now done by GitHub Actions on Linux, macOS and FreeBSD (yes). AppVeyor is still being used for Windows CI. * Bug fixes: - 1708: [Linux] get rid of sensors_temperatures() duplicates. (patch by Tim Schlueter). - 1839: [Windows] always raise AccessDenied when failing to query 64 processes from 32 bit ones (NtWoW64 APIs). - 1866: [Windows] process exe(), cmdline(), environ() may raise "invalid access to memory location" on Python 3.9. - 1874: [Solaris] wrong swap output given when encrypted column is present. - 1875: [Windows] process username() may raise ERROR_NONE_MAPPED if the SID has no corresponding account name. In this case AccessDenied is now raised. - 1877: [Windows] OpenProcess may fail with ERROR_SUCCESS. Turn it into AccessDenied or NoSuchProcess depending on whether the PID is alive. - 1886: [macOS] EIO error may be raised on cmdline() and environment(). Now it gets translated into AccessDenied. - 1891: [macOS] get rid of deprecated getpagesize(). - Rebase patch and skip three other tests that fail on obs OBS-URL: https://build.opensuse.org/request/show/866659 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=129
2021-01-25 22:42:02 +00:00
# XXX: https://github.com/pypa/setuptools/pull/2896
@unittest.skipIf(APPVEYOR, "temporarily disabled due to setuptools bug")
Accepting request 866659 from home:alarrosa:branches:devel:languages:python - update to 5.8.0: * Enhancements: - 1863: disk_partitions() exposes 2 extra fields: maxfile and maxpath, which are the maximum file name and path name length. - 1872: [Windows] added support for PyPy 2.7. - 1879: provide pre-compiled wheels for Linux and macOS. - 1880: get rid of Travis and Cirrus CI services (they are no longer free). CI testing is now done by GitHub Actions on Linux, macOS and FreeBSD (yes). AppVeyor is still being used for Windows CI. * Bug fixes: - 1708: [Linux] get rid of sensors_temperatures() duplicates. (patch by Tim Schlueter). - 1839: [Windows] always raise AccessDenied when failing to query 64 processes from 32 bit ones (NtWoW64 APIs). - 1866: [Windows] process exe(), cmdline(), environ() may raise "invalid access to memory location" on Python 3.9. - 1874: [Solaris] wrong swap output given when encrypted column is present. - 1875: [Windows] process username() may raise ERROR_NONE_MAPPED if the SID has no corresponding account name. In this case AccessDenied is now raised. - 1877: [Windows] OpenProcess may fail with ERROR_SUCCESS. Turn it into AccessDenied or NoSuchProcess depending on whether the PID is alive. - 1886: [macOS] EIO error may be raised on cmdline() and environment(). Now it gets translated into AccessDenied. - 1891: [macOS] get rid of deprecated getpagesize(). - Rebase patch and skip three other tests that fail on obs OBS-URL: https://build.opensuse.org/request/show/866659 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=129
2021-01-25 22:42:02 +00:00
+ @unittest.skipIf(True, 'does not work on obs')
def test_setup_script(self):
setup_py = os.path.join(ROOT_DIR, 'setup.py')
if CI_TESTING and not os.path.exists(setup_py):
@@ -710,7 +711,7 @@ class TestScripts(PsutilTestCase):
- Add patch to skip more tests that won't work in OBS: * skip-obs.patch - Update to 5.6.3: * 1494: [AIX] added support for Process.environ(). (patch by Arnon Yaari) * 1276: [AIX] can't get whole cmdline(). (patch by Arnon Yaari) * 1501_: [Windows] Process cmdline() and exe() raise unhandled "WinError 1168 element not found" exceptions for "Registry" and "Memory Compression" psuedo processes on Windows 10. * 1526_: [NetBSD] process cmdline() could raise MemoryError. (patch by Kamil Rytarowski) - Update to 5.6.2: * 1404: [Linux] cpu_count(logical=False) uses a second method (read from /sys/devices/system/cpu/cpu[0-9]/topology/core_id) in order to determine the number of physical CPUs in case /proc/cpuinfo does not provide this info. * 1458: provide coloured test output. Also show failures on KeyboardInterrupt. * 1464: various docfixes (always point to python3 doc, fix links, etc.). * 1478: add make command to re-run tests failed on last run. * 1456: [Linux] cpu_freq() returns None instead of 0.0 when min/max not available (patch by Alex Manuskin) * 1462: [Linux] (tests) make tests invariant to LANG setting (patch by Benjamin Drung) * 1463: cpu_distribution.py script was broken. * 1470: [Linux] disk_partitions(): fix corner case when /etc/mtab doesn't exist. (patch by Cedric Lamoriniere) * 1472: [Linux] cpu_freq() does not return all CPUs on Rasbperry-pi 3. * 1493: [Linux] cpu_freq(): handle the case where /sys/devices/system/cpu/cpufreq/ exists but is empty. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=107
2019-09-10 13:20:31 +00:00
src = f.read()
ast.parse(src)
- def test_coverage(self):
+ def _test_coverage(self):
# make sure all example scripts have a test method defined
meths = dir(self)
for name in os.listdir(SCRIPTS_DIR):
@@ -729,7 +730,7 @@ class TestScripts(PsutilTestCase):
if not stat.S_IXUSR & os.stat(path)[stat.ST_MODE]:
raise self.fail('%r is not executable' % path)
- Add patch to skip more tests that won't work in OBS: * skip-obs.patch - Update to 5.6.3: * 1494: [AIX] added support for Process.environ(). (patch by Arnon Yaari) * 1276: [AIX] can't get whole cmdline(). (patch by Arnon Yaari) * 1501_: [Windows] Process cmdline() and exe() raise unhandled "WinError 1168 element not found" exceptions for "Registry" and "Memory Compression" psuedo processes on Windows 10. * 1526_: [NetBSD] process cmdline() could raise MemoryError. (patch by Kamil Rytarowski) - Update to 5.6.2: * 1404: [Linux] cpu_count(logical=False) uses a second method (read from /sys/devices/system/cpu/cpu[0-9]/topology/core_id) in order to determine the number of physical CPUs in case /proc/cpuinfo does not provide this info. * 1458: provide coloured test output. Also show failures on KeyboardInterrupt. * 1464: various docfixes (always point to python3 doc, fix links, etc.). * 1478: add make command to re-run tests failed on last run. * 1456: [Linux] cpu_freq() returns None instead of 0.0 when min/max not available (patch by Alex Manuskin) * 1462: [Linux] (tests) make tests invariant to LANG setting (patch by Benjamin Drung) * 1463: cpu_distribution.py script was broken. * 1470: [Linux] disk_partitions(): fix corner case when /etc/mtab doesn't exist. (patch by Cedric Lamoriniere) * 1472: [Linux] cpu_freq() does not return all CPUs on Rasbperry-pi 3. * 1493: [Linux] cpu_freq(): handle the case where /sys/devices/system/cpu/cpufreq/ exists but is empty. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=107
2019-09-10 13:20:31 +00:00
- def test_disk_usage(self):
+ def _test_disk_usage(self):
self.assert_stdout('disk_usage.py')
def test_free(self):
Index: psutil-5.9.0/psutil/tests/test_linux.py
- Add patch to skip more tests that won't work in OBS: * skip-obs.patch - Update to 5.6.3: * 1494: [AIX] added support for Process.environ(). (patch by Arnon Yaari) * 1276: [AIX] can't get whole cmdline(). (patch by Arnon Yaari) * 1501_: [Windows] Process cmdline() and exe() raise unhandled "WinError 1168 element not found" exceptions for "Registry" and "Memory Compression" psuedo processes on Windows 10. * 1526_: [NetBSD] process cmdline() could raise MemoryError. (patch by Kamil Rytarowski) - Update to 5.6.2: * 1404: [Linux] cpu_count(logical=False) uses a second method (read from /sys/devices/system/cpu/cpu[0-9]/topology/core_id) in order to determine the number of physical CPUs in case /proc/cpuinfo does not provide this info. * 1458: provide coloured test output. Also show failures on KeyboardInterrupt. * 1464: various docfixes (always point to python3 doc, fix links, etc.). * 1478: add make command to re-run tests failed on last run. * 1456: [Linux] cpu_freq() returns None instead of 0.0 when min/max not available (patch by Alex Manuskin) * 1462: [Linux] (tests) make tests invariant to LANG setting (patch by Benjamin Drung) * 1463: cpu_distribution.py script was broken. * 1470: [Linux] disk_partitions(): fix corner case when /etc/mtab doesn't exist. (patch by Cedric Lamoriniere) * 1472: [Linux] cpu_freq() does not return all CPUs on Rasbperry-pi 3. * 1493: [Linux] cpu_freq(): handle the case where /sys/devices/system/cpu/cpufreq/ exists but is empty. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=107
2019-09-10 13:20:31 +00:00
===================================================================
--- psutil-5.9.0.orig/psutil/tests/test_linux.py
+++ psutil-5.9.0/psutil/tests/test_linux.py
@@ -683,7 +683,7 @@ class TestSystemCPUCountLogical(PsutilTe
- Add patch to skip more tests that won't work in OBS: * skip-obs.patch - Update to 5.6.3: * 1494: [AIX] added support for Process.environ(). (patch by Arnon Yaari) * 1276: [AIX] can't get whole cmdline(). (patch by Arnon Yaari) * 1501_: [Windows] Process cmdline() and exe() raise unhandled "WinError 1168 element not found" exceptions for "Registry" and "Memory Compression" psuedo processes on Windows 10. * 1526_: [NetBSD] process cmdline() could raise MemoryError. (patch by Kamil Rytarowski) - Update to 5.6.2: * 1404: [Linux] cpu_count(logical=False) uses a second method (read from /sys/devices/system/cpu/cpu[0-9]/topology/core_id) in order to determine the number of physical CPUs in case /proc/cpuinfo does not provide this info. * 1458: provide coloured test output. Also show failures on KeyboardInterrupt. * 1464: various docfixes (always point to python3 doc, fix links, etc.). * 1478: add make command to re-run tests failed on last run. * 1456: [Linux] cpu_freq() returns None instead of 0.0 when min/max not available (patch by Alex Manuskin) * 1462: [Linux] (tests) make tests invariant to LANG setting (patch by Benjamin Drung) * 1463: cpu_distribution.py script was broken. * 1470: [Linux] disk_partitions(): fix corner case when /etc/mtab doesn't exist. (patch by Cedric Lamoriniere) * 1472: [Linux] cpu_freq() does not return all CPUs on Rasbperry-pi 3. * 1493: [Linux] cpu_freq(): handle the case where /sys/devices/system/cpu/cpufreq/ exists but is empty. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=107
2019-09-10 13:20:31 +00:00
self.assertEqual(psutil.cpu_count(logical=True), num)
@unittest.skipIf(not which("lscpu"), "lscpu utility not available")
- def test_against_lscpu(self):
+ def _test_against_lscpu(self):
out = sh("lscpu -p")
num = len([x for x in out.split('\n') if not x.startswith('#')])
self.assertEqual(psutil.cpu_count(logical=True), num)
@@ -726,7 +726,7 @@ class TestSystemCPUCountLogical(PsutilTe
class TestSystemCPUCountCores(PsutilTestCase):
- Add patch to skip more tests that won't work in OBS: * skip-obs.patch - Update to 5.6.3: * 1494: [AIX] added support for Process.environ(). (patch by Arnon Yaari) * 1276: [AIX] can't get whole cmdline(). (patch by Arnon Yaari) * 1501_: [Windows] Process cmdline() and exe() raise unhandled "WinError 1168 element not found" exceptions for "Registry" and "Memory Compression" psuedo processes on Windows 10. * 1526_: [NetBSD] process cmdline() could raise MemoryError. (patch by Kamil Rytarowski) - Update to 5.6.2: * 1404: [Linux] cpu_count(logical=False) uses a second method (read from /sys/devices/system/cpu/cpu[0-9]/topology/core_id) in order to determine the number of physical CPUs in case /proc/cpuinfo does not provide this info. * 1458: provide coloured test output. Also show failures on KeyboardInterrupt. * 1464: various docfixes (always point to python3 doc, fix links, etc.). * 1478: add make command to re-run tests failed on last run. * 1456: [Linux] cpu_freq() returns None instead of 0.0 when min/max not available (patch by Alex Manuskin) * 1462: [Linux] (tests) make tests invariant to LANG setting (patch by Benjamin Drung) * 1463: cpu_distribution.py script was broken. * 1470: [Linux] disk_partitions(): fix corner case when /etc/mtab doesn't exist. (patch by Cedric Lamoriniere) * 1472: [Linux] cpu_freq() does not return all CPUs on Rasbperry-pi 3. * 1493: [Linux] cpu_freq(): handle the case where /sys/devices/system/cpu/cpufreq/ exists but is empty. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=107
2019-09-10 13:20:31 +00:00
@unittest.skipIf(not which("lscpu"), "lscpu utility not available")
- def test_against_lscpu(self):
+ def _test_against_lscpu(self):
out = sh("lscpu -p")
core_ids = set()
for line in out.split('\n'):
@@ -1072,7 +1072,7 @@ class TestSystemDiskPartitions(PsutilTes
- Add patch to skip more tests that won't work in OBS: * skip-obs.patch - Update to 5.6.3: * 1494: [AIX] added support for Process.environ(). (patch by Arnon Yaari) * 1276: [AIX] can't get whole cmdline(). (patch by Arnon Yaari) * 1501_: [Windows] Process cmdline() and exe() raise unhandled "WinError 1168 element not found" exceptions for "Registry" and "Memory Compression" psuedo processes on Windows 10. * 1526_: [NetBSD] process cmdline() could raise MemoryError. (patch by Kamil Rytarowski) - Update to 5.6.2: * 1404: [Linux] cpu_count(logical=False) uses a second method (read from /sys/devices/system/cpu/cpu[0-9]/topology/core_id) in order to determine the number of physical CPUs in case /proc/cpuinfo does not provide this info. * 1458: provide coloured test output. Also show failures on KeyboardInterrupt. * 1464: various docfixes (always point to python3 doc, fix links, etc.). * 1478: add make command to re-run tests failed on last run. * 1456: [Linux] cpu_freq() returns None instead of 0.0 when min/max not available (patch by Alex Manuskin) * 1462: [Linux] (tests) make tests invariant to LANG setting (patch by Benjamin Drung) * 1463: cpu_distribution.py script was broken. * 1470: [Linux] disk_partitions(): fix corner case when /etc/mtab doesn't exist. (patch by Cedric Lamoriniere) * 1472: [Linux] cpu_freq() does not return all CPUs on Rasbperry-pi 3. * 1493: [Linux] cpu_freq(): handle the case where /sys/devices/system/cpu/cpufreq/ exists but is empty. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=107
2019-09-10 13:20:31 +00:00
@unittest.skipIf(not hasattr(os, 'statvfs'), "os.statvfs() not available")
@skip_on_not_implemented()
- def test_against_df(self):
+ def _test_against_df(self):
# test psutil.disk_usage() and psutil.disk_partitions()
# against "df -a"
def df(path):
@@ -1246,7 +1246,7 @@ class TestSystemDiskIoCounters(PsutilTes
- Add patch to skip more tests that won't work in OBS: * skip-obs.patch - Update to 5.6.3: * 1494: [AIX] added support for Process.environ(). (patch by Arnon Yaari) * 1276: [AIX] can't get whole cmdline(). (patch by Arnon Yaari) * 1501_: [Windows] Process cmdline() and exe() raise unhandled "WinError 1168 element not found" exceptions for "Registry" and "Memory Compression" psuedo processes on Windows 10. * 1526_: [NetBSD] process cmdline() could raise MemoryError. (patch by Kamil Rytarowski) - Update to 5.6.2: * 1404: [Linux] cpu_count(logical=False) uses a second method (read from /sys/devices/system/cpu/cpu[0-9]/topology/core_id) in order to determine the number of physical CPUs in case /proc/cpuinfo does not provide this info. * 1458: provide coloured test output. Also show failures on KeyboardInterrupt. * 1464: various docfixes (always point to python3 doc, fix links, etc.). * 1478: add make command to re-run tests failed on last run. * 1456: [Linux] cpu_freq() returns None instead of 0.0 when min/max not available (patch by Alex Manuskin) * 1462: [Linux] (tests) make tests invariant to LANG setting (patch by Benjamin Drung) * 1463: cpu_distribution.py script was broken. * 1470: [Linux] disk_partitions(): fix corner case when /etc/mtab doesn't exist. (patch by Cedric Lamoriniere) * 1472: [Linux] cpu_freq() does not return all CPUs on Rasbperry-pi 3. * 1493: [Linux] cpu_freq(): handle the case where /sys/devices/system/cpu/cpufreq/ exists but is empty. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=107
2019-09-10 13:20:31 +00:00
self.assertEqual(ret.read_count, 1)
self.assertEqual(ret.write_count, 5)
- def test_emulate_use_sysfs(self):
+ def _test_emulate_use_sysfs(self):
def exists(path):
if path == '/proc/diskstats':
return False
Index: psutil-5.9.0/psutil/tests/test_posix.py
- Add patch to skip more tests that won't work in OBS: * skip-obs.patch - Update to 5.6.3: * 1494: [AIX] added support for Process.environ(). (patch by Arnon Yaari) * 1276: [AIX] can't get whole cmdline(). (patch by Arnon Yaari) * 1501_: [Windows] Process cmdline() and exe() raise unhandled "WinError 1168 element not found" exceptions for "Registry" and "Memory Compression" psuedo processes on Windows 10. * 1526_: [NetBSD] process cmdline() could raise MemoryError. (patch by Kamil Rytarowski) - Update to 5.6.2: * 1404: [Linux] cpu_count(logical=False) uses a second method (read from /sys/devices/system/cpu/cpu[0-9]/topology/core_id) in order to determine the number of physical CPUs in case /proc/cpuinfo does not provide this info. * 1458: provide coloured test output. Also show failures on KeyboardInterrupt. * 1464: various docfixes (always point to python3 doc, fix links, etc.). * 1478: add make command to re-run tests failed on last run. * 1456: [Linux] cpu_freq() returns None instead of 0.0 when min/max not available (patch by Alex Manuskin) * 1462: [Linux] (tests) make tests invariant to LANG setting (patch by Benjamin Drung) * 1463: cpu_distribution.py script was broken. * 1470: [Linux] disk_partitions(): fix corner case when /etc/mtab doesn't exist. (patch by Cedric Lamoriniere) * 1472: [Linux] cpu_freq() does not return all CPUs on Rasbperry-pi 3. * 1493: [Linux] cpu_freq(): handle the case where /sys/devices/system/cpu/cpufreq/ exists but is empty. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=107
2019-09-10 13:20:31 +00:00
===================================================================
--- psutil-5.9.0.orig/psutil/tests/test_posix.py
+++ psutil-5.9.0/psutil/tests/test_posix.py
@@ -377,7 +377,7 @@ class TestSystemAPIs(PsutilTestCase):
- Add patch to skip more tests that won't work in OBS: * skip-obs.patch - Update to 5.6.3: * 1494: [AIX] added support for Process.environ(). (patch by Arnon Yaari) * 1276: [AIX] can't get whole cmdline(). (patch by Arnon Yaari) * 1501_: [Windows] Process cmdline() and exe() raise unhandled "WinError 1168 element not found" exceptions for "Registry" and "Memory Compression" psuedo processes on Windows 10. * 1526_: [NetBSD] process cmdline() could raise MemoryError. (patch by Kamil Rytarowski) - Update to 5.6.2: * 1404: [Linux] cpu_count(logical=False) uses a second method (read from /sys/devices/system/cpu/cpu[0-9]/topology/core_id) in order to determine the number of physical CPUs in case /proc/cpuinfo does not provide this info. * 1458: provide coloured test output. Also show failures on KeyboardInterrupt. * 1464: various docfixes (always point to python3 doc, fix links, etc.). * 1478: add make command to re-run tests failed on last run. * 1456: [Linux] cpu_freq() returns None instead of 0.0 when min/max not available (patch by Alex Manuskin) * 1462: [Linux] (tests) make tests invariant to LANG setting (patch by Benjamin Drung) * 1463: cpu_distribution.py script was broken. * 1470: [Linux] disk_partitions(): fix corner case when /etc/mtab doesn't exist. (patch by Cedric Lamoriniere) * 1472: [Linux] cpu_freq() does not return all CPUs on Rasbperry-pi 3. * 1493: [Linux] cpu_freq(): handle the case where /sys/devices/system/cpu/cpufreq/ exists but is empty. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=107
2019-09-10 13:20:31 +00:00
# AIX can return '-' in df output instead of numbers, e.g. for /proc
@unittest.skipIf(AIX, "unreliable on AIX")
Accepting request 866659 from home:alarrosa:branches:devel:languages:python - update to 5.8.0: * Enhancements: - 1863: disk_partitions() exposes 2 extra fields: maxfile and maxpath, which are the maximum file name and path name length. - 1872: [Windows] added support for PyPy 2.7. - 1879: provide pre-compiled wheels for Linux and macOS. - 1880: get rid of Travis and Cirrus CI services (they are no longer free). CI testing is now done by GitHub Actions on Linux, macOS and FreeBSD (yes). AppVeyor is still being used for Windows CI. * Bug fixes: - 1708: [Linux] get rid of sensors_temperatures() duplicates. (patch by Tim Schlueter). - 1839: [Windows] always raise AccessDenied when failing to query 64 processes from 32 bit ones (NtWoW64 APIs). - 1866: [Windows] process exe(), cmdline(), environ() may raise "invalid access to memory location" on Python 3.9. - 1874: [Solaris] wrong swap output given when encrypted column is present. - 1875: [Windows] process username() may raise ERROR_NONE_MAPPED if the SID has no corresponding account name. In this case AccessDenied is now raised. - 1877: [Windows] OpenProcess may fail with ERROR_SUCCESS. Turn it into AccessDenied or NoSuchProcess depending on whether the PID is alive. - 1886: [macOS] EIO error may be raised on cmdline() and environment(). Now it gets translated into AccessDenied. - 1891: [macOS] get rid of deprecated getpagesize(). - Rebase patch and skip three other tests that fail on obs OBS-URL: https://build.opensuse.org/request/show/866659 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=129
2021-01-25 22:42:02 +00:00
@retry_on_failure()
- Add patch to skip more tests that won't work in OBS: * skip-obs.patch - Update to 5.6.3: * 1494: [AIX] added support for Process.environ(). (patch by Arnon Yaari) * 1276: [AIX] can't get whole cmdline(). (patch by Arnon Yaari) * 1501_: [Windows] Process cmdline() and exe() raise unhandled "WinError 1168 element not found" exceptions for "Registry" and "Memory Compression" psuedo processes on Windows 10. * 1526_: [NetBSD] process cmdline() could raise MemoryError. (patch by Kamil Rytarowski) - Update to 5.6.2: * 1404: [Linux] cpu_count(logical=False) uses a second method (read from /sys/devices/system/cpu/cpu[0-9]/topology/core_id) in order to determine the number of physical CPUs in case /proc/cpuinfo does not provide this info. * 1458: provide coloured test output. Also show failures on KeyboardInterrupt. * 1464: various docfixes (always point to python3 doc, fix links, etc.). * 1478: add make command to re-run tests failed on last run. * 1456: [Linux] cpu_freq() returns None instead of 0.0 when min/max not available (patch by Alex Manuskin) * 1462: [Linux] (tests) make tests invariant to LANG setting (patch by Benjamin Drung) * 1463: cpu_distribution.py script was broken. * 1470: [Linux] disk_partitions(): fix corner case when /etc/mtab doesn't exist. (patch by Cedric Lamoriniere) * 1472: [Linux] cpu_freq() does not return all CPUs on Rasbperry-pi 3. * 1493: [Linux] cpu_freq(): handle the case where /sys/devices/system/cpu/cpufreq/ exists but is empty. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=107
2019-09-10 13:20:31 +00:00
- def test_disk_usage(self):
+ def _test_disk_usage(self):
def df(device):
out = sh("df -k %s" % device).strip()
line = out.split('\n')[1]
Index: psutil-5.9.0/psutil/tests/test_system.py
- Add patch to skip more tests that won't work in OBS: * skip-obs.patch - Update to 5.6.3: * 1494: [AIX] added support for Process.environ(). (patch by Arnon Yaari) * 1276: [AIX] can't get whole cmdline(). (patch by Arnon Yaari) * 1501_: [Windows] Process cmdline() and exe() raise unhandled "WinError 1168 element not found" exceptions for "Registry" and "Memory Compression" psuedo processes on Windows 10. * 1526_: [NetBSD] process cmdline() could raise MemoryError. (patch by Kamil Rytarowski) - Update to 5.6.2: * 1404: [Linux] cpu_count(logical=False) uses a second method (read from /sys/devices/system/cpu/cpu[0-9]/topology/core_id) in order to determine the number of physical CPUs in case /proc/cpuinfo does not provide this info. * 1458: provide coloured test output. Also show failures on KeyboardInterrupt. * 1464: various docfixes (always point to python3 doc, fix links, etc.). * 1478: add make command to re-run tests failed on last run. * 1456: [Linux] cpu_freq() returns None instead of 0.0 when min/max not available (patch by Alex Manuskin) * 1462: [Linux] (tests) make tests invariant to LANG setting (patch by Benjamin Drung) * 1463: cpu_distribution.py script was broken. * 1470: [Linux] disk_partitions(): fix corner case when /etc/mtab doesn't exist. (patch by Cedric Lamoriniere) * 1472: [Linux] cpu_freq() does not return all CPUs on Rasbperry-pi 3. * 1493: [Linux] cpu_freq(): handle the case where /sys/devices/system/cpu/cpufreq/ exists but is empty. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=107
2019-09-10 13:20:31 +00:00
===================================================================
--- psutil-5.9.0.orig/psutil/tests/test_system.py
+++ psutil-5.9.0/psutil/tests/test_system.py
Accepting request 866659 from home:alarrosa:branches:devel:languages:python - update to 5.8.0: * Enhancements: - 1863: disk_partitions() exposes 2 extra fields: maxfile and maxpath, which are the maximum file name and path name length. - 1872: [Windows] added support for PyPy 2.7. - 1879: provide pre-compiled wheels for Linux and macOS. - 1880: get rid of Travis and Cirrus CI services (they are no longer free). CI testing is now done by GitHub Actions on Linux, macOS and FreeBSD (yes). AppVeyor is still being used for Windows CI. * Bug fixes: - 1708: [Linux] get rid of sensors_temperatures() duplicates. (patch by Tim Schlueter). - 1839: [Windows] always raise AccessDenied when failing to query 64 processes from 32 bit ones (NtWoW64 APIs). - 1866: [Windows] process exe(), cmdline(), environ() may raise "invalid access to memory location" on Python 3.9. - 1874: [Solaris] wrong swap output given when encrypted column is present. - 1875: [Windows] process username() may raise ERROR_NONE_MAPPED if the SID has no corresponding account name. In this case AccessDenied is now raised. - 1877: [Windows] OpenProcess may fail with ERROR_SUCCESS. Turn it into AccessDenied or NoSuchProcess depending on whether the PID is alive. - 1886: [macOS] EIO error may be raised on cmdline() and environment(). Now it gets translated into AccessDenied. - 1891: [macOS] get rid of deprecated getpagesize(). - Rebase patch and skip three other tests that fail on obs OBS-URL: https://build.opensuse.org/request/show/866659 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=129
2021-01-25 22:42:02 +00:00
@@ -200,6 +200,7 @@ class TestMiscAPIs(PsutilTestCase):
self.assertLess(bt, time.time())
@unittest.skipIf(CI_TESTING and not psutil.users(), "unreliable on CI")
+ @unittest.skipIf(True, "does not work on obs")
def test_users(self):
users = psutil.users()
self.assertNotEqual(users, [])
@@ -580,7 +581,7 @@ class TestDiskAPIs(PsutilTestCase):
- Add patch to skip more tests that won't work in OBS: * skip-obs.patch - Update to 5.6.3: * 1494: [AIX] added support for Process.environ(). (patch by Arnon Yaari) * 1276: [AIX] can't get whole cmdline(). (patch by Arnon Yaari) * 1501_: [Windows] Process cmdline() and exe() raise unhandled "WinError 1168 element not found" exceptions for "Registry" and "Memory Compression" psuedo processes on Windows 10. * 1526_: [NetBSD] process cmdline() could raise MemoryError. (patch by Kamil Rytarowski) - Update to 5.6.2: * 1404: [Linux] cpu_count(logical=False) uses a second method (read from /sys/devices/system/cpu/cpu[0-9]/topology/core_id) in order to determine the number of physical CPUs in case /proc/cpuinfo does not provide this info. * 1458: provide coloured test output. Also show failures on KeyboardInterrupt. * 1464: various docfixes (always point to python3 doc, fix links, etc.). * 1478: add make command to re-run tests failed on last run. * 1456: [Linux] cpu_freq() returns None instead of 0.0 when min/max not available (patch by Alex Manuskin) * 1462: [Linux] (tests) make tests invariant to LANG setting (patch by Benjamin Drung) * 1463: cpu_distribution.py script was broken. * 1470: [Linux] disk_partitions(): fix corner case when /etc/mtab doesn't exist. (patch by Cedric Lamoriniere) * 1472: [Linux] cpu_freq() does not return all CPUs on Rasbperry-pi 3. * 1493: [Linux] cpu_freq(): handle the case where /sys/devices/system/cpu/cpufreq/ exists but is empty. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=107
2019-09-10 13:20:31 +00:00
def test_disk_usage_bytes(self):
psutil.disk_usage(b'.')
- def test_disk_partitions(self):
+ def _test_disk_partitions(self):
Accepting request 866659 from home:alarrosa:branches:devel:languages:python - update to 5.8.0: * Enhancements: - 1863: disk_partitions() exposes 2 extra fields: maxfile and maxpath, which are the maximum file name and path name length. - 1872: [Windows] added support for PyPy 2.7. - 1879: provide pre-compiled wheels for Linux and macOS. - 1880: get rid of Travis and Cirrus CI services (they are no longer free). CI testing is now done by GitHub Actions on Linux, macOS and FreeBSD (yes). AppVeyor is still being used for Windows CI. * Bug fixes: - 1708: [Linux] get rid of sensors_temperatures() duplicates. (patch by Tim Schlueter). - 1839: [Windows] always raise AccessDenied when failing to query 64 processes from 32 bit ones (NtWoW64 APIs). - 1866: [Windows] process exe(), cmdline(), environ() may raise "invalid access to memory location" on Python 3.9. - 1874: [Solaris] wrong swap output given when encrypted column is present. - 1875: [Windows] process username() may raise ERROR_NONE_MAPPED if the SID has no corresponding account name. In this case AccessDenied is now raised. - 1877: [Windows] OpenProcess may fail with ERROR_SUCCESS. Turn it into AccessDenied or NoSuchProcess depending on whether the PID is alive. - 1886: [macOS] EIO error may be raised on cmdline() and environment(). Now it gets translated into AccessDenied. - 1891: [macOS] get rid of deprecated getpagesize(). - Rebase patch and skip three other tests that fail on obs OBS-URL: https://build.opensuse.org/request/show/866659 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=129
2021-01-25 22:42:02 +00:00
def check_ntuple(nt):
self.assertIsInstance(nt.device, str)
self.assertIsInstance(nt.mountpoint, str)
Index: psutil-5.9.0/psutil/tests/test_contracts.py
Accepting request 866659 from home:alarrosa:branches:devel:languages:python - update to 5.8.0: * Enhancements: - 1863: disk_partitions() exposes 2 extra fields: maxfile and maxpath, which are the maximum file name and path name length. - 1872: [Windows] added support for PyPy 2.7. - 1879: provide pre-compiled wheels for Linux and macOS. - 1880: get rid of Travis and Cirrus CI services (they are no longer free). CI testing is now done by GitHub Actions on Linux, macOS and FreeBSD (yes). AppVeyor is still being used for Windows CI. * Bug fixes: - 1708: [Linux] get rid of sensors_temperatures() duplicates. (patch by Tim Schlueter). - 1839: [Windows] always raise AccessDenied when failing to query 64 processes from 32 bit ones (NtWoW64 APIs). - 1866: [Windows] process exe(), cmdline(), environ() may raise "invalid access to memory location" on Python 3.9. - 1874: [Solaris] wrong swap output given when encrypted column is present. - 1875: [Windows] process username() may raise ERROR_NONE_MAPPED if the SID has no corresponding account name. In this case AccessDenied is now raised. - 1877: [Windows] OpenProcess may fail with ERROR_SUCCESS. Turn it into AccessDenied or NoSuchProcess depending on whether the PID is alive. - 1886: [macOS] EIO error may be raised on cmdline() and environment(). Now it gets translated into AccessDenied. - 1891: [macOS] get rid of deprecated getpagesize(). - Rebase patch and skip three other tests that fail on obs OBS-URL: https://build.opensuse.org/request/show/866659 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=129
2021-01-25 22:42:02 +00:00
===================================================================
--- psutil-5.9.0.orig/psutil/tests/test_contracts.py
+++ psutil-5.9.0/psutil/tests/test_contracts.py
Accepting request 866659 from home:alarrosa:branches:devel:languages:python - update to 5.8.0: * Enhancements: - 1863: disk_partitions() exposes 2 extra fields: maxfile and maxpath, which are the maximum file name and path name length. - 1872: [Windows] added support for PyPy 2.7. - 1879: provide pre-compiled wheels for Linux and macOS. - 1880: get rid of Travis and Cirrus CI services (they are no longer free). CI testing is now done by GitHub Actions on Linux, macOS and FreeBSD (yes). AppVeyor is still being used for Windows CI. * Bug fixes: - 1708: [Linux] get rid of sensors_temperatures() duplicates. (patch by Tim Schlueter). - 1839: [Windows] always raise AccessDenied when failing to query 64 processes from 32 bit ones (NtWoW64 APIs). - 1866: [Windows] process exe(), cmdline(), environ() may raise "invalid access to memory location" on Python 3.9. - 1874: [Solaris] wrong swap output given when encrypted column is present. - 1875: [Windows] process username() may raise ERROR_NONE_MAPPED if the SID has no corresponding account name. In this case AccessDenied is now raised. - 1877: [Windows] OpenProcess may fail with ERROR_SUCCESS. Turn it into AccessDenied or NoSuchProcess depending on whether the PID is alive. - 1886: [macOS] EIO error may be raised on cmdline() and environment(). Now it gets translated into AccessDenied. - 1891: [macOS] get rid of deprecated getpagesize(). - Rebase patch and skip three other tests that fail on obs OBS-URL: https://build.opensuse.org/request/show/866659 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-psutil?expand=0&rev=129
2021-01-25 22:42:02 +00:00
@@ -246,6 +246,7 @@ class TestSystemAPITypes(PsutilTestCase)
self.assertIsInstance(k, str)
self.assert_ntuple_of_nums(v, type_=(int, long))
+ @unittest.skipIf(True, "does not work on obs")
def test_disk_partitions(self):
# Duplicate of test_system.py. Keep it anyway.
for disk in psutil.disk_partitions():
Index: psutil-5.9.0/psutil/tests/test_process.py
===================================================================
--- psutil-5.9.0.orig/psutil/tests/test_process.py
+++ psutil-5.9.0/psutil/tests/test_process.py
@@ -343,6 +343,7 @@ class TestProcess(PsutilTestCase):
@unittest.skipIf(not HAS_IONICE, "not supported")
@unittest.skipIf(not LINUX, "linux only")
+ @unittest.skipIf(True, "does not work reliably on obs")
def test_ionice_linux(self):
p = psutil.Process()
if not CI_TESTING: