mirror of
https://github.com/php/php-src.git
synced 2024-11-27 03:44:07 +08:00
Skip fpm tests not designed to be run as root
When running as root with TEST_FPM_RUN_AS_ROOT=1
This commit is contained in:
parent
af337ae47e
commit
87375fa2be
@ -3,6 +3,7 @@ FPM: bug68391 - Configuration inclusion in alphabetical order
|
||||
--SKIPIF--
|
||||
<?php
|
||||
include "skipif.inc";
|
||||
FPM\Tester::skipIfRoot();
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
@ -3,6 +3,7 @@ FPM: Process user setting ignored when FPM is not running as root
|
||||
--SKIPIF--
|
||||
<?php
|
||||
include "skipif.inc";
|
||||
FPM\Tester::skipIfRoot();
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
@ -3,6 +3,7 @@ FPM: UNIX socket owner and group settings can be numeric
|
||||
--SKIPIF--
|
||||
<?php
|
||||
include "skipif.inc";
|
||||
FPM\Tester::skipIfRoot();
|
||||
FPM\Tester::skipIfPosixNotLoaded();
|
||||
?>
|
||||
--FILE--
|
||||
|
@ -278,6 +278,16 @@ class Tester
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Skip if running as root.
|
||||
*/
|
||||
static public function skipIfRoot()
|
||||
{
|
||||
if (getmyuid() == 0) {
|
||||
die('skip running as root');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Skip if posix extension not loaded.
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user