report.php cannot parse a junit.xml larger than about 12.5 MB
评估
这个 Issue 还没有评估数据。
描述
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.
- 主要语言
- PHP
- 星标
- 77
- 派生
- 83
- 平均合并
- 4 天 9 小时
- 30 天内合并 PR
- 2
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 没有贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
WordPress/phpunit-test-runner 的其他 Issue
-
A failed results upload passes silently可能已有人在做 @ekamran 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
WordPress/phpunit-test-runner#378 ·
-
test-reporter-request
难度 1/5 1 小时以内 新手友好度 72/100
WordPress/phpunit-test-runner#373 ·
-
WPT_CERTIFICATE_VALIDATION is still documented but no script reads it可能已有人在做 @ediamin 于 17 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
WordPress/phpunit-test-runner#363 ·
-
Node v 26可能已有人在做 @gohelkunjan 于 3 天前认领。 未关闭
难度 4/5 3-5 天 新手友好度 42/100
WordPress/phpunit-test-runner#374 ·
-
In SSH mode, report.php cannot copy junit.xml back (double quoting is back)可能已有人在做 @ekamran 于 18 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 18/100
WordPress/phpunit-test-runner#370 ·
查看 WordPress/phpunit-test-runner 的全部 Issue
相似的 Issue
-
support
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
15.0
难度 2/5 1-3 小时 新手友好度 66/100
-
难度 2/5 1-3 小时 新手友好度 76/100
mollie/WooCommerce#1346 ·
-
难度 1/5 1 小时以内 新手友好度 82/100
维护者通常 1 天内回复
-
area: ui bug
难度 2/5 1-3 小时 新手友好度 84/100
nplhse/collaborative-ivena-statistics#1977 ·
维护者通常 1 天内回复