cvs: php-src /ext/standard/tests/file is_executable_basic.phpt is_executable_variation.phpt is_readable_basic.phpt is_readable_variation.phpt
is_writable_basic.phpt is_writable_variation.phpt mkdir_rmdir_variation.phpt

From: Date: Thu, 14 Jun 2007 16:15:51 +0000
Subject: cvs: php-src /ext/standard/tests/file is_executable_basic.phpt is_executable_variation.phpt is_readable_basic.phpt is_readable_variation.phpt
is_writable_basic.phpt is_writable_variation.phpt mkdir_rmdir_variation.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-44812@lists.php.net to get a copy of this message
zoe Thu Jun 14 16:15:51 2007 UTC Modified files: /php-src/ext/standard/tests/file is_executable_basic.phpt is_executable_variation.phpt is_writable_basic.phpt is_readable_basic.phpt mkdir_rmdir_variation.phpt is_writable_variation.phpt is_readable_variation.phpt Log: Tests are not valid if run by root - adding check to skip is user is root. http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_executable_basic.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/standard/tests/file/is_executable_basic.phpt diff -u php-src/ext/standard/tests/file/is_executable_basic.phpt:1.2 php-src/ext/standard/tests/file/is_executable_basic.phpt:1.3 --- php-src/ext/standard/tests/file/is_executable_basic.phpt:1.2 Tue Jun 5 09:20:17 2007 +++ php-src/ext/standard/tests/file/is_executable_basic.phpt Thu Jun 14 16:15:50 2007 @@ -5,6 +5,16 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. only for LINUX'); } +// Skip if being run by root (files are always readable, writeable and executable) +$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\n'); +} + +unlink($filename); ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_executable_variation.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/file/is_executable_variation.phpt diff -u php-src/ext/standard/tests/file/is_executable_variation.phpt:1.1 php-src/ext/standard/tests/file/is_executable_variation.phpt:1.2 --- php-src/ext/standard/tests/file/is_executable_variation.phpt:1.1 Wed Jun 6 12:50:06 2007 +++ php-src/ext/standard/tests/file/is_executable_variation.phpt Thu Jun 14 16:15:50 2007 @@ -5,6 +5,16 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. only for LINUX'); } +// Skip if being run by root (files are always readable, writeable and executable) +$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\n'); +} + +unlink($filename); ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_writable_basic.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/standard/tests/file/is_writable_basic.phpt diff -u php-src/ext/standard/tests/file/is_writable_basic.phpt:1.2 php-src/ext/standard/tests/file/is_writable_basic.phpt:1.3 --- php-src/ext/standard/tests/file/is_writable_basic.phpt:1.2 Tue Jun 5 09:20:17 2007 +++ php-src/ext/standard/tests/file/is_writable_basic.phpt Thu Jun 14 16:15:50 2007 @@ -1,5 +1,18 @@ --TEST-- Test is_writable() and its alias is_writeable() function: basic functionality +--SKIPIF-- +<?php +// Skip if being run by root (files are always readable, writeable and executable) +$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\n'); +} + +unlink($filename); +?> --FILE-- <?php /* Prototype: bool is_writable ( string $filename ); http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_readable_basic.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/standard/tests/file/is_readable_basic.phpt diff -u php-src/ext/standard/tests/file/is_readable_basic.phpt:1.2 php-src/ext/standard/tests/file/is_readable_basic.phpt:1.3 --- php-src/ext/standard/tests/file/is_readable_basic.phpt:1.2 Tue Jun 5 09:20:17 2007 +++ php-src/ext/standard/tests/file/is_readable_basic.phpt Thu Jun 14 16:15:50 2007 @@ -5,6 +5,16 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. only for LINUX'); } +// Skip if being run by root (files are always readable, writeable and executable) +$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\n'); +} + +unlink($filename); ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/mkdir_rmdir_variation.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/ext/standard/tests/file/mkdir_rmdir_variation.phpt diff -u php-src/ext/standard/tests/file/mkdir_rmdir_variation.phpt:1.2 php-src/ext/standard/tests/file/mkdir_rmdir_variation.phpt:1.3 --- php-src/ext/standard/tests/file/mkdir_rmdir_variation.phpt:1.2 Tue Jun 5 09:20:17 2007 +++ php-src/ext/standard/tests/file/mkdir_rmdir_variation.phpt Thu Jun 14 16:15:50 2007 @@ -5,6 +5,16 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. only for LINUX'); } +// Skip if being run by root (files are always readable, writeable and executable) +$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\n'); +} + +unlink($filename); ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_writable_variation.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/file/is_writable_variation.phpt diff -u php-src/ext/standard/tests/file/is_writable_variation.phpt:1.1 php-src/ext/standard/tests/file/is_writable_variation.phpt:1.2 --- php-src/ext/standard/tests/file/is_writable_variation.phpt:1.1 Wed Jun 6 12:50:06 2007 +++ php-src/ext/standard/tests/file/is_writable_variation.phpt Thu Jun 14 16:15:50 2007 @@ -5,6 +5,16 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. only for LINUX'); } +// Skip if being run by root (files are always readable, writeable and executable) +$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\n'); +} + +unlink($filename); ?> --FILE-- <?php http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/is_readable_variation.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/ext/standard/tests/file/is_readable_variation.phpt diff -u php-src/ext/standard/tests/file/is_readable_variation.phpt:1.1 php-src/ext/standard/tests/file/is_readable_variation.phpt:1.2 --- php-src/ext/standard/tests/file/is_readable_variation.phpt:1.1 Wed Jun 6 12:50:06 2007 +++ php-src/ext/standard/tests/file/is_readable_variation.phpt Thu Jun 14 16:15:50 2007 @@ -5,6 +5,16 @@ if (substr(PHP_OS, 0, 3) == 'WIN') { die('skip.. only for LINUX'); } +// Skip if being run by root (files are always readable, writeable and executable) +$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\n'); +} + +unlink($filename); ?> --FILE-- <?php

« previous php.cvs (#44812) next »