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

Đang mở
#376 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

@ekamran đang làm issue này rồi.

Từ ngày 29/11/2026.

  • #377 của @ekamran — đang mở

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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.

Ngôn ngữ chính
PHP
Star
77
Fork
83
Merge trung bình
4 ngày 9 giờ
Pull request đã merge (30 ngày)
2

Chuẩn bị môi trường

  • Có Dockerfile hoặc tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của WordPress/phpunit-test-runner

Tất cả issue của WordPress/phpunit-test-runner

Issue tương tự

Thêm issue về PHP

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.