report.php cannot parse a junit.xml larger than about 12.5 MB
É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
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de WordPress/phpunit-test-runner
-
A failed results upload passes silentlyPeut-être pris @ekamran l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
WordPress/phpunit-test-runner#378 ·
-
test-reporter-request
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
WordPress/phpunit-test-runner#373 ·
-
WPT_CERTIFICATE_VALIDATION is still documented but no script reads itPeut-être pris @ediamin l’a pris il y a 17 jours. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 85/100
WordPress/phpunit-test-runner#363 ·
-
Node v 26Peut-être pris @gohelkunjan l’a pris il y a 3 jours. Ouverte
Difficulté 4/5 3-5 jours Accessibilité débutants 42/100
WordPress/phpunit-test-runner#374 ·
-
In SSH mode, report.php cannot copy junit.xml back (double quoting is back)Peut-être pris @ekamran l’a pris il y a 18 jours. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 18/100
WordPress/phpunit-test-runner#370 ·
Toutes les issues de WordPress/phpunit-test-runner
Issues similaires
-
support
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
15.0
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
mollie/WooCommerce#1346 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 82/100
Les mainteneurs répondent en général sous 1 jour
-
area: ui bug
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
nplhse/collaborative-ivena-statistics#1977 ·
Les mainteneurs répondent en général sous 1 jour