-
Notifications
You must be signed in to change notification settings - Fork 47
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
Test Constraint::for_is_equal_to_contents_of fails on s390x arch #226
Comments
I can't suggest any patch yet:/ My previous investigations show that the test works correctly (actual and expected values matching), but offset used in the failure message does not match. It looks like this might happens because s390x architecture is big-endian. And since the offset value is an address of a byte in the integer in this test, it leads test to fail. As for #225 It looks like build for this architecture might be just disabled since it is not a primary platform. I'm not familiar with Debian packaging guides, but this issue might be related to #208 too, since it is one of supported Debian platform. But I'm not sure. |
I was just going to ask about the s390x architecture... I think this will be hard to fix. The test lines up three integers with low numbers in them:
This means that on a little endian (64 bit machines) the bytes will be ordered like:
and
with the difference in byte number 8. But on a big-endian it will be
and
giving the difference in byte 11 instead. So the difference in test output is correct. It should be this way. That means that disabling I can't immediately figure out how to solve it, though. The test is actually comparing a "golden sample" output with the one you get when running all the (failing) tests in There is a little script for each "messages" test that does some normalization so that the output is the same on all platforms, but I'm not sure we want to add this to that. It seems like to big a hammer to replace "at position [11]" with "at position [8]" in the output... |
Possibly this test will also fail on architectures where On a 2-byte
with the difference being in the 5th byte (or 6th, if it's a big-endian), and similarly, in the 17th or 23rd (if my math-brain is on-line) for a 8-byte int architecture. Still working as it should on that platform, but with a different offset depending on architecture. We should probably swap out those tests from "golden sample" text output comparisons to something more programmatic. |
Just checked @alvinchchen patch. I am confirming that the issue is fixed. So the issue can be closed. Build with 9768d33 and #241 patches succeseed on all architectures: |
I trying to build and test Cgreen on alternative architectures supported in Fedora,
It seams the test for
is_equal_to_contents_of
fails ons390x
architecture.Test:
cgreen/tests/constraint_messages_tests.c
Lines 62 to 65 in c0ec1e7
Steps to reproduce
Actually I building using koji service that has s390x environment, so not sure how to reproduce it on
x86
arch :/Actual result
The text was updated successfully, but these errors were encountered: