-
-
Notifications
You must be signed in to change notification settings - Fork 690
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tests/test_inotify_c.py failures on big endian systems #804
Labels
Comments
So I've finally gotten around to debug it… and realized that the test mock hardcodes raw |
mgorny
added a commit
to mgorny/watchdog
that referenced
this issue
Aug 19, 2021
Fix the mocked inotify data to respect system endianness. Instead of harcoding the raw data, reconstruct it using struct.pack(), respecting host endianness. This should also benefit readability a bit. Closes gorakhargosh#804
mgorny
added a commit
to mgorny/watchdog
that referenced
this issue
Aug 19, 2021
Fix the mocked inotify data to respect system endianness. Instead of harcoding the raw data, reconstruct it using struct.pack(), respecting host endianness. This should also benefit readability a bit. Closes gorakhargosh#804
mgorny
added a commit
to mgorny/watchdog
that referenced
this issue
Aug 19, 2021
Fix the mocked inotify data to respect system endianness. Instead of harcoding the raw data, reconstruct it using struct.pack(), respecting host endianness. This should also benefit readability a bit. Closes gorakhargosh#804
mgorny
added a commit
to mgorny/watchdog
that referenced
this issue
Aug 19, 2021
Fix the mocked inotify data to respect system endianness. Instead of harcoding the raw data, reconstruct it using struct.pack(), respecting host endianness. This should also benefit readability a bit. Closes gorakhargosh#804
mgorny
added a commit
to mgorny/watchdog
that referenced
this issue
Aug 19, 2021
Fix the mocked inotify data to respect system endianness. Instead of harcoding the raw data, reconstruct it using struct.pack(), respecting host endianness. This should also benefit readability a bit. Closes gorakhargosh#804
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is on aadb53f with Python 3.9.4. I have reproduced it on ppc64 system but I've gotten reports of the same problem on hppa and sparc systems. I've also gotten confirmation that the tests pass on ppc64le, so while I'm not 100% sure, I think this is an endianness issue.
That said, I suppose you already know but for completeness I have to say that using ctypes and hardcoding system constants is generally a bad idea (and Linux is known to have different constant values across different architectures, though it may not be the case for inotify). It's better to use cffi or even true C extension.
Full pytest output: pytest.txt
The text was updated successfully, but these errors were encountered: