Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 926961 - dev-python/crc32c-2.4 fails tests on sparc: AssertionError: 3909781982 != 2287516556
Summary: dev-python/crc32c-2.4 fails tests on sparc: AssertionError: 3909781982 != 228...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: Sparc64 Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 925721
  Show dependency tree
 
Reported: 2024-03-14 02:11 UTC by matoro
Modified: 2024-03-14 02:11 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log and emerge --info (file_926961.txt,20.72 KB, text/plain)
2024-03-14 02:11 UTC, matoro
Details

Note You need to log in before you can comment on or make changes to this bug.
Description matoro archtester 2024-03-14 02:11:15 UTC
Apparently not (solely) an endianness problem, because it passes on ppc64?

No older version in tree to test for regression.

Debian is stuck on 2.3, so can't compare there.  Strange that there's only one failure rather than the entire test failing.

================================================================== FAILURES ===================================================================
_________________________________________________________ TestMisc.test_msvc_examples _________________________________________________________

self = <test_crc32c.TestMisc testMethod=test_msvc_examples>

    def test_msvc_examples(self):
        # Examples taken from MSVC's online examples.
        # Values are not xor'd in the examples though, so we do it here
        max32 = 0xffffffff
        def assert_msvc_vals(b, crc, expected_crc):
            self.assertEqual(expected_crc ^ max32, crc32c.crc32c(b, crc ^ max32))
        assert_msvc_vals(uchar_as_bytes(100), 1, 1412925310)
        assert_msvc_vals(ushort_as_bytes(1000), 1, 3870914500)
        assert_msvc_vals(uint_as_bytes(50000), 1, 971731851)
>       assert_msvc_vals(ulonglong_as_bytes(0x88889999EEEE3333), 0x5555AAAA, 0x16F57621)

assert_msvc_vals = <function TestMisc.test_msvc_examples.<locals>.assert_msvc_vals at 0xfff80001070f4180>
max32      = 4294967295
self       = <test_crc32c.TestMisc testMethod=test_msvc_examples>

test/test_crc32c.py:96: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test/test_crc32c.py:92: in assert_msvc_vals
    self.assertEqual(expected_crc ^ max32, crc32c.crc32c(b, crc ^ max32))
E   AssertionError: 3909781982 != 2287516556
        b          = b'33\xee\xee\x99\x99\x88\x88'
        crc        = 1431677610
        expected_crc = 385185313
        max32      = 4294967295
        self       = <test_crc32c.TestMisc testMethod=test_msvc_examples>
=========================================================== short test summary info ===========================================================
FAILED test/test_crc32c.py::TestMisc::test_msvc_examples - AssertionError: 3909781982 != 2287516556

Reproducible: Always
Comment 1 matoro archtester 2024-03-14 02:11:40 UTC
Created attachment 887564 [details]
build.log and emerge --info