kraghuba Mon Aug 20 04:08:15 2007 UTC
Modified files:
/php-src/ext/standard/tests/file unlink_variation1.phpt
Log:
fix test: skip if user is root
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/unlink_variation1.phpt?r1=1.1&r2=1.2&diff_format=u
Index: php-src/ext/standard/tests/file/unlink_variation1.phpt
diff -u php-src/ext/standard/tests/file/unlink_variation1.phpt:1.1
php-src/ext/standard/tests/file/unlink_variation1.phpt:1.2
--- php-src/ext/standard/tests/file/unlink_variation1.phpt:1.1 Wed Jul 18
04:57:25 2007
+++ php-src/ext/standard/tests/file/unlink_variation1.phpt Mon Aug 20
04:08:15 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__)."/unlink_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