Skip to content

Commit 0d519fa

Browse files
committed
Skip upload_2G.phpt if disk_free_space() <= 2GB
This test failed when the free disk space is close to 2.15GB. I see the file size in the .out file as 0. PHP has to save the full file contents to disk (the path is in `$_FILES`) Related to GH-5283 Closes GH-5873
1 parent 9002e95 commit 0d519fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

sapi/cli/tests/upload_2G.phpt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ if (PHP_INT_SIZE < 8) {
88
die("skip need PHP_INT_SIZE>=8");
99
}
1010

11+
if (disk_free_space(sys_get_temp_dir()) < 2300000000) {
12+
die("skip need more than 2.15G of free disk space for the uploaded file");
13+
}
14+
1115
if (!file_exists('/proc/meminfo')) {
1216
die('skip Cannot check free RAM from /proc/meminfo on this platform');
1317
}

0 commit comments

Comments
 (0)