Skip to content

Tests fail on ppc64 and s390x #1282

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

Closed
susilehtola opened this issue Feb 14, 2018 · 2 comments · Fixed by #1287
Closed

Tests fail on ppc64 and s390x #1282

susilehtola opened this issue Feb 14, 2018 · 2 comments · Fixed by #1287

Comments

@susilehtola
Copy link

I tried updating the Fedora packages of pybind11 to version 2.2.2. However, the tests fail on the ppc64 and s390x architectures, see https://koji.fedoraproject.org/koji/taskinfo?taskID=25049665 .

ppc64 build log https://kojipkgs.fedoraproject.org//work/tasks/9682/25049682/build.log
s390x build log https://kojipkgs.fedoraproject.org//work/tasks/9684/25049684/build.log

It appears both architectures have the same errors

=================================== FAILURES ===================================
__________________________________ test_dtype __________________________________
simple_dtype = dtype({'names':['bool_','uint_','float_','ldbl_'], 'formats':['?','>u4','>f4','>f16'], 'offsets':[0,4,8,16], 'itemsize':32})
    def test_dtype(simple_dtype):
        from sys import byteorder
        e = '<' if byteorder == 'little' else '>'
    
>       assert m.print_dtypes() == [
            simple_dtype_fmt(),
            packed_dtype_fmt(),
            "[('a', {}), ('b', {})]".format(simple_dtype_fmt(), packed_dtype_fmt()),
            partial_dtype_fmt(),
            partial_nested_fmt(),
            "[('a', 'S3'), ('b', 'S3')]",
            ("{{'names':['a','b','c','d'], " +
             "'formats':[('S4', (3,)),('<i4', (2,)),('u1', (3,)),('<f4', (4, 2))], " +
             "'offsets':[0,12,20,24], 'itemsize':56}}").format(e=e),
            "[('e1', '" + e + "i8'), ('e2', 'u1')]",
            "[('x', 'i1'), ('y', '" + e + "u8')]",
            "[('cflt', '" + e + "c8'), ('cdbl', '" + e + "c16')]"
        ]
E       assert ["{'names':['... 'S3')]", ...] == ["{'names':['b... 'S3')]", ...]
E         At index 6 diff: u"{'names':['a','b','c','d'], 'formats':[('S4', (3,)),('>i4', (2,)),('u1', (3,)),('>f4', (4, 2))], 'offsets':[0,12,20,24], 'itemsize':56}" != "{'names':['a','b','c','d'], 'formats':[('S4', (3,)),('<i4', (2,)),('u1', (3,)),('<f4', (4, 2))], 'offsets':[0,12,20,24], 'itemsize':56}"
E         Use -v to get the full diff
test_numpy_dtypes.py:98: AssertionError
_______________________________ test_array_array _______________________________
    def test_array_array():
        from sys import byteorder
        e = '<' if byteorder == 'little' else '>'
    
        arr = m.create_array_array(3)
>       assert str(arr.dtype) == (
            "{{'names':['a','b','c','d'], " +
            "'formats':[('S4', (3,)),('<i4', (2,)),('u1', (3,)),('{e}f4', (4, 2))], " +
            "'offsets':[0,12,20,24], 'itemsize':56}}").format(e=e)
E       assert "{'names':['a...itemsize':56}" == "{'names':['a'...itemsize':56}"
E         Skipping 44 identical leading characters in diff, use -v to show
E         Skipping 71 identical trailing characters in diff, use -v to show
E         - , (3,)),('>i4', (2,)
E         ?           ^
E         + , (3,)),('<i4', (2,)
E         ?           ^
test_numpy_dtypes.py:216: AssertionError
=============== 2 failed, 284 passed, 6 skipped in 7.07 seconds ================
@jagerman
Copy link
Member

jagerman commented Feb 17, 2018

Thanks for the report. It looks like a false positive from a little-endianism that crept in since the last time we fixed this in #699/#694.

#1287 should solve it: can you give that patch a try and confirm that it fixes things on those (big-endian) arches?

@susilehtola
Copy link
Author

Yes, confirmed. Thanks for the speedy fix.

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 a pull request may close this issue.

2 participants