Skip to content
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

Fix test mocks for big endian systems #828

Merged
merged 1 commit into from
Aug 19, 2021

Conversation

mgorny
Copy link
Contributor

@mgorny mgorny commented 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.

@BoboTiG
Copy link
Collaborator

BoboTiG commented Aug 19, 2021

Great, thanks @mgorny 💪
Could you add a line + your GitHub nickname in the changelog as well?

@mgorny
Copy link
Contributor Author

mgorny commented Aug 19, 2021

Great, thanks @mgorny
Could you add a line + your GitHub nickname in the changelog as well?

Done.

setup.cfg Outdated Show resolved Hide resolved
tests/test_inotify_c.py Outdated Show resolved Hide resolved
@mgorny mgorny force-pushed the big-endian branch 2 times, most recently from 8722594 to 96e73e4 Compare August 19, 2021 13:38
@BoboTiG
Copy link
Collaborator

BoboTiG commented Aug 19, 2021

(Tests are failing because of the formatting.)

@mgorny
Copy link
Contributor Author

mgorny commented Aug 19, 2021

Will fix it in a minute.

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
Copy link
Contributor Author

mgorny commented Aug 19, 2021

(updated)

@BoboTiG BoboTiG merged commit 97ff41c into gorakhargosh:master Aug 19, 2021
@BoboTiG
Copy link
Collaborator

BoboTiG commented Aug 19, 2021

That's great, thank you @mgorny !

@mgorny mgorny deleted the big-endian branch August 19, 2021 16:40
@mgorny
Copy link
Contributor Author

mgorny commented Aug 19, 2021

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants