]> granicus.if.org Git - php/commitdiff
Fix another broken test. root can read 0200 files.
authorRasmus Lerdorf <rasmus@php.net>
Mon, 29 Aug 2011 06:19:40 +0000 (06:19 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Mon, 29 Aug 2011 06:19:40 +0000 (06:19 +0000)
ext/sqlite3/tests/sqlite3_15_open_error.phpt

index 49168fd19b77609d3d594b14be06aa2e7e471af3..ea1ee429922d5c8eb95d6c7ac4ab21f93d3a8177 100644 (file)
@@ -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 {