]> granicus.if.org Git - php/commitdiff
Skip upload_2G.phpt if disk_free_space() <= 2GB
authorTyson Andre <tysonandre775@hotmail.com>
Sun, 19 Jul 2020 01:22:57 +0000 (21:22 -0400)
committerTyson Andre <tysonandre775@hotmail.com>
Sun, 19 Jul 2020 13:21:53 +0000 (09:21 -0400)
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

sapi/cli/tests/upload_2G.phpt

index b9867f22d9bfe8847f47a2f60bbeda6af542b1a3..81258da1d38391592a98dd06f4fae70180792833 100644 (file)
@@ -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');
 }