summaryrefslogtreecommitdiff
path: root/ext/posix
diff options
context:
space:
mode:
Diffstat (limited to 'ext/posix')
-rw-r--r--ext/posix/config.m413
-rw-r--r--ext/posix/php_posix.h11
-rw-r--r--ext/posix/posix.c33
-rw-r--r--ext/posix/tests/posix_ctermid_error.phpt19
-rw-r--r--ext/posix/tests/posix_errno_variation2.phpt5
-rw-r--r--ext/posix/tests/posix_get_last_error_error.phpt31
-rw-r--r--ext/posix/tests/posix_getcwd_basic.phpt22
-rw-r--r--ext/posix/tests/posix_geteuid_error1.phpt37
-rw-r--r--ext/posix/tests/posix_getgid_error.phpt31
-rw-r--r--ext/posix/tests/posix_getgrgid_basic.phpt1
-rw-r--r--ext/posix/tests/posix_getgrgid_variation.phpt188
-rw-r--r--ext/posix/tests/posix_getgrgid_wrongparams.phpt28
-rw-r--r--ext/posix/tests/posix_getgrnam_basic.phpt28
-rw-r--r--ext/posix/tests/posix_getpgid_variation.phpt188
-rw-r--r--ext/posix/tests/posix_getpgrp_error.phpt31
-rw-r--r--ext/posix/tests/posix_getpid_error.phpt31
-rw-r--r--ext/posix/tests/posix_getppid_error.phpt31
-rw-r--r--ext/posix/tests/posix_getpwnam_basic_01.phpt32
-rw-r--r--ext/posix/tests/posix_getpwuid_variation.phpt188
-rw-r--r--ext/posix/tests/posix_getuid_error.phpt31
-rw-r--r--ext/posix/tests/posix_initgroups_basic.phpt22
-rw-r--r--ext/posix/tests/posix_kill_basic.phpt1
-rw-r--r--ext/posix/tests/posix_kill_variation1.phpt182
-rw-r--r--ext/posix/tests/posix_kill_variation2.phpt182
-rw-r--r--ext/posix/tests/posix_mkfifo_wrongparams.phpt21
-rw-r--r--ext/posix/tests/posix_seteuid_error.phpt32
-rw-r--r--ext/posix/tests/posix_seteuid_error2.phpt55
-rw-r--r--ext/posix/tests/posix_seteuid_variation1.phpt41
-rw-r--r--ext/posix/tests/posix_seteuid_variation3.phpt48
-rw-r--r--ext/posix/tests/posix_seteuid_variation6.phpt48
-rw-r--r--ext/posix/tests/posix_setgid_error.phpt32
-rw-r--r--ext/posix/tests/posix_setgid_variation1.phpt47
-rw-r--r--ext/posix/tests/posix_setgid_variation2.phpt1
-rw-r--r--ext/posix/tests/posix_setgid_variation3.phpt48
-rw-r--r--ext/posix/tests/posix_setgid_variation4.phpt1
-rw-r--r--ext/posix/tests/posix_setgid_variation5.phpt1
-rw-r--r--ext/posix/tests/posix_setgid_variation6.phpt58
-rw-r--r--ext/posix/tests/posix_setgid_variation7.phpt48
-rw-r--r--ext/posix/tests/posix_setuid_error.phpt35
-rw-r--r--ext/posix/tests/posix_setuid_error2.phpt55
-rw-r--r--ext/posix/tests/posix_setuid_variation1.phpt41
-rw-r--r--ext/posix/tests/posix_setuid_variation3.phpt48
-rw-r--r--ext/posix/tests/posix_setuid_variation6.phpt48
-rw-r--r--ext/posix/tests/posix_strerror_variation1.phpt181
-rw-r--r--ext/posix/tests/posix_times_error.phpt31
-rw-r--r--ext/posix/tests/posix_ttyname_error.phpt35
-rw-r--r--ext/posix/tests/posix_uname_error.phpt31
47 files changed, 93 insertions, 2259 deletions
diff --git a/ext/posix/config.m4 b/ext/posix/config.m4
index dccdcd69a4..e91041188a 100644
--- a/ext/posix/config.m4
+++ b/ext/posix/config.m4
@@ -1,15 +1,16 @@
-dnl config.m4 for extension posix
-
-PHP_ARG_ENABLE(posix,whether to enable POSIX-like functions,
-[ --disable-posix Disable POSIX-like functions], yes)
+PHP_ARG_ENABLE([posix],
+ [whether to enable POSIX-like functions],
+ [AS_HELP_STRING([--disable-posix],
+ [Disable POSIX-like functions])],
+ [yes])
if test "$PHP_POSIX" = "yes"; then
AC_DEFINE(HAVE_POSIX, 1, [whether to include POSIX-like functions])
- PHP_NEW_EXTENSION(posix, posix.c, $ext_shared)
+ PHP_NEW_EXTENSION(posix, posix.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
AC_CHECK_HEADERS([sys/mkdev.h sys/sysmacros.h])
- AC_CHECK_FUNCS(seteuid setegid setsid getsid setpgid getpgid ctermid mkfifo mknod setrlimit getrlimit getlogin getgroups makedev initgroups getpwuid_r getgrgid_r)
+ AC_CHECK_FUNCS(seteuid setegid setsid getsid getpgid ctermid mkfifo mknod setrlimit getrlimit getgroups makedev initgroups getgrgid_r)
AC_MSG_CHECKING([for working ttyname_r() implementation])
AC_RUN_IFELSE([AC_LANG_SOURCE([[
diff --git a/ext/posix/php_posix.h b/ext/posix/php_posix.h
index 6844568069..17d8b038c2 100644
--- a/ext/posix/php_posix.h
+++ b/ext/posix/php_posix.h
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -125,12 +125,13 @@ ZEND_BEGIN_MODULE_GLOBALS(posix)
int last_error;
ZEND_END_MODULE_GLOBALS(posix)
-#ifdef ZTS
-# define POSIX_G(v) TSRMG(posix_globals_id, zend_posix_globals *, v)
-#else
-# define POSIX_G(v) (posix_globals.v)
+#if defined(ZTS) && defined(COMPILE_DL_POSIX)
+ZEND_TSRMLS_CACHE_EXTERN()
#endif
+ZEND_EXTERN_MODULE_GLOBALS(posix)
+#define POSIX_G(v) ZEND_MODULE_GLOBALS_ACCESSOR(posix, v)
+
#else
#define posix_module_ptr NULL
diff --git a/ext/posix/posix.c b/ext/posix/posix.c
index 5a2f352e41..98dae1ca3c 100644
--- a/ext/posix/posix.c
+++ b/ext/posix/posix.c
@@ -2,7 +2,7 @@
+----------------------------------------------------------------------+
| PHP Version 7 |
+----------------------------------------------------------------------+
- | Copyright (c) 1997-2018 The PHP Group |
+ | Copyright (c) The PHP Group |
+----------------------------------------------------------------------+
| This source file is subject to version 3.01 of the PHP license, |
| that is bundled with this package in the file LICENSE, and is |
@@ -34,11 +34,6 @@
#endif
#include <sys/resource.h>
-
-#if defined(_GNU_SOURCE) && !defined(__USE_GNU)
-# define __USE_GNU
-#endif
-
#include <sys/utsname.h>
#include <sys/types.h>
#include <sys/stat.h>
@@ -329,6 +324,9 @@ static PHP_MINFO_FUNCTION(posix)
static PHP_GINIT_FUNCTION(posix) /* {{{ */
{
+#if defined(COMPILE_DL_POSIX) && defined(ZTS)
+ ZEND_TSRMLS_CACHE_UPDATE();
+#endif
posix_globals->last_error = 0;
}
/* }}} */
@@ -432,6 +430,9 @@ zend_module_entry posix_module_entry = {
/* }}} */
#ifdef COMPILE_DL_POSIX
+#ifdef ZTS
+ZEND_TSRMLS_CACHE_DEFINE()
+#endif
ZEND_GET_MODULE(posix)
#endif
@@ -997,8 +998,15 @@ int php_posix_group_to_array(struct group *g, zval *array_group) /* {{{ */
} else {
add_assoc_null(array_group, "passwd");
}
- for (count = 0; g->gr_mem[count] != NULL; count++) {
- add_next_index_string(&array_members, g->gr_mem[count]);
+ for (count = 0;; count++) {
+ /* gr_mem entries may be misaligned on macos. */
+ char *gr_mem;
+ memcpy(&gr_mem, &g->gr_mem[count], sizeof(char *));
+ if (!gr_mem) {
+ break;
+ }
+
+ add_next_index_string(&array_members, gr_mem);
}
zend_hash_str_update(Z_ARRVAL_P(array_group), "members", sizeof("members")-1, &array_members);
add_assoc_long(array_group, "gid", g->gr_gid);
@@ -1479,12 +1487,3 @@ PHP_FUNCTION(posix_initgroups)
}
/* }}} */
#endif
-
-/*
- * Local variables:
- * tab-width: 4
- * c-basic-offset: 4
- * End:
- * vim600: sw=4 ts=4 fdm=marker
- * vim<600: sw=4 ts=4
- */
diff --git a/ext/posix/tests/posix_ctermid_error.phpt b/ext/posix/tests/posix_ctermid_error.phpt
deleted file mode 100644
index a177f54578..0000000000
--- a/ext/posix/tests/posix_ctermid_error.phpt
+++ /dev/null
@@ -1,19 +0,0 @@
---TEST--
-Test function posix_ctermid() by calling it more than or less than its expected arguments
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---CREDITS--
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---FILE--
-<?php
-
-var_dump( posix_ctermid( 'foo' ) );
-
-?>
---EXPECTF--
-Warning: posix_ctermid() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
diff --git a/ext/posix/tests/posix_errno_variation2.phpt b/ext/posix/tests/posix_errno_variation2.phpt
index b0a21fed5f..2817334b28 100644
--- a/ext/posix/tests/posix_errno_variation2.phpt
+++ b/ext/posix/tests/posix_errno_variation2.phpt
@@ -13,7 +13,10 @@ if(!extension_loaded("pcntl")) print "skip pcntl extension not loaded";
<?php
echo "*** Test by calling function with pid error ***\n";
-posix_kill((2 ** 22) + 1, SIGKILL);
+// Don't rely on PCNTL extension being around
+$SIGKILL = 9;
+
+posix_kill((2 ** 22) + 1, $SIGKILL);
var_dump(posix_errno());
?>
diff --git a/ext/posix/tests/posix_get_last_error_error.phpt b/ext/posix/tests/posix_get_last_error_error.phpt
deleted file mode 100644
index 5400b61598..0000000000
--- a/ext/posix/tests/posix_get_last_error_error.phpt
+++ /dev/null
@@ -1,31 +0,0 @@
---TEST--
-Test posix_get_last_error() function : error conditions
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---FILE--
-<?php
-/* Prototype : proto int posix_get_last_error(void)
- * Description: Retrieve the error number set by the last posix function which failed.
- * Source code: ext/posix/posix.c
- * Alias to functions: posix_errno
- */
-
-echo "*** Testing posix_get_last_error() : error conditions ***\n";
-
-// One argument
-echo "\n-- Testing posix_get_last_error() function with one argument --\n";
-$extra_arg = 10;
-var_dump( posix_get_last_error($extra_arg) );
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing posix_get_last_error() : error conditions ***
-
--- Testing posix_get_last_error() function with one argument --
-
-Warning: posix_get_last_error() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-Done
diff --git a/ext/posix/tests/posix_getcwd_basic.phpt b/ext/posix/tests/posix_getcwd_basic.phpt
deleted file mode 100644
index 9186f5e270..0000000000
--- a/ext/posix/tests/posix_getcwd_basic.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-posix_getcwd(): Basic tests
---SKIPIF--
-<?php
-if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
-if (!function_exists('posix_getcwd')) die('skip posix_getcwd() not found');
-?>
---FILE--
-<?php
-echo "Basic test of POSIX posix_getcwd function\n";
-var_dump(posix_getcwd());
-var_dump(posix_getcwd(1));
-
-?>
-===DONE===
---EXPECTF--
-Basic test of POSIX posix_getcwd function
-string(%d) "%s"
-
-Warning: posix_getcwd() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-===DONE===
diff --git a/ext/posix/tests/posix_geteuid_error1.phpt b/ext/posix/tests/posix_geteuid_error1.phpt
deleted file mode 100644
index 941005f028..0000000000
--- a/ext/posix/tests/posix_geteuid_error1.phpt
+++ /dev/null
@@ -1,37 +0,0 @@
---TEST--
-Test function posix_geteuid() by calling it more than or less than its expected arguments
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---CREDITS--
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---FILE--
-<?php
-echo "*** Test by calling method or function with incorrect numbers of arguments ***\n";
-
-$extra_args = array( 12312, 2 => '1234', 'string' => 'string' );
-
-var_dump( posix_geteuid( $extra_args ));
-foreach ( $extra_args as $arg )
-{
- var_dump(posix_geteuid( $arg ));
-}
-
-?>
---EXPECTF--
-*** Test by calling method or function with incorrect numbers of arguments ***
-
-Warning: posix_geteuid() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: posix_geteuid() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: posix_geteuid() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-
-Warning: posix_geteuid() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
diff --git a/ext/posix/tests/posix_getgid_error.phpt b/ext/posix/tests/posix_getgid_error.phpt
deleted file mode 100644
index f02d07413a..0000000000
--- a/ext/posix/tests/posix_getgid_error.phpt
+++ /dev/null
@@ -1,31 +0,0 @@
---TEST--
-Test posix_getgid() function : error conditions
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---FILE--
-<?php
-/* Prototype : proto int posix_getgid(void)
- * Description: Get the current group id (POSIX.1, 4.2.1)
- * Source code: ext/posix/posix.c
- * Alias to functions:
- */
-
-echo "*** Testing posix_getgid() : error conditions ***\n";
-
-// One argument
-echo "\n-- Testing posix_getgid() function with one argument --\n";
-$extra_arg = 10;
-var_dump( posix_getgid($extra_arg) );
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing posix_getgid() : error conditions ***
-
--- Testing posix_getgid() function with one argument --
-
-Warning: posix_getgid() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-Done
diff --git a/ext/posix/tests/posix_getgrgid_basic.phpt b/ext/posix/tests/posix_getgrgid_basic.phpt
index 5759d0034d..61ec8ab0fc 100644
--- a/ext/posix/tests/posix_getgrgid_basic.phpt
+++ b/ext/posix/tests/posix_getgrgid_basic.phpt
@@ -27,4 +27,3 @@ Array
[gid] => %d
)
===DONE===
-
diff --git a/ext/posix/tests/posix_getgrgid_variation.phpt b/ext/posix/tests/posix_getgrgid_variation.phpt
deleted file mode 100644
index 9bf807ad14..0000000000
--- a/ext/posix/tests/posix_getgrgid_variation.phpt
+++ /dev/null
@@ -1,188 +0,0 @@
---TEST--
-Test posix_getgrgid() function : usage variations - parameter types
---SKIPIF--
-<?php
- PHP_INT_SIZE == 4 or die("skip - 32-bit only");
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---FILE--
-<?php
-/* Prototype : proto array posix_getgrgid(long gid)
- * Description: Group database access (POSIX.1, 9.2.1)
- * Source code: ext/posix/posix.c
- * Alias to functions:
- */
-
-echo "*** Testing posix_getgrgid() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // object data
- new stdclass(),
-);
-
-// loop through each element of the array for gid
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- $result = posix_getgrgid($value);
- if ((is_array($result) && (count($result) == 4))
- ||
- ($result === false)) {
- echo "valid output\n";
- } else {
- var_dump($result);
- }
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing posix_getgrgid() : usage variations ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
-Arg value 10.5
-valid output
-
-Arg value -10.5
-valid output
-
-Arg value 101234567000
-
-Warning: posix_getgrgid() expects parameter 1 to be int, float given in %s on line %d
-valid output
-
-Arg value 1.07654321E-9
-valid output
-
-Arg value 0.5
-valid output
-
-Notice: Array to string conversion in %sposix_getgrgid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getgrgid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getgrgid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getgrgid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getgrgid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getgrgid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getgrgid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getgrgid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getgrgid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getgrgid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Arg value
-valid output
-
-Arg value
-valid output
-
-Arg value 1
-valid output
-
-Arg value
-valid output
-
-Arg value 1
-valid output
-
-Arg value
-valid output
-
-Arg value
-
-Warning: posix_getgrgid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value
-
-Warning: posix_getgrgid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value string
-
-Warning: posix_getgrgid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value string
-
-Warning: posix_getgrgid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value
-valid output
-
-Arg value
-valid output
-
-Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d
diff --git a/ext/posix/tests/posix_getgrgid_wrongparams.phpt b/ext/posix/tests/posix_getgrgid_wrongparams.phpt
deleted file mode 100644
index d1ff77d193..0000000000
--- a/ext/posix/tests/posix_getgrgid_wrongparams.phpt
+++ /dev/null
@@ -1,28 +0,0 @@
---TEST--
-Test parameters on posix_getgrgid().
---CREDITS--
-Till Klampaeckel, till@php.net
-TestFest Berlin 2009
---SKIPIF--
-<?php
-if (!extension_loaded('posix')) {
- die('SKIP The posix extension is not loaded.');
-}
-if (strtolower(PHP_OS) == 'darwin') {
- die('SKIP This test doesn\'t run on MacOSX/Darwin.');
-}
---FILE--
-<?php
-$gid = PHP_INT_MAX; // obscene high gid
-var_dump(posix_getgrgid($gid));
-var_dump(posix_getgrgid(-1));
-var_dump(posix_getgrgid());
-?>
-===DONE===
---EXPECTF--
-bool(false)
-bool(false)
-
-Warning: posix_getgrgid() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/posix/tests/posix_getgrnam_basic.phpt b/ext/posix/tests/posix_getgrnam_basic.phpt
new file mode 100644
index 0000000000..2408c62850
--- /dev/null
+++ b/ext/posix/tests/posix_getgrnam_basic.phpt
@@ -0,0 +1,28 @@
+--TEST--
+Test posix_getgrnam() function : basic functionality
+--SKIPIF--
+<?php
+ if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
+ if (!posix_getgroups()) die('skip - groups unavailable (ci)');
+?>
+--FILE--
+<?php
+ $groupid = posix_getgroups()[0];
+ $group = posix_getgrgid($groupid);
+ $groupinfo = posix_getgrnam($group["name"]);
+ var_dump($groupinfo);
+ $groupinfo = posix_getgrnam("");
+ var_dump($groupinfo);
+?>
+--EXPECTF--
+array(4) {
+ ["name"]=>
+ string(%d) "%s"
+ ["passwd"]=>
+ string(1) "%s"
+ ["members"]=>
+%a
+ ["gid"]=>
+ int(%d)
+}
+bool(false)
diff --git a/ext/posix/tests/posix_getpgid_variation.phpt b/ext/posix/tests/posix_getpgid_variation.phpt
deleted file mode 100644
index 6a5e7fd5a9..0000000000
--- a/ext/posix/tests/posix_getpgid_variation.phpt
+++ /dev/null
@@ -1,188 +0,0 @@
---TEST--
-Test posix_getpgid() function : variation
---SKIPIF--
-<?php
-PHP_INT_SIZE == 4 or die("skip - 32-bit only");
-if((!extension_loaded("posix")) || (!function_exists("posix_getpgid"))) {
- print "skip - POSIX extension not loaded or posix_getpgid() does not exist";
-}
-?>
---FILE--
-<?php
-/* Prototype : proto int posix_getpgid(void)
- * Description: Get the process group id of the specified process (This is not a POSIX function, but a SVR4ism, so we compile conditionally)
- * Source code: ext/posix/posix.c
- * Alias to functions:
- */
-
-echo "*** Testing posix_getpgid() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // object data
- new stdclass(),
-);
-
-// loop through each element of the array for gid
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- $result = posix_getpgid($value);
- if (is_int($result) || $result === false) {
- echo "valid output\n";
- } else {
- var_dump($result);
- }
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing posix_getpgid() : usage variations ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
-Arg value 10.5
-valid output
-
-Arg value -10.5
-valid output
-
-Arg value 101234567000
-
-Warning: posix_getpgid() expects parameter 1 to be int, float given in %s on line %d
-valid output
-
-Arg value 1.07654321E-9
-valid output
-
-Arg value 0.5
-valid output
-
-Notice: Array to string conversion in %sposix_getpgid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getpgid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getpgid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getpgid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getpgid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getpgid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getpgid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getpgid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getpgid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getpgid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Arg value
-valid output
-
-Arg value
-valid output
-
-Arg value 1
-valid output
-
-Arg value
-valid output
-
-Arg value 1
-valid output
-
-Arg value
-valid output
-
-Arg value
-
-Warning: posix_getpgid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value
-
-Warning: posix_getpgid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value string
-
-Warning: posix_getpgid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value string
-
-Warning: posix_getpgid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value
-valid output
-
-Arg value
-valid output
-
-Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d
diff --git a/ext/posix/tests/posix_getpgrp_error.phpt b/ext/posix/tests/posix_getpgrp_error.phpt
deleted file mode 100644
index 6076d688c9..0000000000
--- a/ext/posix/tests/posix_getpgrp_error.phpt
+++ /dev/null
@@ -1,31 +0,0 @@
---TEST--
-Test posix_getpgrp() function : error conditions
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---FILE--
-<?php
-/* Prototype : proto int posix_getpgrp(void)
- * Description: Get current process group id (POSIX.1, 4.3.1)
- * Source code: ext/posix/posix.c
- * Alias to functions:
- */
-
-echo "*** Testing posix_getpgrp() : error conditions ***\n";
-
-// One argument
-echo "\n-- Testing posix_getpgrp() function with one argument --\n";
-$extra_arg = 10;
-var_dump( posix_getpgrp($extra_arg) );
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing posix_getpgrp() : error conditions ***
-
--- Testing posix_getpgrp() function with one argument --
-
-Warning: posix_getpgrp() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-Done
diff --git a/ext/posix/tests/posix_getpid_error.phpt b/ext/posix/tests/posix_getpid_error.phpt
deleted file mode 100644
index 46131b7c9d..0000000000
--- a/ext/posix/tests/posix_getpid_error.phpt
+++ /dev/null
@@ -1,31 +0,0 @@
---TEST--
-Test posix_getpid() function : error conditions
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---FILE--
-<?php
-/* Prototype : proto int posix_getpid(void)
- * Description: Get the current process id (POSIX.1, 4.1.1)
- * Source code: ext/posix/posix.c
- * Alias to functions:
- */
-
-echo "*** Testing posix_getpid() : error conditions ***\n";
-
-// One argument
-echo "\n-- Testing posix_getpid() function with one argument --\n";
-$extra_arg = 10;
-var_dump( posix_getpid($extra_arg) );
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing posix_getpid() : error conditions ***
-
--- Testing posix_getpid() function with one argument --
-
-Warning: posix_getpid() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-Done
diff --git a/ext/posix/tests/posix_getppid_error.phpt b/ext/posix/tests/posix_getppid_error.phpt
deleted file mode 100644
index d962182ba4..0000000000
--- a/ext/posix/tests/posix_getppid_error.phpt
+++ /dev/null
@@ -1,31 +0,0 @@
---TEST--
-Test posix_getppid() function : error conditions
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---FILE--
-<?php
-/* Prototype : proto int posix_getppid(void)
- * Description: Get the parent process id (POSIX.1, 4.1.1)
- * Source code: ext/posix/posix.c
- * Alias to functions:
- */
-
-echo "*** Testing posix_getppid() : error conditions ***\n";
-
-// One argument
-echo "\n-- Testing posix_getppid() function with one argument --\n";
-$extra_arg = 10;
-var_dump( posix_getppid($extra_arg) );
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing posix_getppid() : error conditions ***
-
--- Testing posix_getppid() function with one argument --
-
-Warning: posix_getppid() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-Done
diff --git a/ext/posix/tests/posix_getpwnam_basic_01.phpt b/ext/posix/tests/posix_getpwnam_basic_01.phpt
new file mode 100644
index 0000000000..e45b6fa95d
--- /dev/null
+++ b/ext/posix/tests/posix_getpwnam_basic_01.phpt
@@ -0,0 +1,32 @@
+--TEST--
+Test posix_getpwnam() function : basic functionality
+--CREDITS--
+Rodrigo Prado de Jesus <royopa [at] gmail [dot] com>
+User Group: PHPSP #phptestfestbrasil
+--SKIPIF--
+<?php
+ if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
+?>
+--FILE--
+<?php
+ $uid = posix_geteuid();
+ $user = posix_getpwuid($uid);
+ $username = $user['name'];
+ $info = posix_getpwnam($username);
+ print_r($info);
+ var_dump($username == $info['name']);
+?>
+===DONE====
+--EXPECTREGEX--
+Array
+\(
+ \[name\] => [^\r\n]+
+ \[passwd\] => [^\r\n]+
+ \[uid\] => [0-9]+
+ \[gid\] => [0-9]+
+ \[gecos\] => [^\r\n]*
+ \[dir\] => [^\r\n]+
+ \[shell\] => [^\r\n]+
+\)
+bool\(true\)
+===DONE====
diff --git a/ext/posix/tests/posix_getpwuid_variation.phpt b/ext/posix/tests/posix_getpwuid_variation.phpt
deleted file mode 100644
index ca57d2cc83..0000000000
--- a/ext/posix/tests/posix_getpwuid_variation.phpt
+++ /dev/null
@@ -1,188 +0,0 @@
---TEST--
-Test posix_getpwuid() function : usage variations - parameter types
---SKIPIF--
-<?php
- PHP_INT_SIZE == 4 or die("skip - 32-bit only");
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---FILE--
-<?php
-/* Prototype : proto array posix_getpwuid(long uid)
- * Description: User database access (POSIX.1, 9.2.2)
- * Source code: ext/posix/posix.c
- * Alias to functions:
- */
-
-echo "*** Testing posix_getpwuid() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // object data
- new stdclass(),
-);
-
-// loop through each element of the array for uid
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- $result = posix_getpwuid($value);
- if ((is_array($result) && (count($result) == 7))
- ||
- ($result === false)) {
- echo "valid output\n";
- } else {
- var_dump($result);
- }
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing posix_getpwuid() : usage variations ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
-Arg value 10.5
-valid output
-
-Arg value -10.5
-valid output
-
-Arg value 101234567000
-
-Warning: posix_getpwuid() expects parameter 1 to be int, float given in %s on line %d
-valid output
-
-Arg value 1.07654321E-9
-valid output
-
-Arg value 0.5
-valid output
-
-Notice: Array to string conversion in %sposix_getpwuid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getpwuid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getpwuid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getpwuid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getpwuid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getpwuid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getpwuid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getpwuid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Notice: Array to string conversion in %sposix_getpwuid_variation.php on line %d
-
-Arg value Array
-
-Warning: posix_getpwuid() expects parameter 1 to be int, array given in %s on line %d
-valid output
-
-Arg value
-valid output
-
-Arg value
-valid output
-
-Arg value 1
-valid output
-
-Arg value
-valid output
-
-Arg value 1
-valid output
-
-Arg value
-valid output
-
-Arg value
-
-Warning: posix_getpwuid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value
-
-Warning: posix_getpwuid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value string
-
-Warning: posix_getpwuid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value string
-
-Warning: posix_getpwuid() expects parameter 1 to be int, string given in %s on line %d
-valid output
-
-Arg value
-valid output
-
-Arg value
-valid output
-
-Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d
diff --git a/ext/posix/tests/posix_getuid_error.phpt b/ext/posix/tests/posix_getuid_error.phpt
deleted file mode 100644
index 8954108c32..0000000000
--- a/ext/posix/tests/posix_getuid_error.phpt
+++ /dev/null
@@ -1,31 +0,0 @@
---TEST--
-Test posix_getuid() function : error conditions
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---FILE--
-<?php
-/* Prototype : proto int posix_getuid(void)
- * Description: Get the current user id (POSIX.1, 4.2.1)
- * Source code: ext/posix/posix.c
- * Alias to functions:
- */
-
-echo "*** Testing posix_getuid() : error conditions ***\n";
-
-// One argument
-echo "\n-- Testing posix_getuid() function with one argument --\n";
-$extra_arg = 10;
-var_dump( posix_getuid($extra_arg) );
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing posix_getuid() : error conditions ***
-
--- Testing posix_getuid() function with one argument --
-
-Warning: posix_getuid() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-Done
diff --git a/ext/posix/tests/posix_initgroups_basic.phpt b/ext/posix/tests/posix_initgroups_basic.phpt
deleted file mode 100644
index 47d75f0745..0000000000
--- a/ext/posix/tests/posix_initgroups_basic.phpt
+++ /dev/null
@@ -1,22 +0,0 @@
---TEST--
-posix_initgroups(): Basic tests
---SKIPIF--
-<?php
-if (!extension_loaded('posix')) die('skip - POSIX extension not loaded');
-if (!function_exists('posix_initgroups')) die('skip posix_initgroups() not found');
-?>
---FILE--
-<?php
-echo "Basic test of POSIX posix_initgroups function\n";
-var_dump(posix_initgroups('foo', 'bar'));
-var_dump(posix_initgroups(NULL, NULL));
-
-?>
-===DONE====
---EXPECTF--
-Basic test of POSIX posix_initgroups function
-
-Warning: posix_initgroups() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-bool(false)
-===DONE====
diff --git a/ext/posix/tests/posix_kill_basic.phpt b/ext/posix/tests/posix_kill_basic.phpt
index b73e73c476..4ce50ca497 100644
--- a/ext/posix/tests/posix_kill_basic.phpt
+++ b/ext/posix/tests/posix_kill_basic.phpt
@@ -36,4 +36,3 @@ bool(false)
int(%d)
string(%d) %s%rNo such process|Operation not permitted%r%s
===DONE====
-
diff --git a/ext/posix/tests/posix_kill_variation1.phpt b/ext/posix/tests/posix_kill_variation1.phpt
deleted file mode 100644
index 25a123cf04..0000000000
--- a/ext/posix/tests/posix_kill_variation1.phpt
+++ /dev/null
@@ -1,182 +0,0 @@
---TEST--
-Test posix_kill() function : usage variations - first parameter type
---SKIPIF--
-<?php
- PHP_INT_SIZE == 4 or die("skip - 32-bit only");
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---FILE--
-<?php
-/* Prototype : proto bool posix_kill(int pid, int sig)
- * Description: Send a signal to a process (POSIX.1, 3.3.2)
- * Source code: ext/posix/posix.c
- * Alias to functions:
- */
-
-echo "*** Testing posix_kill() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$sig = -999;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // object data
- new stdclass(),
-);
-
-// loop through each element of the array for pid
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- var_dump( posix_kill($value, $sig) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing posix_kill() : usage variations ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
-Arg value 10.5
-bool(false)
-
-Arg value -10.5
-bool(false)
-
-Arg value 101234567000
-
-Warning: posix_kill() expects parameter 1 to be int, float given in %s on line %d
-bool(false)
-
-Arg value 1.07654321E-9
-bool(false)
-
-Arg value 0.5
-bool(false)
-
-Notice: Array to string conversion in %sposix_kill_variation1.php on line %d
-
-Arg value Array
-
-Warning: posix_kill() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Notice: Array to string conversion in %sposix_kill_variation1.php on line %d
-
-Arg value Array
-
-Warning: posix_kill() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Notice: Array to string conversion in %sposix_kill_variation1.php on line %d
-
-Arg value Array
-
-Warning: posix_kill() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Notice: Array to string conversion in %sposix_kill_variation1.php on line %d
-
-Arg value Array
-
-Warning: posix_kill() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Notice: Array to string conversion in %sposix_kill_variation1.php on line %d
-
-Arg value Array
-
-Warning: posix_kill() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-
-Warning: posix_kill() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: posix_kill() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Arg value string
-
-Warning: posix_kill() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Arg value string
-
-Warning: posix_kill() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d
diff --git a/ext/posix/tests/posix_kill_variation2.phpt b/ext/posix/tests/posix_kill_variation2.phpt
deleted file mode 100644
index 8ca0d9f3c2..0000000000
--- a/ext/posix/tests/posix_kill_variation2.phpt
+++ /dev/null
@@ -1,182 +0,0 @@
---TEST--
-Test posix_kill() function : usage variations - second parameter type
---SKIPIF--
-<?php
- PHP_INT_SIZE == 4 or die("skip - 32-bit only");
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---FILE--
-<?php
-/* Prototype : proto bool posix_kill(int pid, int sig)
- * Description: Send a signal to a process (POSIX.1, 3.3.2)
- * Source code: ext/posix/posix.c
- * Alias to functions:
- */
-
-echo "*** Testing posix_kill() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-$pid = -999;
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // object data
- new stdclass(),
-);
-
-// loop through each element of the array for sig
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- var_dump( posix_kill($pid, $value) );
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing posix_kill() : usage variations ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
-Arg value 10.5
-bool(false)
-
-Arg value -10.5
-bool(false)
-
-Arg value 101234567000
-
-Warning: posix_kill() expects parameter 2 to be int, float given in %s on line %d
-bool(false)
-
-Arg value 1.07654321E-9
-bool(false)
-
-Arg value 0.5
-bool(false)
-
-Notice: Array to string conversion in %sposix_kill_variation2.php on line %d
-
-Arg value Array
-
-Warning: posix_kill() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
-Notice: Array to string conversion in %sposix_kill_variation2.php on line %d
-
-Arg value Array
-
-Warning: posix_kill() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
-Notice: Array to string conversion in %sposix_kill_variation2.php on line %d
-
-Arg value Array
-
-Warning: posix_kill() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
-Notice: Array to string conversion in %sposix_kill_variation2.php on line %d
-
-Arg value Array
-
-Warning: posix_kill() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
-Notice: Array to string conversion in %sposix_kill_variation2.php on line %d
-
-Arg value Array
-
-Warning: posix_kill() expects parameter 2 to be int, array given in %s on line %d
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value 1
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-
-Warning: posix_kill() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
-Arg value
-
-Warning: posix_kill() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
-Arg value string
-
-Warning: posix_kill() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
-Arg value string
-
-Warning: posix_kill() expects parameter 2 to be int, string given in %s on line %d
-bool(false)
-
-Arg value
-bool(false)
-
-Arg value
-bool(false)
-
-Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d
diff --git a/ext/posix/tests/posix_mkfifo_wrongparams.phpt b/ext/posix/tests/posix_mkfifo_wrongparams.phpt
deleted file mode 100644
index 0d4df7b6e6..0000000000
--- a/ext/posix/tests/posix_mkfifo_wrongparams.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-Test parameter validation in posix_mkfifo().
---CREDITS--
-Till Klampaeckel, till@php.net
-TestFest Berlin 2009
---SKIPIF--
-<?php
-if (!extension_loaded('posix')) {
- die('SKIP The posix extension is not loaded.');
-}
-?>
---FILE--
-<?php
-posix_mkfifo(null);
-var_dump(posix_mkfifo(null, 0644));
-?>
-===DONE===
---EXPECTF--
-Warning: posix_mkfifo() expects exactly 2 parameters, 1 given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/posix/tests/posix_seteuid_error.phpt b/ext/posix/tests/posix_seteuid_error.phpt
deleted file mode 100644
index 1ac3a38226..0000000000
--- a/ext/posix/tests/posix_seteuid_error.phpt
+++ /dev/null
@@ -1,32 +0,0 @@
---TEST--
-Test function posix_seteuid() by calling it more than or less than its expected arguments
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---CREDITS--
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---FILE--
-<?php
-
-
-echo "*** Test by calling method or function with incorrect numbers of arguments ***\n";
-
-$uid = '123';
-$extra_arg = '12312';
-
-var_dump(posix_seteuid( $uid, $extra_arg ) );
-var_dump(posix_seteuid( ) );
-
-
-?>
---EXPECTF--
-*** Test by calling method or function with incorrect numbers of arguments ***
-
-Warning: posix_seteuid() expects exactly 1 parameter, 2 given in %s on line 9
-bool(false)
-
-Warning: posix_seteuid() expects exactly 1 parameter, 0 given in %s on line 10
-bool(false)
diff --git a/ext/posix/tests/posix_seteuid_error2.phpt b/ext/posix/tests/posix_seteuid_error2.phpt
deleted file mode 100644
index b56046d326..0000000000
--- a/ext/posix/tests/posix_seteuid_error2.phpt
+++ /dev/null
@@ -1,55 +0,0 @@
---TEST--
-Test function posix_seteuid() by substituting argument 1 with object values.
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---CREDITS--
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---FILE--
-<?php
-
-
-echo "*** Test substituting argument 1 with object values ***\n";
-
-
-
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-
-
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-$variation_array = array(
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
- );
-
-
-foreach ( $variation_array as $var ) {
- var_dump(posix_seteuid( $var ) );
-}
-?>
---EXPECTF--
-*** Test substituting argument 1 with object values ***
-Error: 2 - posix_seteuid() expects parameter 1 to be int, object given, %s
-bool(false)
-Error: 2 - posix_seteuid() expects parameter 1 to be int, object given, %s
-bool(false)
diff --git a/ext/posix/tests/posix_seteuid_variation1.phpt b/ext/posix/tests/posix_seteuid_variation1.phpt
deleted file mode 100644
index 6131b928a0..0000000000
--- a/ext/posix/tests/posix_seteuid_variation1.phpt
+++ /dev/null
@@ -1,41 +0,0 @@
---TEST--
-Test function posix_seteuid() by substituting argument 1 with array values.
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---CREDITS--
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---FILE--
-<?php
-
-$index_array = array(1, 2, 3);
-$assoc_array = array(1 => 'one', 2 => 'two');
-
-$variation_array = array(
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
- );
-
-
-foreach ( $variation_array as $var ) {
- var_dump(posix_seteuid( $var ) );
-}
-
-?>
---EXPECTF--
-Warning: posix_seteuid() expects parameter 1 to be int, array given in %s on line 15
-bool(false)
-
-Warning: posix_seteuid() expects parameter 1 to be int, array given in %s on line 15
-bool(false)
-
-Warning: posix_seteuid() expects parameter 1 to be int, array given in %s on line 15
-bool(false)
-
-Warning: posix_seteuid() expects parameter 1 to be int, array given in %s on line 15
-bool(false)
diff --git a/ext/posix/tests/posix_seteuid_variation3.phpt b/ext/posix/tests/posix_seteuid_variation3.phpt
deleted file mode 100644
index d4c16514e3..0000000000
--- a/ext/posix/tests/posix_seteuid_variation3.phpt
+++ /dev/null
@@ -1,48 +0,0 @@
---TEST--
-Test function posix_seteuid() by substituting argument 1 with emptyUnsetUndefNull values.
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
- if(posix_geteuid() == 0) print "skip - Cannot run test as root.";
-?>
---CREDITS--
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---FILE--
-<?php
-
-
-echo "*** Test substituting argument 1 with emptyUnsetUndefNull values ***\n";
-
-
-
-$unset_var = 10;
-unset($unset_var);
-
-$variation_array = array(
- 'unset var' => @$unset_var,
- 'undefined var' => @$undefined_var,
- 'empty string DQ' => "",
- 'empty string SQ' => '',
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
- );
-
-
-foreach ( $variation_array as $var ) {
- var_dump(posix_seteuid( $var ) );
-}
-?>
---EXPECTF--
-*** Test substituting argument 1 with emptyUnsetUndefNull values ***
-bool(false)
-bool(false)
-
-Warning: posix_seteuid() expects parameter 1 to be int, string given in %s on line 22
-bool(false)
-
-Warning: posix_seteuid() expects parameter 1 to be int, string given in %s on line 22
-bool(false)
-bool(false)
-bool(false)
diff --git a/ext/posix/tests/posix_seteuid_variation6.phpt b/ext/posix/tests/posix_seteuid_variation6.phpt
deleted file mode 100644
index 9c0c3868f5..0000000000
--- a/ext/posix/tests/posix_seteuid_variation6.phpt
+++ /dev/null
@@ -1,48 +0,0 @@
---TEST--
-Test function posix_seteuid() by substituting argument 1 with string values.
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---CREDITS--
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---FILE--
-<?php
-
-
-echo "*** Test substituting argument 1 with string values ***\n";
-
-
-
-$heredoc = <<<EOT
-hello world
-EOT;
-
-$variation_array = array(
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
- );
-
-
-foreach ( $variation_array as $var ) {
- var_dump(posix_seteuid( $var ) );
-}
-?>
---EXPECTF--
-*** Test substituting argument 1 with string values ***
-
-Warning: posix_seteuid() expects parameter 1 to be int, string given in %s on line 21
-bool(false)
-
-Warning: posix_seteuid() expects parameter 1 to be int, string given in %s on line 21
-bool(false)
-
-Warning: posix_seteuid() expects parameter 1 to be int, string given in %s on line 21
-bool(false)
-
-Warning: posix_seteuid() expects parameter 1 to be int, string given in %s on line 21
-bool(false)
diff --git a/ext/posix/tests/posix_setgid_error.phpt b/ext/posix/tests/posix_setgid_error.phpt
deleted file mode 100644
index 169bd9f9ab..0000000000
--- a/ext/posix/tests/posix_setgid_error.phpt
+++ /dev/null
@@ -1,32 +0,0 @@
---TEST--
-Test function posix_setgid() by calling it more than or less than its expected arguments.
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---FILE--
-<?php
-
-
-echo "*** Test by calling method or function with incorrect numbers of arguments ***\n";
-
-$gid = posix_getgid();
-$extra_arg = '123';
-
-var_dump(posix_setgid( $gid, $extra_arg ) );
-var_dump(posix_setgid( ) );
-
-?>
-===DONE===
---EXPECTF--
-*** Test by calling method or function with incorrect numbers of arguments ***
-
-Warning: posix_setgid() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Warning: posix_setgid() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/posix/tests/posix_setgid_variation1.phpt b/ext/posix/tests/posix_setgid_variation1.phpt
deleted file mode 100644
index bb4b9b3f8b..0000000000
--- a/ext/posix/tests/posix_setgid_variation1.phpt
+++ /dev/null
@@ -1,47 +0,0 @@
---TEST--
-Test function posix_setgid() by substituting argument 1 with array values.
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---CREDITS--
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---FILE--
-<?php
-
-
-echo "*** Test substituting argument 1 with array values ***\n";
-
-$index_array = array(1, 2, 3);
-$assoc_array = array(1 => 'one', 2 => 'two');
-
-$variation_array = array(
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
- );
-
-
-foreach ( $variation_array as $var ) {
- var_dump(posix_setgid( $var ) );
-}
-?>
-===DONE===
---EXPECTF--
-*** Test substituting argument 1 with array values ***
-
-Warning: posix_setgid() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: posix_setgid() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: posix_setgid() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-
-Warning: posix_setgid() expects parameter 1 to be int, array given in %s on line %d
-bool(false)
-===DONE===
diff --git a/ext/posix/tests/posix_setgid_variation2.phpt b/ext/posix/tests/posix_setgid_variation2.phpt
index 1eefa8e755..5a1b5a13a1 100644
--- a/ext/posix/tests/posix_setgid_variation2.phpt
+++ b/ext/posix/tests/posix_setgid_variation2.phpt
@@ -37,4 +37,3 @@ bool(false)
bool(false)
bool(false)
===DONE===
-
diff --git a/ext/posix/tests/posix_setgid_variation3.phpt b/ext/posix/tests/posix_setgid_variation3.phpt
deleted file mode 100644
index 92580c9373..0000000000
--- a/ext/posix/tests/posix_setgid_variation3.phpt
+++ /dev/null
@@ -1,48 +0,0 @@
---TEST--
-Test function posix_setgid() by substituting argument 1 with emptyUnsetUndefNull values.
---CREDITS--
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
- if(posix_geteuid() == 0) print "skip - Cannot run test as root.";
-?>
---FILE--
-<?php
-
-
-echo "*** Test substituting argument 1 with emptyUnsetUndefNull values ***\n";
-
-
-
-$unset_var = 10;
-unset($unset_var);
-
-$variation_array = array(
- 'unset var' => @$unset_var,
- 'undefined var' => @$undefined_var,
- 'empty string DQ' => "",
- 'empty string SQ' => '',
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
- );
-
-
-foreach ( $variation_array as $var ) {
- var_dump(posix_setgid( $var ) );
-}
-?>
---EXPECTF--
-*** Test substituting argument 1 with emptyUnsetUndefNull values ***
-bool(false)
-bool(false)
-
-Warning: posix_setgid() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: posix_setgid() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-bool(false)
-bool(false)
diff --git a/ext/posix/tests/posix_setgid_variation4.phpt b/ext/posix/tests/posix_setgid_variation4.phpt
index 67a6cac652..d85b5a900a 100644
--- a/ext/posix/tests/posix_setgid_variation4.phpt
+++ b/ext/posix/tests/posix_setgid_variation4.phpt
@@ -44,4 +44,3 @@ Warning: posix_setgid() expects parameter 1 to be int, float given in %s on line
bool(false)
bool(false)
===DONE===
-
diff --git a/ext/posix/tests/posix_setgid_variation5.phpt b/ext/posix/tests/posix_setgid_variation5.phpt
index 5a97ef07ca..ad9c79bd2b 100644
--- a/ext/posix/tests/posix_setgid_variation5.phpt
+++ b/ext/posix/tests/posix_setgid_variation5.phpt
@@ -35,4 +35,3 @@ bool(false)
bool(false)
bool(false)
===DONE===
-
diff --git a/ext/posix/tests/posix_setgid_variation6.phpt b/ext/posix/tests/posix_setgid_variation6.phpt
deleted file mode 100644
index 6be85e7a85..0000000000
--- a/ext/posix/tests/posix_setgid_variation6.phpt
+++ /dev/null
@@ -1,58 +0,0 @@
---TEST--
-Test function posix_setgid() by substituting argument 1 with object values.
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---CREDITS--
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---FILE--
-<?php
-
-
-echo "*** Test substituting argument 1 with object values ***\n";
-
-
-
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-
-
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-$variation_array = array(
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
- );
-
-
-foreach ( $variation_array as $var ) {
- var_dump(posix_setgid( $var ) );
-}
-?>
-===DONE===
---EXPECTF--
-*** Test substituting argument 1 with object values ***
-Error: 2 - posix_setgid() expects parameter 1 to be int, object given, %s
-bool(false)
-Error: 2 - posix_setgid() expects parameter 1 to be int, object given, %s
-bool(false)
-===DONE===
-
diff --git a/ext/posix/tests/posix_setgid_variation7.phpt b/ext/posix/tests/posix_setgid_variation7.phpt
deleted file mode 100644
index 0c4ef502f4..0000000000
--- a/ext/posix/tests/posix_setgid_variation7.phpt
+++ /dev/null
@@ -1,48 +0,0 @@
---TEST--
-Test function posix_setgid() by substituting argument 1 with string values.
---CREDITS--
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---FILE--
-<?php
-
-
-echo "*** Test substituting argument 1 with string values ***\n";
-
-
-
-$heredoc = <<<EOT
-hello world
-EOT;
-
-$variation_array = array(
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
- );
-
-
-foreach ( $variation_array as $var ) {
- var_dump(posix_setgid( $var ) );
-}
-?>
---EXPECTF--
-*** Test substituting argument 1 with string values ***
-
-Warning: posix_setgid() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: posix_setgid() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: posix_setgid() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
-
-Warning: posix_setgid() expects parameter 1 to be int, string given in %s on line %d
-bool(false)
diff --git a/ext/posix/tests/posix_setuid_error.phpt b/ext/posix/tests/posix_setuid_error.phpt
deleted file mode 100644
index f1522e663c..0000000000
--- a/ext/posix/tests/posix_setuid_error.phpt
+++ /dev/null
@@ -1,35 +0,0 @@
---TEST--
-Test function posix_setuid() by calling it more than or less than its expected arguments
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---CREDITS--
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---FILE--
-<?php
-
-
-echo "*** Test by calling method or function with incorrect numbers of arguments ***\n";
-
-$uid = '123';
-
-
-$extra_arg = '12312';
-
-var_dump(posix_setuid( $uid, $extra_arg ) );
-
-var_dump(posix_setuid( ) );
-
-
-?>
---EXPECTF--
-*** Test by calling method or function with incorrect numbers of arguments ***
-
-Warning: posix_setuid() expects exactly 1 parameter, 2 given in %s on line 11
-bool(false)
-
-Warning: posix_setuid() expects exactly 1 parameter, 0 given in %s on line 13
-bool(false)
diff --git a/ext/posix/tests/posix_setuid_error2.phpt b/ext/posix/tests/posix_setuid_error2.phpt
deleted file mode 100644
index 7775f09b0c..0000000000
--- a/ext/posix/tests/posix_setuid_error2.phpt
+++ /dev/null
@@ -1,55 +0,0 @@
---TEST--
-Test function posix_setuid() by substituting argument 1 with object values.
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---CREDITS--
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---FILE--
-<?php
-
-
-echo "*** Test substituting argument 1 with object values ***\n";
-
-
-
-function test_error_handler($err_no, $err_msg, $filename, $linenum, $vars) {
- if (error_reporting() != 0) {
- // report non-silenced errors
- echo "Error: $err_no - $err_msg, $filename($linenum)\n";
- }
-}
-set_error_handler('test_error_handler');
-
-
-
-class classWithToString
-{
- public function __toString() {
- return "Class A object";
- }
-}
-
-class classWithoutToString
-{
-}
-
-$variation_array = array(
- 'instance of classWithToString' => new classWithToString(),
- 'instance of classWithoutToString' => new classWithoutToString(),
- );
-
-
-foreach ( $variation_array as $var ) {
- var_dump(posix_setuid( $var ) );
-}
-?>
---EXPECTF--
-*** Test substituting argument 1 with object values ***
-Error: 2 - posix_setuid() expects parameter 1 to be int, object given, %s
-bool(false)
-Error: 2 - posix_setuid() expects parameter 1 to be int, object given, %s
-bool(false)
diff --git a/ext/posix/tests/posix_setuid_variation1.phpt b/ext/posix/tests/posix_setuid_variation1.phpt
deleted file mode 100644
index 42ad939b61..0000000000
--- a/ext/posix/tests/posix_setuid_variation1.phpt
+++ /dev/null
@@ -1,41 +0,0 @@
---TEST--
-Test function posix_setuid() by substituting argument 1 with array values.
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---CREDITS--
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---FILE--
-<?php
-
-$index_array = array(1, 2, 3);
-$assoc_array = array(1 => 'one', 2 => 'two');
-
-$variation_array = array(
- 'empty array' => array(),
- 'int indexed array' => $index_array,
- 'associative array' => $assoc_array,
- 'nested arrays' => array('foo', $index_array, $assoc_array),
- );
-
-
-foreach ( $variation_array as $var ) {
- var_dump(posix_setuid( $var ) );
-}
-
-?>
---EXPECTF--
-Warning: posix_setuid() expects parameter 1 to be int, array given in %s on line 15
-bool(false)
-
-Warning: posix_setuid() expects parameter 1 to be int, array given in %s on line 15
-bool(false)
-
-Warning: posix_setuid() expects parameter 1 to be int, array given in %s on line 15
-bool(false)
-
-Warning: posix_setuid() expects parameter 1 to be int, array given in %s on line 15
-bool(false)
diff --git a/ext/posix/tests/posix_setuid_variation3.phpt b/ext/posix/tests/posix_setuid_variation3.phpt
deleted file mode 100644
index 0336865062..0000000000
--- a/ext/posix/tests/posix_setuid_variation3.phpt
+++ /dev/null
@@ -1,48 +0,0 @@
---TEST--
-Test function posix_setuid() by substituting argument 1 with emptyUnsetUndefNull values.
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
- if(posix_geteuid() == 0) print "skip - Cannot run test as root.";
-?>
---CREDITS--
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---FILE--
-<?php
-
-
-echo "*** Test substituting argument 1 with emptyUnsetUndefNull values ***\n";
-
-
-
-$unset_var = 10;
-unset($unset_var);
-
-$variation_array = array(
- 'unset var' => @$unset_var,
- 'undefined var' => @$undefined_var,
- 'empty string DQ' => "",
- 'empty string SQ' => '',
- 'uppercase NULL' => NULL,
- 'lowercase null' => null,
- );
-
-
-foreach ( $variation_array as $var ) {
- var_dump(posix_setuid( $var ) );
-}
-?>
---EXPECTF--
-*** Test substituting argument 1 with emptyUnsetUndefNull values ***
-bool(false)
-bool(false)
-
-Warning: posix_setuid() expects parameter 1 to be int, string given in %s on line 22
-bool(false)
-
-Warning: posix_setuid() expects parameter 1 to be int, string given in %s on line 22
-bool(false)
-bool(false)
-bool(false)
diff --git a/ext/posix/tests/posix_setuid_variation6.phpt b/ext/posix/tests/posix_setuid_variation6.phpt
deleted file mode 100644
index 9fd6ffe71c..0000000000
--- a/ext/posix/tests/posix_setuid_variation6.phpt
+++ /dev/null
@@ -1,48 +0,0 @@
---TEST--
-Test function posix_setuid() by substituting argument 1 with string values.
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---CREDITS--
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---FILE--
-<?php
-
-
-echo "*** Test substituting argument 1 with string values ***\n";
-
-
-
-$heredoc = <<<EOT
-hello world
-EOT;
-
-$variation_array = array(
- 'string DQ' => "string",
- 'string SQ' => 'string',
- 'mixed case string' => "sTrInG",
- 'heredoc' => $heredoc,
- );
-
-
-foreach ( $variation_array as $var ) {
- var_dump(posix_setuid( $var ) );
-}
-?>
---EXPECTF--
-*** Test substituting argument 1 with string values ***
-
-Warning: posix_setuid() expects parameter 1 to be int, string given in %s on line 21
-bool(false)
-
-Warning: posix_setuid() expects parameter 1 to be int, string given in %s on line 21
-bool(false)
-
-Warning: posix_setuid() expects parameter 1 to be int, string given in %s on line 21
-bool(false)
-
-Warning: posix_setuid() expects parameter 1 to be int, string given in %s on line 21
-bool(false)
diff --git a/ext/posix/tests/posix_strerror_variation1.phpt b/ext/posix/tests/posix_strerror_variation1.phpt
deleted file mode 100644
index e8da057c7f..0000000000
--- a/ext/posix/tests/posix_strerror_variation1.phpt
+++ /dev/null
@@ -1,181 +0,0 @@
---TEST--
-Test posix_strerror() function : usage variations
---SKIPIF--
-<?php
- PHP_INT_SIZE == 4 or die("skip - 32-bit only");
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---FILE--
-<?php
-/* Prototype : proto string posix_strerror(int errno)
- * Description: Retrieve the system error message associated with the given errno.
- * Source code: ext/posix/posix.c
- * Alias to functions:
- */
-
-echo "*** Testing posix_strerror() : usage variations ***\n";
-
-// Initialise function arguments not being substituted (if any)
-
-//get an unset variable
-$unset_var = 10;
-unset ($unset_var);
-
-//array of values to iterate over
-$values = array(
-
- // float data
- 10.5,
- -10.5,
- 10.1234567e10,
- 10.7654321E-10,
- .5,
-
- // array data
- array(),
- array(0),
- array(1),
- array(1, 2),
- array('color' => 'red', 'item' => 'pen'),
-
- // null data
- NULL,
- null,
-
- // boolean data
- true,
- false,
- TRUE,
- FALSE,
-
- // empty data
- "",
- '',
-
- // string data
- "string",
- 'string',
-
- // undefined data
- $undefined_var,
-
- // unset data
- $unset_var,
-
- // object data
- new stdclass(),
-);
-
-// loop through each element of the array for errno
-
-foreach($values as $value) {
- echo "\nArg value $value \n";
- echo gettype( posix_strerror($value) )."\n";
-};
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing posix_strerror() : usage variations ***
-
-Notice: Undefined variable: undefined_var in %s on line %d
-
-Notice: Undefined variable: unset_var in %s on line %d
-
-Arg value 10.5
-string
-
-Arg value -10.5
-string
-
-Arg value 101234567000
-
-Warning: posix_strerror() expects parameter 1 to be int, float given in %s on line %d
-boolean
-
-Arg value 1.07654321E-9
-string
-
-Arg value 0.5
-string
-
-Notice: Array to string conversion in %sposix_strerror_variation1.php on line %d
-
-Arg value Array
-
-Warning: posix_strerror() expects parameter 1 to be int, array given in %s on line %d
-boolean
-
-Notice: Array to string conversion in %sposix_strerror_variation1.php on line %d
-
-Arg value Array
-
-Warning: posix_strerror() expects parameter 1 to be int, array given in %s on line %d
-boolean
-
-Notice: Array to string conversion in %sposix_strerror_variation1.php on line %d
-
-Arg value Array
-
-Warning: posix_strerror() expects parameter 1 to be int, array given in %s on line %d
-boolean
-
-Notice: Array to string conversion in %sposix_strerror_variation1.php on line %d
-
-Arg value Array
-
-Warning: posix_strerror() expects parameter 1 to be int, array given in %s on line %d
-boolean
-
-Notice: Array to string conversion in %sposix_strerror_variation1.php on line %d
-
-Arg value Array
-
-Warning: posix_strerror() expects parameter 1 to be int, array given in %s on line %d
-boolean
-
-Arg value
-string
-
-Arg value
-string
-
-Arg value 1
-string
-
-Arg value
-string
-
-Arg value 1
-string
-
-Arg value
-string
-
-Arg value
-
-Warning: posix_strerror() expects parameter 1 to be int, string given in %s on line %d
-boolean
-
-Arg value
-
-Warning: posix_strerror() expects parameter 1 to be int, string given in %s on line %d
-boolean
-
-Arg value string
-
-Warning: posix_strerror() expects parameter 1 to be int, string given in %s on line %d
-boolean
-
-Arg value string
-
-Warning: posix_strerror() expects parameter 1 to be int, string given in %s on line %d
-boolean
-
-Arg value
-string
-
-Arg value
-string
-
-Recoverable fatal error: Object of class stdClass could not be converted to string in %s on line %d
diff --git a/ext/posix/tests/posix_times_error.phpt b/ext/posix/tests/posix_times_error.phpt
deleted file mode 100644
index 0f8a9e3601..0000000000
--- a/ext/posix/tests/posix_times_error.phpt
+++ /dev/null
@@ -1,31 +0,0 @@
---TEST--
-Test posix_times() function : error conditions
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---FILE--
-<?php
-/* Prototype : proto array posix_times(void)
- * Description: Get process times (POSIX.1, 4.5.2)
- * Source code: ext/posix/posix.c
- * Alias to functions:
- */
-
-echo "*** Testing posix_times() : error conditions ***\n";
-
-// One argument
-echo "\n-- Testing posix_times() function with one argument --\n";
-$extra_arg = 10;
-var_dump( posix_times($extra_arg) );
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing posix_times() : error conditions ***
-
--- Testing posix_times() function with one argument --
-
-Warning: posix_times() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-Done
diff --git a/ext/posix/tests/posix_ttyname_error.phpt b/ext/posix/tests/posix_ttyname_error.phpt
deleted file mode 100644
index effa709717..0000000000
--- a/ext/posix/tests/posix_ttyname_error.phpt
+++ /dev/null
@@ -1,35 +0,0 @@
---TEST--
-Test function posix_ttyname() by calling it more than or less than its expected arguments
---CREDITS--
-Marco Fabbri mrfabbri@gmail.com
-Francesco Fullone ff@ideato.it
-#PHPTestFest Cesena Italia on 2009-06-20
---SKIPIF--
-<?php
-if (!extension_loaded('posix')) {
- die('SKIP The posix extension is not loaded.');
-}
-?>
---FILE--
-<?php
-
-
-echo "*** Test by calling method or function with incorrect numbers of arguments ***\n";
-
-$fd = 'foo';
-$extra_arg = 'bar';
-
-var_dump(posix_ttyname( $fd, $extra_arg ) );
-
-var_dump(posix_ttyname( ) );
-
-
-?>
---EXPECTF--
-*** Test by calling method or function with incorrect numbers of arguments ***
-
-Warning: posix_ttyname() expects exactly 1 parameter, 2 given in %s on line %d
-bool(false)
-
-Warning: posix_ttyname() expects exactly 1 parameter, 0 given in %s on line %d
-bool(false)
diff --git a/ext/posix/tests/posix_uname_error.phpt b/ext/posix/tests/posix_uname_error.phpt
deleted file mode 100644
index 09c435fe69..0000000000
--- a/ext/posix/tests/posix_uname_error.phpt
+++ /dev/null
@@ -1,31 +0,0 @@
---TEST--
-Test posix_uname() function : error conditions
---SKIPIF--
-<?php
- if(!extension_loaded("posix")) print "skip - POSIX extension not loaded";
-?>
---FILE--
-<?php
-/* Prototype : proto array posix_uname(void)
- * Description: Get system name (POSIX.1, 4.4.1)
- * Source code: ext/posix/posix.c
- * Alias to functions:
- */
-
-echo "*** Testing posix_uname() : error conditions ***\n";
-
-// One argument
-echo "\n-- Testing posix_uname() function with one argument --\n";
-$extra_arg = 10;
-var_dump( posix_uname($extra_arg) );
-
-echo "Done";
-?>
---EXPECTF--
-*** Testing posix_uname() : error conditions ***
-
--- Testing posix_uname() function with one argument --
-
-Warning: posix_uname() expects exactly 0 parameters, 1 given in %s on line %d
-NULL
-Done