Skip to content

Tests fail on s390x #46

@OTLabs

Description

@OTLabs

I am building pressed v4.0.0 on Alpine Linux and got following tests failing on s390x arch (all other arch run tests fine) [1]:

============================= test session starts ==============================
platform linux -- Python 3.11.3, pytest-7.3.1, pluggy-1.0.0
rootdir: /builds/otlabs/aports/testing/py3-preshed/src/preshed-4.0.0
collected 20 items
preshed/tests/test_bloom.py .....FF.                                     [ 40%]
preshed/tests/test_counter.py ....                                       [ 60%]
preshed/tests/test_hashing.py .......                                    [ 95%]
preshed/tests/test_pop.py .                                              [100%]
=================================== FAILURES ===================================
_________________________ test_bloom_from_bytes_legacy _________________________
    def test_bloom_from_bytes_legacy():
        # This is the output from the tests in the legacy format
        data = "0200000000000000600000000000000000000000000000003300000000000000e100000000000000b200000000000000da00000000000000e700000000000000e600000000000000ff000000000000004700000000000000e7000000000000004c000000000000003b00000000000000f700000000000000"
        data = bytes.fromhex(data)
        bf = BloomFilter().from_bytes(data)
        for ii in range(0, 1000, 20):
>           assert ii in bf
E           assert 0 in <preshed.bloom.BloomFilter object at 0x3ff8f39b650>
preshed/tests/test_bloom.py:70: AssertionError
_____________________ test_bloom_from_bytes_legacy_windows _____________________
    def test_bloom_from_bytes_legacy_windows():
        # This is the output from the tests in the legacy Windows format.
        # This is the same as the data in the normal test, but missing the second
        # half of each container.
    
        data = "02000000600000000000000033000000e1000000b2000000da000000e7000000e6000000ff00000047000000e70000004c0000003b000000f7000000"
        data = bytes.fromhex(data)
        bf = BloomFilter().from_bytes(data)
        for ii in range(0, 1000, 20):
>           assert ii in bf
E           assert 0 in <preshed.bloom.BloomFilter object at 0x3ff8f39b730>
preshed/tests/test_bloom.py:87: AssertionError
=========================== short test summary info ============================
FAILED preshed/tests/test_bloom.py::test_bloom_from_bytes_legacy - assert 0 in <preshed.bloom.BloomFilter object at 0x3ff8f39b650>
FAILED preshed/tests/test_bloom.py::test_bloom_from_bytes_legacy_windows - assert 0 in <preshed.bloom.BloomFilter object at 0x3ff8f39b730>
========================= 2 failed, 18 passed in 0.06s =========================
>>> ERROR: py3-preshed: check failed

[1] https://gitlab.alpinelinux.org/otlabs/aports/-/jobs/1021066#L280

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions