zoe             Thu Jun 14 15:40:06 2007 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src/ext/standard/tests/file    mkdir_rmdir_variation.phpt 
                                        is_writable_variation.phpt 
                                        is_readable_variation.phpt 
                                        is_executable_basic.phpt 
                                        is_executable_variation.phpt 
                                        is_writable_basic.phpt 
                                        is_readable_basic.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/mkdir_rmdir_variation.phpt?r1=1.1.2.1&r2=1.1.2.2&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.1.2.1 
php-src/ext/standard/tests/file/mkdir_rmdir_variation.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/mkdir_rmdir_variation.phpt:1.1.2.1  Tue Jun 
 5 09:10:50 2007
+++ php-src/ext/standard/tests/file/mkdir_rmdir_variation.phpt  Thu Jun 14 
15:40:06 2007
@@ -5,6 +5,16 @@
 if (substr(PHP_OS, 0, 3) == 'WIN') {
     die('skip.. only on 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.2.2&r2=1.1.2.3&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.2.2 
php-src/ext/standard/tests/file/is_writable_variation.phpt:1.1.2.3
--- php-src/ext/standard/tests/file/is_writable_variation.phpt:1.1.2.2  Wed Jun 
 6 12:53:58 2007
+++ php-src/ext/standard/tests/file/is_writable_variation.phpt  Thu Jun 14 
15:40:06 2007
@@ -4,7 +4,17 @@
 <?php
 if (substr(PHP_OS, 0, 3) == 'WIN') {
     die('skip.. only on 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.2.2&r2=1.1.2.3&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.2.2 
php-src/ext/standard/tests/file/is_readable_variation.phpt:1.1.2.3
--- php-src/ext/standard/tests/file/is_readable_variation.phpt:1.1.2.2  Wed Jun 
 6 12:53:58 2007
+++ php-src/ext/standard/tests/file/is_readable_variation.phpt  Thu Jun 14 
15:40:06 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_basic.phpt?r1=1.1.2.1&r2=1.1.2.2&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.1.2.1 
php-src/ext/standard/tests/file/is_executable_basic.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/is_executable_basic.phpt:1.1.2.1    Tue Jun 
 5 09:10:50 2007
+++ php-src/ext/standard/tests/file/is_executable_basic.phpt    Thu Jun 14 
15:40:06 2007
@@ -5,6 +5,17 @@
 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.2.2&r2=1.1.2.3&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.2.2 
php-src/ext/standard/tests/file/is_executable_variation.phpt:1.1.2.3
--- php-src/ext/standard/tests/file/is_executable_variation.phpt:1.1.2.2        
Wed Jun  6 12:53:58 2007
+++ php-src/ext/standard/tests/file/is_executable_variation.phpt        Thu Jun 
14 15:40:06 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.1.2.1&r2=1.1.2.2&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.1.2.1 
php-src/ext/standard/tests/file/is_writable_basic.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/is_writable_basic.phpt:1.1.2.1      Tue Jun 
 5 09:10:50 2007
+++ php-src/ext/standard/tests/file/is_writable_basic.phpt      Thu Jun 14 
15:40:06 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.1.2.1&r2=1.1.2.2&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.1.2.1 
php-src/ext/standard/tests/file/is_readable_basic.phpt:1.1.2.2
--- php-src/ext/standard/tests/file/is_readable_basic.phpt:1.1.2.1      Tue Jun 
 5 09:10:50 2007
+++ php-src/ext/standard/tests/file/is_readable_basic.phpt      Thu Jun 14 
15:40:06 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

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to