Skip to content

Commit

Permalink
Skip upload_2G.phpt if disk_free_space() <= 2GB
Browse files Browse the repository at this point in the history
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
  • Loading branch information
TysonAndre committed Jul 19, 2020
1 parent 9002e95 commit 0d519fa
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions sapi/cli/tests/upload_2G.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ if (PHP_INT_SIZE < 8) {
die("skip need PHP_INT_SIZE>=8");
}

if (disk_free_space(sys_get_temp_dir()) < 2300000000) {
die("skip need more than 2.15G of free disk space for the uploaded file");
}

if (!file_exists('/proc/meminfo')) {
die('skip Cannot check free RAM from /proc/meminfo on this platform');
}
Expand Down

0 comments on commit 0d519fa

Please sign in to comment.