summaryrefslogtreecommitdiff
path: root/ext/pcntl
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pcntl')
-rw-r--r--ext/pcntl/tests/pcntl_unshare_01.phpt3
-rw-r--r--ext/pcntl/tests/pcntl_unshare_02.phpt3
-rw-r--r--ext/pcntl/tests/pcntl_unshare_03.phpt3
3 files changed, 6 insertions, 3 deletions
diff --git a/ext/pcntl/tests/pcntl_unshare_01.phpt b/ext/pcntl/tests/pcntl_unshare_01.phpt
index 815a3ce964..6debaace58 100644
--- a/ext/pcntl/tests/pcntl_unshare_01.phpt
+++ b/ext/pcntl/tests/pcntl_unshare_01.phpt
@@ -1,7 +1,7 @@
--TEST--
pcntl_unshare() with CLONE_NEWUSER
--SKIPIF--
-<?php
+<?php
if (!extension_loaded("pcntl")) die("skip");
if (!extension_loaded("posix")) die("skip posix extension not available");
if (!function_exists("pcntl_unshare")) die("skip pcntl_unshare is not available");
@@ -17,5 +17,6 @@ $olduid = posix_getuid();
pcntl_unshare(CLONE_NEWUSER);
$newuid = posix_getuid();
var_dump($olduid === $newuid);
+?>
--EXPECT--
bool(false)
diff --git a/ext/pcntl/tests/pcntl_unshare_02.phpt b/ext/pcntl/tests/pcntl_unshare_02.phpt
index cafd64dd96..7cc9341154 100644
--- a/ext/pcntl/tests/pcntl_unshare_02.phpt
+++ b/ext/pcntl/tests/pcntl_unshare_02.phpt
@@ -1,7 +1,7 @@
--TEST--
pcntl_unshare() with CLONE_NEWPID
--SKIPIF--
-<?php
+<?php
if (!extension_loaded("pcntl")) die("skip");
if (!extension_loaded("posix")) die("skip posix extension not available");
if (!function_exists("pcntl_unshare")) die("skip pcntl_unshare is not available");
@@ -29,6 +29,7 @@ if(!pcntl_fork()) {
var_dump(getmypid());
exit();
}
+?>
--EXPECTF--
int(%d)
int(1)
diff --git a/ext/pcntl/tests/pcntl_unshare_03.phpt b/ext/pcntl/tests/pcntl_unshare_03.phpt
index d69bd40d40..b1217b6300 100644
--- a/ext/pcntl/tests/pcntl_unshare_03.phpt
+++ b/ext/pcntl/tests/pcntl_unshare_03.phpt
@@ -1,7 +1,7 @@
--TEST--
pcntl_unshare() with CLONE_NEWNET
--SKIPIF--
-<?php
+<?php
if (!extension_loaded("pcntl")) die("skip");
if (!extension_loaded("posix")) die("skip posix extension not available");
if (!function_exists("pcntl_unshare")) die("skip pcntl_unshare is not available");
@@ -23,6 +23,7 @@ if(posix_getuid() !== 0) {
var_dump(gethostbyname('php.net'));
pcntl_unshare(CLONE_NEWNET);
var_dump(gethostbyname('php.net'));
+?>
--EXPECTF--
string(%d) %s
string(7) "php.net"