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

Ouverte
#376 0 commentaires 0 réactions 1 personne assignée Voir sur GitHub

@ekamran y travaille déjà.

Depuis le 29/11/2026.

  • #377 par @ekamran — ouverte

Évaluation

Cette issue n'a pas encore été évaluée.

Description

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.

Langage dominant
PHP
Étoiles
77
Forks
83
Merge moyen
4 j 9 h
PR mergées (30 j)
2

Préparer son environnement

  • Fournit un Dockerfile ou un fichier Docker Compose
  • Aucun modèle de pull request
  • Aucun guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de WordPress/phpunit-test-runner

Toutes les issues de WordPress/phpunit-test-runner

Issues similaires

Plus d'issues PHP

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.