From a3469146d49027fe0260c7d3c642c4b37a5e032f Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 24 Oct 2019 12:19:24 +0200 Subject: Use posix_getuid() to check for root in pcntl_setpriority() test Using SUDO_USER doesn't seem to work on Travis ARM CI -- I guess that sudo might be in use without the target being root. --- ext/pcntl/tests/pcntl_setpriority_basic.phpt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'ext') diff --git a/ext/pcntl/tests/pcntl_setpriority_basic.phpt b/ext/pcntl/tests/pcntl_setpriority_basic.phpt index 1f03fb2dc9..235b0ec9ce 100644 --- a/ext/pcntl/tests/pcntl_setpriority_basic.phpt +++ b/ext/pcntl/tests/pcntl_setpriority_basic.phpt @@ -5,14 +5,14 @@ Er Galvão Abbott galvao@galvao.eti.br # TestFest 2017 PHPRS PHP UG 2017-10-31 --SKIPIF-- --FILE-- -- cgit v1.2.1 From 8fd30aae16d296695d50b16db079ead430c78c67 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 24 Oct 2019 12:28:43 +0200 Subject: Increase FD used in php://fd test --- ext/standard/tests/file/php_fd_wrapper_04.phpt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ext') diff --git a/ext/standard/tests/file/php_fd_wrapper_04.phpt b/ext/standard/tests/file/php_fd_wrapper_04.phpt index 2b3a69ce1a..76a1e609bc 100644 --- a/ext/standard/tests/file/php_fd_wrapper_04.phpt +++ b/ext/standard/tests/file/php_fd_wrapper_04.phpt @@ -2,10 +2,10 @@ php://fd wrapper: invalid file descriptor --FILE-- Date: Thu, 24 Oct 2019 14:26:17 +0200 Subject: Don't test "blocks" in lstat_stat_variation7.phpt This stat property seems to be somewhat unreliable depending on the filesystem. On Travis ARM64 CI a much larger payload is required to get this value to increase. --- ext/standard/tests/file/lstat_stat_variation7.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext') diff --git a/ext/standard/tests/file/lstat_stat_variation7.phpt b/ext/standard/tests/file/lstat_stat_variation7.phpt index b74dff63f7..1ec0999f6c 100644 --- a/ext/standard/tests/file/lstat_stat_variation7.phpt +++ b/ext/standard/tests/file/lstat_stat_variation7.phpt @@ -36,7 +36,7 @@ $new_stat = stat($file_name); var_dump( compare_self_stat($old_stat) ); var_dump( compare_self_stat($new_stat) ); // compare the stats -$comp_arr = array(7, 12, 'size', 'blocks'); +$comp_arr = array(7, 'size'); var_dump(compare_stats($old_stat, $new_stat, $comp_arr, "<")); clearstatcache(); -- cgit v1.2.1 From edf7346810292967f41e60fb1474e09e1558862d Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Thu, 24 Oct 2019 14:32:11 +0200 Subject: Skip large ftruncate test if large files not supported --- ext/standard/tests/file/ftruncate_bug76422.phpt | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ext') diff --git a/ext/standard/tests/file/ftruncate_bug76422.phpt b/ext/standard/tests/file/ftruncate_bug76422.phpt index 4f434d324a..77334545a9 100644 --- a/ext/standard/tests/file/ftruncate_bug76422.phpt +++ b/ext/standard/tests/file/ftruncate_bug76422.phpt @@ -17,6 +17,15 @@ if (false === $file_handle) { die('Cannot open test file :/'); } +/* Check if ftruncate() with 2GB works. If it doesn't, it's likely that large files are + * generally not supported (EFBIG). */ +$truncate_offset = 2 * 1024 * 1024 * 1024; +$ftruncate_result = ftruncate($file_handle, $truncate_offset); +if (false === $ftruncate_result) { + var_dump(true); + return; +} + $truncate_offset = 4 * 1024 * 1024 * 1024 + 1; $ftruncate_result = ftruncate($file_handle, $truncate_offset); -- cgit v1.2.1