summaryrefslogtreecommitdiff
path: root/sapi/cli
diff options
context:
space:
mode:
authorTyson Andre <tysonandre775@hotmail.com>2020-07-18 21:22:57 -0400
committerTyson Andre <tysonandre775@hotmail.com>2020-07-19 09:21:53 -0400
commit0d519fa493989437eeb521054a057826f21f0ba7 (patch)
tree75df2615e74fc974f0bc4b054bb6de7a999af266 /sapi/cli
parent9002e95f7c0aa73d621bf54b2ad19aeef037e95c (diff)
downloadphp-git-0d519fa493989437eeb521054a057826f21f0ba7.tar.gz
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
Diffstat (limited to 'sapi/cli')
-rw-r--r--sapi/cli/tests/upload_2G.phpt4
1 files changed, 4 insertions, 0 deletions
diff --git a/sapi/cli/tests/upload_2G.phpt b/sapi/cli/tests/upload_2G.phpt
index b9867f22d9..81258da1d3 100644
--- a/sapi/cli/tests/upload_2G.phpt
+++ b/sapi/cli/tests/upload_2G.phpt
@@ -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');
}