python-zstandard icon indicating copy to clipboard operation
python-zstandard copied to clipboard

Test failure on 32-bit Intel-compatible architecture

Open lfam opened this issue 4 years ago • 1 comments

While building on the 32-bit Intel compatible architecture ('i386'), we see this test failure:

======================================================================
FAIL: test_estimated_compression_context_size (tests.test_data_structures.TestCompressionParameters)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/guix-build-python-zstandard-0.15.2.drv-0/zstandard-0.15.2/tests/test_data_structures.py", line 104, in test_estimated_compression_context_size
    self.assertAlmostEqual(
AssertionError: 1294656 != 1295064 within 400 delta (408 difference)

----------------------------------------------------------------------
Ran 278 tests in 0.866s

FAILED (failures=1, skipped=42)
Test failed: <unittest.runner.TextTestResult run=278 errors=0 failures=1>
error: Test failed: <unittest.runner.TextTestResult run=278 errors=0 failures=1>
command "python" "-c" "import setuptools, tokenize;__file__='setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\\r\\n', '\\n');f.close();exec(compile(code, __file__, 'exec'))" "test" failed with status 1

I noticed that Gentoo is skipping the test: https://bugs.gentoo.org/773979

Can you advise if this test should be skipped? Or does it highlight a real problem with python-zstandard on the 32-bit Intel architecture?

lfam avatar Apr 10 '21 18:04 lfam

The test failure is harmless and is safe to ignore: it is testing internal implementation details of the zstd library. But keeping the test is important, as it helps us guard against accidental increases in memory utilization as a result of us using zstd APIs incorrectly.

This test also started failing with the 1.5.0 upgrade I'm about to push. It may start passing again.

indygreg avatar Jul 05 '21 18:07 indygreg