GeezerVison is showing github.com — test_ctypes: test_generated_data() fails on x86 Debian Installed with X 3.x · Issue #121938 · python/cpython
test_ctypes: test_generated_data() fails on x86 Debian Installed with X 3.x #121938DescriptionBug report
x86 Debian Installed with X 3.x build: https://buildbot.python.org/all/#/builders/1244/builds/2499
FAIL: test_generated_data (test.test_ctypes.test_generated_structs.GeneratedTest.test_generated_data) (name='Packed4')
Check that a ctypes struct/union matches its C equivalent.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/buildbot/buildarea/3.x.ware-debian-x86.installed/build/target/lib/python3.14/test/test_ctypes/test_generated_structs.py", line 444, in test_generated_data
self.assertEqual(sizeof(cls), next(expected))
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: 12 != 16
The structure:
@register()
class Packed4(Structure):
_fields_ = [('a', c_int8), ('b', c_int64)]
_pack_ = 8
configure:
./configure --prefix '$(PWD)/target'
test.pythoninfo:
CC.version: gcc (Debian 12.2.0-14) 12.2.0
sysconfig[CFLAGS]: -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall
sysconfig[PY_CFLAGS]: -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall
sysconfig[PY_CFLAGS_NODIST]: -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I./Include/internal/mimalloc
sysconfig[PY_STDMODULE_CFLAGS]: -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O3 -Wall -std=c11 -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=implicit-function-declaration -fvisibility=hidden -I./Include/internal -I./Include/internal/mimalloc -I. -I./Include
Linked PRs
Activityvstinner commented on Aug 5, 2024 zware commented on Aug 5, 2024 According to git bisect, this is due to 18c1a8d vstinner commented on Aug 6, 2024 hroncok commented on Oct 16, 2024 We see this on Fedora i686 as well. mcepl commented on Oct 17, 2024 Yes, the same on openSUSE with 3.14.0~a1. Works on x86_64, but breaks on 32bit i586.
Complete build log. encukou commented on Oct 18, 2024 Reacted by Miro Hrončok, Victor Stinner and Zachary Ware encukou commented on Oct 23, 2024 Took a while, but I'm now convinced that skipping this test is the correct thing to do.
The test code to generate an C struct equivalent to a ctypes struct is far from perfect.
MetadataMetadataDevelopmentNo branches or pull requestsIssue actions
|