Skip to content

Skip ftruncate_bug76422 if disk_free_space() <= 4GB #5283

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions ext/standard/tests/file/ftruncate_bug76422.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ Bug #76422 ftruncate fails on files > 2GB
if (PHP_INT_SIZE < 8) {
die('skip.. only valid for 64-bit');
}
if (disk_free_space(__DIR__) <= 4.1 * 1024 * 1024 * 1024 ) {
// Add a bit of extra overhead for other processes, temporary files created while running tests, etc.
die('skip.. This test requires over 4GB of free disk space on this disk partition');
}
?>
--FILE--
<?php
Expand Down