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 unit tests on big endian systems #156

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mgorse
Copy link

@mgorse mgorse commented Sep 22, 2021

No description provided.

SHA1Update(&sha_ctx, ptr, width * sizeof(T));
#else
for (unsigned j = 0; j < width; j++)
Copy link
Owner

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.

Copy link

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?

Copy link
Owner

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.

Copy link

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.

@sekrit-twc sekrit-twc changed the title FIx unit tests on big endian systems Fix unit tests on big endian systems Sep 23, 2021
@sekrit-twc
Copy link
Owner

You must accept the terms of WTFPL or transfer ownership of this commit to the Z.lib Steering Committee.

@sekrit-twc
Copy link
Owner

Also, how does one run a big-endian unit test?

@sekrit-twc sekrit-twc force-pushed the master branch 4 times, most recently from 68551ab to 5693d42 Compare June 25, 2022 02:27
@sekrit-twc sekrit-twc force-pushed the master branch 2 times, most recently from 2467b35 to afae03a Compare July 22, 2022 06:19
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.

3 participants