When running as root with TEST_FPM_RUN_AS_ROOT=1
--SKIPIF--
<?php
include "skipif.inc";
+FPM\Tester::skipIfRoot();
?>
--FILE--
<?php
--SKIPIF--
<?php
include "skipif.inc";
+FPM\Tester::skipIfRoot();
?>
--FILE--
<?php
--SKIPIF--
<?php
include "skipif.inc";
+FPM\Tester::skipIfRoot();
FPM\Tester::skipIfPosixNotLoaded();
?>
--FILE--
}
}
+ /**
+ * Skip if running as root.
+ */
+ static public function skipIfRoot()
+ {
+ if (getmyuid() == 0) {
+ die('skip running as root');
+ }
+ }
+
/**
* Skip if posix extension not loaded.
*/