svn: /php/php-src/ branches/PHP_5_3/ext/sqlite3/tests/sqlite3_15_open_error.phpt branches/PHP_5_4/ext/sqlite3/tests/sqlite3_15_open_error.phpt
trunk/ext/sqlite3/tests/sqlite3_15_open_error.phpt
| From: | Rasmus Lerdorf | Date: | Mon, 29 Aug 2011 06:19:40 +0000 |
| Subject: | svn: /php/php-src/ branches/PHP_5_3/ext/sqlite3/tests/sqlite3_15_open_error.phpt branches/PHP_5_4/ext/sqlite3/tests/sqlite3_15_open_error.phpt trunk/ext/sqlite3/tests/sqlite3_15_open_error.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-65993@lists.php.net to get a copy of this message | ||
rasmus Mon, 29 Aug 2011 06:19:40 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=315674
Log:
Fix another broken test. root can read 0200 files.
Changed paths:
U php/php-src/branches/PHP_5_3/ext/sqlite3/tests/sqlite3_15_open_error.phpt
U php/php-src/branches/PHP_5_4/ext/sqlite3/tests/sqlite3_15_open_error.phpt
U php/php-src/trunk/ext/sqlite3/tests/sqlite3_15_open_error.phpt
Modified: php/php-src/branches/PHP_5_3/ext/sqlite3/tests/sqlite3_15_open_error.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/sqlite3/tests/sqlite3_15_open_error.phpt 2011-08-29 05:52:33
UTC (rev 315673)
+++ php/php-src/branches/PHP_5_3/ext/sqlite3/tests/sqlite3_15_open_error.phpt 2011-08-29 06:19:40
UTC (rev 315674)
@@ -1,7 +1,12 @@
--TEST--
SQLite3::open error test
--SKIPIF--
-<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
+<?php
+require_once(dirname(__FILE__) . '/skipif.inc');
+if (posix_geteuid() == 0) {
+ die('SKIP Cannot run test as root.');
+}
+?>
--FILE--
<?php
$unreadable = dirname(__FILE__) . '/unreadable.db';
Modified: php/php-src/branches/PHP_5_4/ext/sqlite3/tests/sqlite3_15_open_error.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/ext/sqlite3/tests/sqlite3_15_open_error.phpt 2011-08-29 05:52:33
UTC (rev 315673)
+++ php/php-src/branches/PHP_5_4/ext/sqlite3/tests/sqlite3_15_open_error.phpt 2011-08-29 06:19:40
UTC (rev 315674)
@@ -1,10 +1,15 @@
--TEST--
SQLite3::open error test
--SKIPIF--
-<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
+<?php
+require_once(__DIR__ . '/skipif.inc');
+if (posix_geteuid() == 0) {
+ die('SKIP Cannot run test as root.');
+}
+?>
--FILE--
<?php
-$unreadable = dirname(__FILE__) . '/unreadable.db';
+$unreadable = __DIR__ . '/unreadable.db';
touch($unreadable);
chmod($unreadable, 0200);
try {
Modified: php/php-src/trunk/ext/sqlite3/tests/sqlite3_15_open_error.phpt
===================================================================
--- php/php-src/trunk/ext/sqlite3/tests/sqlite3_15_open_error.phpt 2011-08-29 05:52:33 UTC (rev
315673)
+++ php/php-src/trunk/ext/sqlite3/tests/sqlite3_15_open_error.phpt 2011-08-29 06:19:40 UTC (rev
315674)
@@ -1,10 +1,15 @@
--TEST--
SQLite3::open error test
--SKIPIF--
-<?php require_once(dirname(__FILE__) . '/skipif.inc'); ?>
+<?php
+require_once(__DIR__ . '/skipif.inc');
+if (posix_geteuid() == 0) {
+ die('SKIP Cannot run test as root.');
+}
+?>
--FILE--
<?php
-$unreadable = dirname(__FILE__) . '/unreadable.db';
+$unreadable = __DIR__ . '/unreadable.db';
touch($unreadable);
chmod($unreadable, 0200);
try {