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

Aperta
#376 0 commenti 0 reazioni 1 assegnatario Vedi su GitHub

@ekamran ci sta già lavorando.

Dal 29/11/2026.

  • #377 di @ekamran — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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.

Lingua principale
PHP
Stelle
77
Fork
83
Merge medio
4g 9h
PR unite (30g)
2

Preparare l'ambiente

  • Include un Dockerfile o un file Docker Compose
  • Nessun modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di WordPress/phpunit-test-runner

Tutte le issue di WordPress/phpunit-test-runner

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.