Skip to content

test_ctypes: test_generated_data() fails on x86 Debian Installed with X 3.x#121938

@vstinner

Description

@vstinner

Bug 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()classPacked4(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

Metadata

Metadata

Assignees

Labels

testsTests in the Lib/test dirtopic-ctypestype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions