Blosc / bloscpack

Command line interface to and serialization format for Blosc
BSD 3-Clause "New" or "Revised" License
122 stars 27 forks source link

two test failures on i386 #89

Closed danstender closed 5 years ago

danstender commented 5 years ago

With 0.15.0, we have two test suite failures on i386 going like this:

FAIL: test_numpy_io.test_itemsize_chunk_size_mismatch(<class 'bloscpack.exceptions.ChunkSizeTypeSizeMismatch'>, <function pack_ndarray_str at 0xf4d4da4c>, array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
AssertionError: ChunkSizeTypeSizeMismatch not raised by pack_ndarray_str

======================================================================
FAIL: test_numpy_io.test_itemsize_chunk_size_mismatch(<class 'bloscpack.exceptions.ChunkSizeTypeSizeMismatch'>, <function pack_ndarray_str at 0xf4d4da4c>, array([  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,  10,  11,  12,
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
AssertionError: ChunkSizeTypeSizeMismatch not raised by pack_ndarray_str

----------------------------------------------------------------------
Ran 582 tests in 7.203s

FAILED (failures=2)
esc commented 5 years ago

This may look like the same test, but because I am using test generators. Unfortunately I don't know which test-cases (there are 14) are failing now. Is there any way I could get ssh-access to an i386 box in order to debug this interactively?

esc commented 5 years ago

Perhaps the default type size of an numpy.arange isn't 8 (double) but 4 (float) on this architecture. in which case the two test cases 4 and 12 would not fail. We could probably find this out easily with access to an i386 box:

>>> import numpy as np
>>> a = np.arange(1000)
>>> a.itemsize
8

The last statement should output 4 and not 8.

danstender commented 5 years ago

Right guess:

$ sudo schroot -d / -c unstable-i386-sbuild -u root
(unstable-i386-sbuild)root@varuna:/# apt-get install python-numpy
{...}
(unstable-i386-sbuild)root@varuna:/# python
Python 2.7.15+ (default, Nov 28 2018, 16:27:22)
[GCC 8.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> a = np.arange(1000)
>>> a.itemsize
4
esc commented 5 years ago

Interesting, this seems to confirm my hypothesis. Thank you.

danstender commented 5 years ago

BTW we had the same on HPPA and Powerpc: https://buildd.debian.org/status/fetch.php?pkg=bloscpack&arch=hppa&ver=0.15.0-1&stamp=1543932894&raw=0 https://buildd.debian.org/status/fetch.php?pkg=bloscpack&arch=powerpc&ver=0.15.0-1&stamp=1543932459&raw=0

esc commented 5 years ago

@danstender can you checkout #90?

danstender commented 5 years ago

Looks good:

test_pretty.test_pretty_filesieze ... ok
test_serializers.test_serializers('{"dtype":"float64","shape":[1024],"others":[]}', '{"dtype":"float64","shape":[1024],"others":[]}') ... ok
test_serializers.test_serializers(OrderedDict([('dtype', 'float64'), ('shape', [1024]), ('others', [])]), {'dtype': 'float64', 'shape': [1024], 'others': []}) ... ok

----------------------------------------------------------------------
Ran 580 tests in 4.725s

OK
{...}
Build Architecture: i386
Build Type: full
Build-Space: 1560
Build-Time: 10
Distribution: unstable
Host Architecture: i386
Install-Time: 19
Job: /tmp/sandbox-9988/bloscpack/packaging/bloscpack_0.15.0-2~test1.dsc
Machine Architecture: amd64
Package: bloscpack
Package-Time: 96
Source-Version: 0.15.0-2~test1
Space: 1560
Status: successful
Version: 0.15.0-2~test1

Great!

esc commented 5 years ago

Closed by #90