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

未关闭
#376 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@ekamran 已经在做这个了。

开始于 2026年11月29日。

  • #377 来自 @ekamran —— 未关闭

评估

这个 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 模板
  • 没有贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

WordPress/phpunit-test-runner 的其他 Issue

查看 WordPress/phpunit-test-runner 的全部 Issue

相似的 Issue

更多 PHP Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。