report.php cannot parse a junit.xml larger than about 12.5 MB

Abierto
#376 0 comentarios 0 reacciones 1 asignado Ver en GitHub

@ekamran ya está trabajando en esto.

Desde el 29/11/2026.

  • #377 de @ekamran — abierto

Evaluación

Este issue todavía no se ha evaluado.

Descripción

report.php stops when junit.xml is bigger than about 12.5 MB:

Error: junit.xml could not be parsed as XML, so the test results are unreadable. Aborting instead of reporting an unreadable result as a success. First parser error: internal error: Huge input lookup at line 40283.

The file is valid. process_junit_xml() parses it with simplexml_load_string(), and libxml 2.10 and older refuse a string this big unless LIBXML_PARSEHUGE is passed. libxml 2.11 and newer parse it fine.

Most of the size is the test directory path, which is repeated in every test case (33,939 times in a trunk run). With the default /tmp/wp-test-runner path a trunk run is 10.2 MB, so it works today. With a path of about 88 characters or more, it fails today. The file also grows as core adds tests.

Tested with master (087bb29) on a full trunk run and a full 7.2 RC3 run:

libxml Without the flag With the flag
2.9.10, 2.9.13, 2.9.14, 2.10.4 fails above 12.5 MB parses up to 40.7 MB
2.11.7, 2.12.10, 2.13.9 parses up to 40.7 MB parses up to 40.7 MB

Ubuntu 22.04 and 24.04, Debian 12 and 13, and Rocky 8 and 9 all ship libxml2 2.9.x.

Expected: report.php reports a valid junit.xml like this 14 MB one, instead of stopping at the libxml limit.

Lenguaje dominante
PHP
Estrellas
77
Forks
83
Merge medio
4 d 9 h
PR fusionados (30 d)
2

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin 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.

Más de WordPress/phpunit-test-runner

Todos los issues de WordPress/phpunit-test-runner

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.