Open DerDakon opened 4 years ago
Similar on hppa:
======================================================================
ERROR: psutil.tests.test_linux.TestSensorsBattery.test_emulate_energy_full_0
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/tests/test_linux.py", line 1523, in test_emulate_energy_full_0
self.assertEqual(psutil.sensors_battery().percent, 0)
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/__init__.py", line 2397, in sensors_battery
return _psplatform.sensors_battery()
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/_pslinux.py", line 1345, in sensors_battery
bats = [x for x in os.listdir(POWER_SUPPLY_PATH) if x.startswith('BAT')]
OSError: [Errno 2] No such file or directory: '/sys/class/power_supply'
======================================================================
ERROR: psutil.tests.test_linux.TestSensorsBattery.test_emulate_energy_full_not_avail
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/tests/test_linux.py", line 1537, in test_emulate_energy_full_not_avail
self.assertEqual(psutil.sensors_battery().percent, 88)
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/__init__.py", line 2397, in sensors_battery
return _psplatform.sensors_battery()
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/_pslinux.py", line 1345, in sensors_battery
bats = [x for x in os.listdir(POWER_SUPPLY_PATH) if x.startswith('BAT')]
OSError: [Errno 2] No such file or directory: '/sys/class/power_supply'
======================================================================
ERROR: psutil.tests.test_linux.TestSensorsBattery.test_emulate_no_base_files
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/tests/test_linux.py", line 1517, in test_emulate_no_base_files
self.assertIsNone(psutil.sensors_battery())
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/__init__.py", line 2397, in sensors_battery
return _psplatform.sensors_battery()
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/_pslinux.py", line 1345, in sensors_battery
bats = [x for x in os.listdir(POWER_SUPPLY_PATH) if x.startswith('BAT')]
OSError: [Errno 2] No such file or directory: '/sys/class/power_supply'
======================================================================
ERROR: psutil.tests.test_linux.TestSensorsBattery.test_emulate_no_power
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/tests/test_linux.py", line 1550, in test_emulate_no_power
self.assertIsNone(psutil.sensors_battery().power_plugged)
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/__init__.py", line 2397, in sensors_battery
return _psplatform.sensors_battery()
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/_pslinux.py", line 1345, in sensors_battery
bats = [x for x in os.listdir(POWER_SUPPLY_PATH) if x.startswith('BAT')]
OSError: [Errno 2] No such file or directory: '/sys/class/power_supply'
======================================================================
ERROR: psutil.tests.test_linux.TestSensorsBattery.test_emulate_power_not_plugged
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/tests/test_linux.py", line 1470, in test_emulate_power_not_plugged
self.assertEqual(psutil.sensors_battery().power_plugged, False)
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/__init__.py", line 2397, in sensors_battery
return _psplatform.sensors_battery()
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/_pslinux.py", line 1345, in sensors_battery
bats = [x for x in os.listdir(POWER_SUPPLY_PATH) if x.startswith('BAT')]
OSError: [Errno 2] No such file or directory: '/sys/class/power_supply'
======================================================================
ERROR: psutil.tests.test_linux.TestSensorsBattery.test_emulate_power_not_plugged_2
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/tests/test_linux.py", line 1487, in test_emulate_power_not_plugged_2
self.assertEqual(psutil.sensors_battery().power_plugged, False)
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/__init__.py", line 2397, in sensors_battery
return _psplatform.sensors_battery()
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/_pslinux.py", line 1345, in sensors_battery
bats = [x for x in os.listdir(POWER_SUPPLY_PATH) if x.startswith('BAT')]
OSError: [Errno 2] No such file or directory: '/sys/class/power_supply'
======================================================================
ERROR: psutil.tests.test_linux.TestSensorsBattery.test_emulate_power_plugged
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/tests/test_linux.py", line 1437, in test_emulate_power_plugged
self.assertEqual(psutil.sensors_battery().power_plugged, True)
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/__init__.py", line 2397, in sensors_battery
return _psplatform.sensors_battery()
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/_pslinux.py", line 1345, in sensors_battery
bats = [x for x in os.listdir(POWER_SUPPLY_PATH) if x.startswith('BAT')]
OSError: [Errno 2] No such file or directory: '/sys/class/power_supply'
======================================================================
ERROR: psutil.tests.test_linux.TestSensorsBattery.test_emulate_power_plugged_2
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/tests/test_linux.py", line 1456, in test_emulate_power_plugged_2
self.assertEqual(psutil.sensors_battery().power_plugged, True)
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/__init__.py", line 2397, in sensors_battery
return _psplatform.sensors_battery()
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/_pslinux.py", line 1345, in sensors_battery
bats = [x for x in os.listdir(POWER_SUPPLY_PATH) if x.startswith('BAT')]
OSError: [Errno 2] No such file or directory: '/sys/class/power_supply'
======================================================================
ERROR: psutil.tests.test_linux.TestSensorsBattery.test_emulate_power_undetermined
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/tests/test_linux.py", line 1505, in test_emulate_power_undetermined
self.assertIsNone(psutil.sensors_battery().power_plugged)
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/__init__.py", line 2397, in sensors_battery
return _psplatform.sensors_battery()
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/_pslinux.py", line 1345, in sensors_battery
bats = [x for x in os.listdir(POWER_SUPPLY_PATH) if x.startswith('BAT')]
OSError: [Errno 2] No such file or directory: '/sys/class/power_supply'
======================================================================
ERROR: psutil.tests.test_system.TestSystemAPIs.test_sensors_battery
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/tests/test_system.py", line 854, in test_sensors_battery
ret = psutil.sensors_battery()
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/__init__.py", line 2397, in sensors_battery
return _psplatform.sensors_battery()
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/_pslinux.py", line 1345, in sensors_battery
bats = [x for x in os.listdir(POWER_SUPPLY_PATH) if x.startswith('BAT')]
OSError: [Errno 2] No such file or directory: '/sys/class/power_supply'
======================================================================
FAIL: psutil.tests.test_contracts.TestAvailability.test_cpu_freq
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/tests/test_contracts.py", line 114, in test_cpu_freq
linux or MACOS or WINDOWS or FREEBSD)
AssertionError: True != False
======================================================================
FAIL: psutil.tests.test_contracts.TestAvailability.test_proc_io_counters
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/tests/test_contracts.py", line 148, in test_proc_io_counters
self.assertEqual(hasit, False if MACOS or SUNOS else True)
AssertionError: False != True
======================================================================
FAIL: psutil.tests.test_linux.TestSystemCPUCountPhysical.test_against_lscpu
----------------------------------------------------------------------
Traceback (most recent call last):
File "/var/tmp/portage/dev-python/psutil-5.6.7/work/psutil-5.6.7-python2_7/lib/psutil/tests/test_linux.py", line 693, in test_against_lscpu
self.assertEqual(psutil.cpu_count(logical=False), len(core_ids))
AssertionError: 2 != 4
----------------------------------------------------------------------
Ran 542 tests in 30.776s
FAILED (failures=3, errors=10, skipped=198)
Seems that some things are even wrong on AMD64: https://bugs.gentoo.org/703154
The last failure on hppa is reported with additional detail in #1645, the last sparc issue in #1644.
Actually, I have this even on the regular x86_64 (openSUSE/Tumbleweed, psutil 5.7.0), when building python-psutil package for the distribution:
[ 7s] ======================================================================
[ 7s] FAIL: psutil.tests.test_linux.TestSensorsBattery.test_emulate_energy_full_0
[ 7s] ----------------------------------------------------------------------
[ 7s] Traceback (most recent call last):
[ 7s] File "/home/abuild/rpmbuild/BUILDROOT/python-psutil-5.7.0-0.x86_64/usr/lib64/python3.8/site-packages/psutil/tests/test_linux.py", line 1518, in test_emulate_energy_full_0
[ 7s] self.assertEqual(psutil.sensors_battery().percent, 0)
[ 7s] AssertionError: 95.84429247764335 != 0
[ 7s]
[ 7s] ======================================================================
[ 7s] FAIL: psutil.tests.test_linux.TestSensorsBattery.test_emulate_energy_full_not_avail
[ 7s] ----------------------------------------------------------------------
[ 7s] Traceback (most recent call last):
[ 7s] File "/home/abuild/rpmbuild/BUILDROOT/python-psutil-5.7.0-0.x86_64/usr/lib64/python3.8/site-packages/psutil/tests/test_linux.py", line 1532, in test_emulate_energy_full_not_avail
[ 7s] self.assertEqual(psutil.sensors_battery().percent, 88)
[ 7s] AssertionError: 95.84429247764335 != 88
[ 7s]
[ 7s] ======================================================================
[ 7s] FAIL: psutil.tests.test_linux.TestSensorsBattery.test_emulate_no_base_files
[ 7s] ----------------------------------------------------------------------
[ 7s] Traceback (most recent call last):
[ 7s] File "/home/abuild/rpmbuild/BUILDROOT/python-psutil-5.7.0-0.x86_64/usr/lib64/python3.8/site-packages/psutil/tests/test_linux.py", line 1512, in test_emulate_no_base_files
[ 7s] self.assertIsNone(psutil.sensors_battery())
[ 7s] AssertionError: sbattery(percent=95.84429247764335, secsleft=<BatteryTime.POWER_TIME_UNLIMITED: -2>, power_plugged=True) is not None
[ 7s]
[ 7s] ----------------------------------------------------------------------
[ 7s] Ran 535 tests in 3.623s
[ 7s]
[ 7s] FAILED (failures=3, skipped=180)
This could be actually caused by me running the test suite inside of the build environment, which doesn’t have to have complete copy of /sys
.
(BTW, would it be possible to make the test suite compatible with plain pytest
or python3 -munittest discover
? It would be easier to skip failing tests)
(BTW, would it be possible to make the test suite compatible with plain pytest or python3 -munittest discover? It would be easier to skip failing tests)
I just switched to pytest: https://github.com/giampaolo/psutil/issues/2446.
Platform
Bug description Several test failures, as below. Downstream issue: https://bugs.gentoo.org/701918
Test results