[php-src] PHP-8.6: Skip header_over_4gib.phpt when available memory is insufficient
| From: | Jakub Zelenka | Date: | Thu, 19 Nov 2026 15:26:39 +0000 |
| Subject: | [php-src] PHP-8.6: Skip header_over_4gib.phpt when available memory is insufficient | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-143924@lists.php.net to get a copy of this message | ||
Author: Jakub Zelenka (bukka)
Date: 2026-11-19T16:10:03+01:00
Commit: https://github.com/php/php-src/commit/59f75793f36583b7cde4ec7fa53372a7ccf05fa3
Raw diff: https://github.com/php/php-src/commit/59f75793f36583b7cde4ec7fa53372a7ccf05fa3.diff
Skip header_over_4gib.phpt when available memory is insufficient
The header is duplicated, so the test peaks above 8 GiB and takes down
smaller machines (e.g. 7 GB CI runners) with the OOM killer.
Changed paths:
M ext/standard/tests/general_functions/header_over_4gib.phpt
Diff:
diff --git a/ext/standard/tests/general_functions/header_over_4gib.phpt
b/ext/standard/tests/general_functions/header_over_4gib.phpt
index 628cf9fc2516..a8bdf4b6afad 100644
--- a/ext/standard/tests/general_functions/header_over_4gib.phpt
+++ b/ext/standard/tests/general_functions/header_over_4gib.phpt
@@ -7,6 +7,12 @@ if (PHP_INT_SIZE != 8) die('skip this test is for 64bit platforms only');
if (getenv('SKIP_SLOW_TESTS')) die('skip slow tests excluded by request');
if (PHP_OS === 'FreeBSD') die('skip Worker does not handle OOM gracefully');
if (getenv('SKIP_MSAN')) die('skip Crashes CI with MSAN');
+// The header is duplicated, so the peak memory usage exceeds 8 GiB, which takes
+// down smaller machines (e.g. 7 GB CI runners) with the OOM killer.
+$memInfo = @file_get_contents('/proc/meminfo');
+if ($memInfo && preg_match('/MemAvailable:\s+(\d+) kB/', $memInfo, $m) &&
$m[1] < 9 * 1024 * 1024) {
+ die('skip Insufficient available memory (less than 9 GiB)');
+}
?>
--CONFLICTS--
all