cvs: php-src /ext/standard/tests/file unlink_variation1.phpt
| From: | Raghubansh Kumar | Date: | Mon, 20 Aug 2007 04:08:15 +0000 |
| Subject: | cvs: php-src /ext/standard/tests/file unlink_variation1.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-45933@lists.php.net to get a copy of this message | ||
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