Fix unit tests on big endian systems - #156
Conversation
| #if (__BYTE_ORDER == __LITTLE_ENDIAN) | ||
| SHA1Update(&sha_ctx, ptr, width * sizeof(T)); | ||
| #else | ||
| for (unsigned j = 0; j < width; j++) |
There was a problem hiding this comment.
Make an endian-reversed copy of the scanline instead.
There was a problem hiding this comment.
@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.
I don't know. There aren't any semantics for big-endian unit tests at the moment.
There was a problem hiding this comment.
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
659c78a to
f6cc75a
Compare
No description provided.