python / python/cpython

test_buffer.test_array_alignment() fails on Python 3.15.0~a6 when using mimalloc

Abierto
#144,725 18 comentarios 2 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

3.15 3.16 tests type-bug
Lenguaje dominante
Python
Estrellas
77.2k
Forks
35.9k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

Bug report

Bug description:

When running the test suite for openSUSE/Linux on 32bit architectures (i586 and armv7l), I get this test failing

[ 3014s] ======================================================================
[ 3014s] FAIL: test_array_alignment (test.test_buffer.TestBufferProtocol.test_array_alignment)
[ 3014s] ----------------------------------------------------------------------
[ 3014s] Traceback (most recent call last):
[ 3014s]   File "/home/abuild/rpmbuild/BUILD/python315-nogil-3.15.0_a6-build/Python-3.15.0a6/Lib/test/test_buffer.py", line 4480, in test_array_alignment
[ 3014s]     self.assertEqual(
[ 3014s]     ~~~~~~~~~~~~~~~~^
[ 3014s]         [_testcapi.buffer_pointer_as_int(case) % align for case in cases],
[ 3014s]         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[ 3014s]         [0] * len(cases),
[ 3014s]         ^^^^^^^^^^^^^^^^^
[ 3014s]     )
[ 3014s]     ^
[ 3014s] AssertionError: Lists differ: [0, 4, 0, 0, 0, 0, 0, 0, 0, 0] != [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[ 3014s] 
[ 3014s] First differing element 1:
[ 3014s] 4
[ 3014s] 0
[ 3014s] 
[ 3014s] - [0, 4, 0, 0, 0, 0, 0, 0, 0, 0]
[ 3014s] ?     ---
[ 3014s] 
[ 3014s] + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
[ 3014s] ?                          +++
[ 3014s] 
[ 3014s] 
[ 3014s] ----------------------------------------------------------------------
[ 3014s] Ran 97 tests in 11.932s
[ 3014s] 
[ 3014s] FAILED (failures=1, skipped=2)

Complete build log with all packages used and steps taken to reproduce.

It seems that _testcapi module has been correctly build.

CPython versions tested on:

3.15

Operating systems tested on:

Linux

Linked PRs
  • gh-145026
  • gh-157530

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Start with Lib/test/test_buffer.py at test_array_alignment around line 4480 and the _testcapi.buffer_pointer_as_int calls. Reproduce the failure on 32-bit Linux with mimalloc using the complete build log and compare the affected alignment case. Done means the test passes without weakening its alignment assertion; linked PRs gh-145026 and gh-157530 should be reviewed first.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
testing-qa
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.