Bug 2225518 - PyMapVBVD assumes the platform is little-endian
Summary: PyMapVBVD assumes the platform is little-endian
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: python-pymapvbvd
Version: 39
Hardware: s390x
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Ben Beasley
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: F-ExcludeArch-s390x
TreeView+ depends on / blocked
 
Reported: 2023-07-25 13:00 UTC by Ben Beasley
Modified: 2023-08-16 07:54 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: ---
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github wtclarke pymapvbvd issues 35 0 None closed Big-endian host support? 2023-07-25 13:00:49 UTC

Description Ben Beasley 2023-07-25 13:00:50 UTC
Description of problem:

It looks like pymapvbvd assumes that both the binary file format and the host running the code are little-endian.

Version-Release number of selected component (if applicable): 0.5.4-2.fc39


How reproducible:

Steps to Reproduce:
1. Remove “ExcludeArch: s390x”
2. fedpkg scratch-build --srpm --arches s390x

Actual results:

=========================== short test summary info ============================
FAILED tests/test_flags.py::test_flagRemoveOS - IndexError: index -1 is out o...
FAILED tests/test_flags.py::test_flagIgnoreSeg_flagDoAverage - IndexError: in...
FAILED tests/test_flags.py::test_flagSkipToFirstLine - IndexError: index -1 i...
FAILED tests/test_read.py::test_gre - IndexError: index -1 is out of bounds f...
FAILED tests/test_read.py::test_epi - IndexError: index -1 is out of bounds f...
FAILED tests/test_slicing.py::test_vb - IndexError: index -1 is out of bounds...
FAILED tests/test_svs.py::test_vb - IndexError: index -1 is out of bounds for...
FAILED tests/test_svs.py::test_ve - IndexError: index -1 is out of bounds for...
FAILED tests/test_svs.py::test_vb_broken - IndexError: index -1 is out of bou...
======================== 9 failed, 17 warnings in 1.31s ========================

Expected results:

All tests pass, as they do on other platforms.

Additional info:

If the file format is always little-endian, this should mostly be a matter of making endianness explicit when creating a numpy array that is to be copied bytewise in or out of the file: for example, np.dtype('<u4') instead of np.uint32. However, there are a lot of places this would need to be done, and it would require some time and study for me to offer a careful patch—probably more time than I want to spend on it.

Upstream would be open to fixing this, but can’t dedicate the time currently if there aren’t a substantial number of potential users on s390x.

https://github.com/wtclarke/pymapvbvd/issues/35

Comment 1 Fedora Release Engineering 2023-08-16 07:54:23 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 39 development cycle.
Changing version to 39.


Note You need to log in before you can comment on or make changes to this bug.