From dcca0391e202d7fc737634ba70d60d57c7973ccb Mon Sep 17 00:00:00 2001 From: Tyson Andre Date: Sat, 21 Mar 2020 10:58:35 -0400 Subject: [PATCH] Skip ftruncate_bug76422 if disk_free_space() <= 4GB Followup to https://github.com/php/php-src/pull/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 --- ext/standard/tests/file/ftruncate_bug76422.phpt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/standard/tests/file/ftruncate_bug76422.phpt b/ext/standard/tests/file/ftruncate_bug76422.phpt index 84134acfd0..978a8c7a71 100644 --- a/ext/standard/tests/file/ftruncate_bug76422.phpt +++ b/ext/standard/tests/file/ftruncate_bug76422.phpt @@ -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--