Browse Source

added skip if for root

experimental/5.3-FPM
Zoe Slattery 18 years ago
parent
commit
c71cc4eda8
  1. 10
      ext/standard/tests/file/is_executable_variation2.phpt
  2. 9
      ext/standard/tests/file/is_readable_variation2.phpt
  3. 10
      ext/standard/tests/file/is_writable_variation2.phpt
  4. 9
      ext/standard/tests/file/lchown_error.phpt
  5. 9
      ext/standard/tests/file/tempnam_variation4.phpt

10
ext/standard/tests/file/is_executable_variation2.phpt

@ -5,6 +5,16 @@ Test is_executable() function: usage variations - file/dir with diff. perms
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip not for windows');
}
// Skip if being run by root
$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');
}
unlink($filename);
?>
--FILE--
<?php

9
ext/standard/tests/file/is_readable_variation2.phpt

@ -5,6 +5,15 @@ Test is_readable() function: usage variations - file/dir with diff. perms
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip not for windows');
}
// Skip if being run by root
$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');
}
unlink($filename);
?>
--FILE--
<?php

10
ext/standard/tests/file/is_writable_variation2.phpt

@ -5,6 +5,16 @@ Test is_writable() and its alias is_writeable() function: usage variations - fil
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip.. only on LINUX');
}
// Skip if being run by root
$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');
}
unlink ($filename);
?>
--FILE--
<?php

9
ext/standard/tests/file/lchown_error.phpt

@ -4,6 +4,15 @@ Test lchown() function : error functionality
<?php
if (substr(PHP_OS, 0, 3) == 'WIN') die('skip no windows support');
if (!function_exists("posix_getuid")) die("skip no posix_getuid()");
// Skip if being run by root
$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');
}
unlink($filename);
?>
--FILE--
<?php

9
ext/standard/tests/file/tempnam_variation4.phpt

@ -5,6 +5,15 @@ Test tempnam() function: usage variations - permissions(0000 to 0777) of dir
if (substr(PHP_OS, 0, 3) == 'WIN') {
die('skip Not valid for Windows');
}
// Skip if being run by root
$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');
}
unlink($filename);
?>
--FILE--
<?php

Loading…
Cancel
Save