This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: sizeof unit tests fail on ARMv7
Type: Stage:
Components: Versions: Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: python-dev, vstinner
Priority: normal Keywords:

Created on 2016-09-10 04:25 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (3)
msg275562 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-09-10 04:25
Hum, I used "+ 8" to add the new 64-bit version tag of dictionaries. But I didn't use struct.calcsize() to compute it, so there is maybe an aliasing/padding issue.

http://buildbot.python.org/all/builders/ARMv7%20Ubuntu%203.x/builds/4815/steps/test/logs/stdio

======================================================================
FAIL: test_objecttypes (test.test_sys.SizeofTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_sys.py", line 940, in test_objecttypes
    check({}, size('n2P') + 8 + calcsize('2nP2n') + 8 + (8*2//3)*calcsize('n2P'))
  File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/support/__init__.py", line 1510, in check_sizeof
    test.assertEqual(result, size, msg)
AssertionError: 144 != 140 : wrong size for <class 'dict'>: got 144, expected 140

======================================================================
FAIL: test_sizeof_exact (test.test_ordered_dict.CPythonOrderedDictSubclassTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_ordered_dict.py", line 677, in test_sizeof_exact
    check(od, basicsize + 8*p + 8 + 5*entrysize)  # 8byte indicies + 8*2//3 * entry table
  File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/support/__init__.py", line 1510, in check_sizeof
    test.assertEqual(result, size, msg)
AssertionError: 208 != 204 : wrong size for <class 'test.test_ordered_dict.CPythonOrderedDictSubclassTests.OrderedDict'>: got 208, expected 204

======================================================================
FAIL: test_sizeof_exact (test.test_ordered_dict.CPythonOrderedDictTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/test_ordered_dict.py", line 677, in test_sizeof_exact
    check(od, basicsize + 8*p + 8 + 5*entrysize)  # 8byte indicies + 8*2//3 * entry table
  File "/ssd/buildbot/buildarea/3.x.gps-ubuntu-exynos5-armv7l/build/Lib/test/support/__init__.py", line 1510, in check_sizeof
    test.assertEqual(result, size, msg)
AssertionError: 208 != 204 : wrong size for <class 'collections.OrderedDict'>: got 208, expected 204
msg275567 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-09-10 04:52
New changeset c3776dd858f0 by Victor Stinner in branch 'default':
Try to fix sizeof unit tests on dict
https://hg.python.org/cpython/rev/c3776dd858f0
msg275597 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-09-10 08:13
According to buildbots, the issue seems to be fixed.
History
Date User Action Args
2022-04-11 14:58:36adminsetgithub: 72243
2016-09-10 08:13:51vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg275597
2016-09-10 04:52:35python-devsetnosy: + python-dev
messages: + msg275567
2016-09-10 04:25:14vstinnercreate