Repository navigation
Closed
Labels
Description
Describe the bug
while trying to confirm the fix #1412 for the test-suite failure on s370x, a new failure popped up on this BigEndian architecture:
============================================================================== FAILURES ===============================================================================
______________________________________________________________________ test_get_channel_configs _______________________________________________________________________
def test_get_channel_configs() -> None:
_original_func = canlib._get_xl_driver_config
canlib._get_xl_driver_config = _get_predefined_xl_driver_config
> channel_configs = canlib.get_channel_configs()
test/test_vector.py:594:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
def get_channel_configs() -> List[VectorChannelConfig]:
"""Read channel properties from Vector XL API."""
try:
driver_config = _get_xl_driver_config()
except VectorError:
return []
channel_list: List[VectorChannelConfig] = []
for i in range(driver_config.channelCount):
> xlcc: xlclass.XLchannelConfig = driver_config.channel[i]
E IndexError: invalid index
can/interfaces/vector/canlib.py:984: IndexError
========================================================================== warnings summary ===========================================================================
can/interfaces/__init__.py:38
<<BUILDDIR>>/python-can/.pybuild/cpython3_3.10_can/build/can/interfaces/__init__.py:38: DeprecationWarning: SelectableGroups dict interface is deprecated. Use select.
entries = entry_points().get("can.interface", ())
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
======================================================================= short test summary info =======================================================================
FAILED test/test_vector.py::test_get_channel_configs - IndexError: invalid index
================================================ 1 failed, 338 passed, 78 skipped, 30 deselected, 1 warning in 22.68s =================================================
this test is run on Debian/unstable on an s390x host (without any CAN hardware attached).
This is with c9d6d4e
Activity
umlaeute commentedon Oct 31, 2022
the problem seems to be that
driver_config.channelCountreports201326592(0x0C000000), but it really should report12(0x0000000C).Fix #1424 (#1425)
Revert "Fix hardbyte#1424 (hardbyte#1425)"