From: Zoe Slattery Date: Fri, 20 Mar 2009 09:09:34 +0000 (+0000) Subject: added skipif for root X-Git-Tag: php-5.4.0alpha1~191^2~4088 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ec3ee30a75e4e65e876cfeb322003bbd84b103db;p=php added skipif for root --- diff --git a/ext/standard/tests/file/is_executable_variation2.phpt b/ext/standard/tests/file/is_executable_variation2.phpt index 8deba2b65b..d6c683b776 100644 --- a/ext/standard/tests/file/is_executable_variation2.phpt +++ b/ext/standard/tests/file/is_executable_variation2.phpt @@ -5,6 +5,17 @@ Test is_executable() function: usage variations - file/dir with diff. perms if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip not for windows'); } +// Skip if being run by root +$filename = dirname(__FILE__)."/is_readable_root_check.tmp"; +$fp = fopen($filename, 'w'); +fclose($fp); +if(fileowner($filename) == 0) { + unlink ($filename); + die('skip cannot be run as root'); +} + +unlink($filename); + ?> --FILE-- --FILE-- --FILE-- --FILE-- --FILE--