-
Notifications
You must be signed in to change notification settings - Fork 77
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 unit tests on big endian systems #156
base: master
Are you sure you want to change the base?
Conversation
SHA1Update(&sha_ctx, ptr, width * sizeof(T)); | ||
#else | ||
for (unsigned j = 0; j < width; j++) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make an endian-reversed copy of the scanline instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sekrit-twc Hi, I am interested in reviving this PR as it seems to be the only thing standing in the way on big-endian. I see this code has been reorganized into https://github.com/sekrit-twc/graphengine. In this comment, do you mean that a copy should be made here, at hashing time, or do you mean that it should be done earlier, during actual buffer manipulations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know. There aren't any semantics for big-endian unit tests at the moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Github supports running on s390x natively: https://github.com/marketplace/actions/run-on-architecture#supported-platforms
It would probably be nice to have a runner for all these architectures, it would help catch issues like #175
I'll post a PR that does byte-swapping during the checksum generation. I don't think there's an easier way.
You must accept the terms of WTFPL or transfer ownership of this commit to the Z.lib Steering Committee. |
Also, how does one run a big-endian unit test? |
68551ab
to
5693d42
Compare
2467b35
to
afae03a
Compare
No description provided.