Skip to content

Commit dcca039

Browse files
committed
Skip ftruncate_bug76422 if disk_free_space() <= 4GB
Followup to #5043 In the middle of running this test with TESTS=-j9, run-tests.php stopped the test suite because the partition started with 3.5GB of free disk space and new test files couldn't be created. Reclaiming the disk space of that file also took a while. Closes GH-5283
1 parent 4b8171e commit dcca039

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

ext/standard/tests/file/ftruncate_bug76422.phpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ Bug #76422 ftruncate fails on files > 2GB
55
if (PHP_INT_SIZE < 8) {
66
die('skip.. only valid for 64-bit');
77
}
8+
if (disk_free_space(__DIR__) <= 4.1 * 1024 * 1024 * 1024 ) {
9+
// Add a bit of extra overhead for other processes, temporary files created while running tests, etc.
10+
die('skip.. This test requires over 4GB of free disk space on this disk partition');
11+
}
812
?>
913
--FILE--
1014
<?php

0 commit comments

Comments
 (0)