summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Caruso <carusogabriel34@gmail.com>2018-07-26 21:12:21 -0300
committerGabriel Caruso <carusogabriel34@gmail.com>2018-08-28 21:20:00 -0300
commit2f7003847d3b48ea89fdec2bd5388085cf6b4d0e (patch)
treeeff844d0c3e0794916228369104fa3305a1cc0f7
parent3748d8070ffd7750c73c327e212d6dc4fc76d427 (diff)
downloadphp-git-2f7003847d3b48ea89fdec2bd5388085cf6b4d0e.tar.gz
Make more tests run on Linux
-rw-r--r--ext/curl/tests/bug48203-win32.phpt37
-rw-r--r--ext/curl/tests/bug48203.phpt10
-rw-r--r--ext/curl/tests/bug54798-unix.phpt (renamed from ext/curl/tests/bug54798-win32.phpt)17
-rw-r--r--ext/curl/tests/bug54798.phpt16
-rw-r--r--ext/curl/tests/bug61948-unix.phpt23
-rw-r--r--ext/curl/tests/bug61948-win32.phpt32
-rw-r--r--ext/curl/tests/bug61948.phpt25
-rw-r--r--ext/date/tests/date_default_timezone_get-1-win32.phpt21
-rw-r--r--ext/date/tests/gmstrftime_variation11.phpt8
-rw-r--r--ext/date/tests/gmstrftime_variation13.phpt8
-rw-r--r--ext/date/tests/gmstrftime_variation15.phpt8
-rw-r--r--ext/date/tests/gmstrftime_variation17.phpt6
-rw-r--r--ext/date/tests/gmstrftime_variation19.phpt6
-rw-r--r--ext/date/tests/gmstrftime_variation21.phpt8
-rw-r--r--ext/date/tests/gmstrftime_variation9.phpt6
-rw-r--r--ext/date/tests/strftime_variation11.phpt6
-rw-r--r--ext/date/tests/strftime_variation13.phpt6
-rw-r--r--ext/date/tests/strftime_variation15.phpt6
-rw-r--r--ext/date/tests/strftime_variation17.phpt6
-rw-r--r--ext/date/tests/strftime_variation19.phpt6
-rw-r--r--ext/date/tests/strftime_variation21.phpt6
-rw-r--r--ext/date/tests/strftime_variation9.phpt6
-rw-r--r--ext/pcre/tests/bug72463_2.phpt6
-rw-r--r--ext/sockets/tests/bug63000.phpt3
-rw-r--r--ext/sockets/tests/socket_send.phpt3
-rw-r--r--ext/sockets/tests/socket_send_win32.phpt43
-rw-r--r--ext/sockets/tests/socket_sendrecvmsg_multi_msg-unix.phpt (renamed from ext/sockets/tests/socket_sendrecvmsg_multi_msg-win32.phpt)29
-rw-r--r--ext/sockets/tests/socket_sendrecvmsg_multi_msg.phpt27
-rw-r--r--ext/standard/tests/file/bug43353-win32.phpt25
-rw-r--r--ext/standard/tests/file/bug43353.phpt5
-rw-r--r--ext/standard/tests/file/bug44805.phpt6
-rw-r--r--ext/standard/tests/file/bug60120.phpt3
-rw-r--r--ext/standard/tests/file/bug65272.phpt4
-rw-r--r--ext/standard/tests/general_functions/proc_open-mb0.phpt (renamed from ext/standard/tests/general_functions/proc_open-win32-mb0.phpt)1
-rw-r--r--ext/standard/tests/general_functions/proc_open-mb1.phpt (renamed from ext/standard/tests/general_functions/proc_open-win32-mb1.phpt)1
-rw-r--r--ext/standard/tests/mail/bug69115.phpt6
-rw-r--r--ext/standard/tests/network/syslog_basic.phpt (renamed from ext/standard/tests/network/syslog_basic-win32.phpt)7
-rw-r--r--ext/standard/tests/streams/bug61371-unix.phpt (renamed from ext/standard/tests/streams/bug61371-win.phpt)6
-rw-r--r--ext/standard/tests/streams/bug61371.phpt7
-rw-r--r--sapi/cgi/tests/bug75574_utf8.phpt (renamed from sapi/cgi/tests/bug75574_utf8_win.phpt)6
-rw-r--r--sapi/cli/tests/002-unix.phpt (renamed from sapi/cli/tests/002-win32.phpt)6
-rw-r--r--sapi/cli/tests/002.phpt9
-rw-r--r--sapi/cli/tests/argv_mb.phpt7
-rw-r--r--tests/security/open_basedir_mkdir.phpt6
44 files changed, 103 insertions, 386 deletions
diff --git a/ext/curl/tests/bug48203-win32.phpt b/ext/curl/tests/bug48203-win32.phpt
deleted file mode 100644
index d3affdb71d..0000000000
--- a/ext/curl/tests/bug48203-win32.phpt
+++ /dev/null
@@ -1,37 +0,0 @@
---TEST--
-Bug #48203 (Crash when CURLOPT_STDERR is set to regular file)
---SKIPIF--
-<?php include 'skipif.inc'; ?>
-<?php
-if(substr(PHP_OS, 0, 3) != 'WIN' ) {
- die('skip Windows only test');
-}
-?>
---FILE--
-<?php
-include 'server.inc';
-$fp = fopen(dirname(__FILE__) . '/bug48203.tmp', 'w');
-
-$ch = curl_init();
-
-curl_setopt($ch, CURLOPT_VERBOSE, 1);
-curl_setopt($ch, CURLOPT_STDERR, $fp);
-curl_setopt($ch, CURLOPT_URL, curl_cli_server_start());
-
-fclose($fp); // <-- premature close of $fp caused a crash!
-
-curl_exec($ch);
-curl_close($ch);
-
-echo "Ok\n";
-
-?>
---CLEAN--
-<?php @unlink(dirname(__FILE__) . '/bug48203.tmp'); ?>
---EXPECTF--
-Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %s on line %d
-%A
-Hello World!
-Hello World!* Closing connection 0
-Ok
-
diff --git a/ext/curl/tests/bug48203.phpt b/ext/curl/tests/bug48203.phpt
index fc8b4091fc..11855235c5 100644
--- a/ext/curl/tests/bug48203.phpt
+++ b/ext/curl/tests/bug48203.phpt
@@ -2,11 +2,6 @@
Bug #48203 (Crash when CURLOPT_STDERR is set to regular file)
--SKIPIF--
<?php include 'skipif.inc'; ?>
-<?php
-if(substr(PHP_OS, 0, 3) == 'WIN' ) {
- die('skip now for Windows');
-}
-?>
--FILE--
<?php
include 'server.inc';
@@ -29,6 +24,9 @@ echo "Ok\n";
--CLEAN--
<?php @unlink(dirname(__FILE__) . '/bug48203.tmp'); ?>
--EXPECTF--
-Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %sbug48203.php on line %d
+Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %s on line %d
%A
+Hello World!
+Hello World!* Closing connection 0
Ok
+
diff --git a/ext/curl/tests/bug54798-win32.phpt b/ext/curl/tests/bug54798-unix.phpt
index bce39903ba..d2542815d4 100644
--- a/ext/curl/tests/bug54798-win32.phpt
+++ b/ext/curl/tests/bug54798-unix.phpt
@@ -3,8 +3,8 @@ Bug #54798 (Segfault when CURLOPT_STDERR file pointer is closed before calling c
--SKIPIF--
<?php
include 'skipif.inc';
-if(substr(PHP_OS, 0, 3) != 'WIN' ) {
- die('skip Windows only');
+if(substr(PHP_OS, 0, 3) == 'WIN' ) {
+ die('skip not for Windows');
}
?>
--FILE--
@@ -56,12 +56,9 @@ foreach($options_to_check as $option) {
--CLEAN--
<?php @unlink(dirname(__FILE__) . '/bug54798.tmp'); ?>
--EXPECTF--
-%AOk for CURLOPT_STDERR
-
-%AOk for CURLOPT_WRITEHEADER
-
-%AHello World!
-Hello World!Ok for CURLOPT_FILE
-
-%AOk for CURLOPT_INFILE
+%a
+%aOk for CURLOPT_STDERR
+%aOk for CURLOPT_WRITEHEADER
+%aOk for CURLOPT_FILE
+%aOk for CURLOPT_INFILE
===DONE===
diff --git a/ext/curl/tests/bug54798.phpt b/ext/curl/tests/bug54798.phpt
index d2542815d4..eab75e6fd4 100644
--- a/ext/curl/tests/bug54798.phpt
+++ b/ext/curl/tests/bug54798.phpt
@@ -3,9 +3,6 @@ Bug #54798 (Segfault when CURLOPT_STDERR file pointer is closed before calling c
--SKIPIF--
<?php
include 'skipif.inc';
-if(substr(PHP_OS, 0, 3) == 'WIN' ) {
- die('skip not for Windows');
-}
?>
--FILE--
<?php
@@ -56,9 +53,12 @@ foreach($options_to_check as $option) {
--CLEAN--
<?php @unlink(dirname(__FILE__) . '/bug54798.tmp'); ?>
--EXPECTF--
-%a
-%aOk for CURLOPT_STDERR
-%aOk for CURLOPT_WRITEHEADER
-%aOk for CURLOPT_FILE
-%aOk for CURLOPT_INFILE
+%AOk for CURLOPT_STDERR
+
+%AOk for CURLOPT_WRITEHEADER
+
+%AHello World!
+Hello World!Ok for CURLOPT_FILE
+
+%AOk for CURLOPT_INFILE
===DONE===
diff --git a/ext/curl/tests/bug61948-unix.phpt b/ext/curl/tests/bug61948-unix.phpt
new file mode 100644
index 0000000000..cb84a466e7
--- /dev/null
+++ b/ext/curl/tests/bug61948-unix.phpt
@@ -0,0 +1,23 @@
+--TEST--
+Bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction)
+--SKIPIF--
+<?php if (!extension_loaded("curl")) print "skip";
+if(substr(PHP_OS, 0, 3) == 'WIN' )
+ die("skip Not Valid for Windows");
+?>
+--INI--
+open_basedir="/tmp"
+--FILE--
+<?php
+ $ch = curl_init();
+ var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, ""));
+ var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "/tmp/foo"));
+ var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "/xxx/bar"));
+ curl_close($ch);
+?>
+--EXPECTF--
+bool(true)
+bool(true)
+
+Warning: curl_setopt(): open_basedir restriction in effect. File(/xxx/bar) is not within the allowed path(s): (/tmp) in %sbug61948-unix.php on line %d
+bool(false)
diff --git a/ext/curl/tests/bug61948-win32.phpt b/ext/curl/tests/bug61948-win32.phpt
deleted file mode 100644
index b91ccb7815..0000000000
--- a/ext/curl/tests/bug61948-win32.phpt
+++ /dev/null
@@ -1,32 +0,0 @@
---TEST--
-Bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction)
---SKIPIF--
-<?php if (!extension_loaded("curl")) print "skip";
-if(substr(PHP_OS, 0, 3) != 'WIN' )
- die("skip Not Valid for Linux");
-?>
---FILE--
-<?php
- $base_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug61948";
- mkdir($base_dir . DIRECTORY_SEPARATOR . "foo", 0755, true);
-
- ini_set("open_basedir", $base_dir);
-
- $ch = curl_init();
- var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, ""));
- var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "$base_dir/foo"));
- var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "c:/xxx/bar"));
- curl_close($ch);
-?>
---CLEAN--
-<?php
- $base_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug61948";
- rmdir("$base_dir/foo");
- rmdir($base_dir);
-?>
---EXPECTF--
-%a
-bool(true)
-
-Warning: curl_setopt(): open_basedir restriction in effect. File(c:/xxx/bar) is not within the allowed path(s): (%sbug61948) in %sbug61948-win32.php on line %d
-bool(false)
diff --git a/ext/curl/tests/bug61948.phpt b/ext/curl/tests/bug61948.phpt
index 00df07d73e..b8fda6d83c 100644
--- a/ext/curl/tests/bug61948.phpt
+++ b/ext/curl/tests/bug61948.phpt
@@ -1,23 +1,30 @@
--TEST--
Bug #61948 (CURLOPT_COOKIEFILE '' raises open_basedir restriction)
--SKIPIF--
-<?php if (!extension_loaded("curl")) print "skip";
-if(substr(PHP_OS, 0, 3) == 'WIN' )
- die("skip Not Valid for Windows");
+<?php if (!extension_loaded("curl")) print "skip curl extension not loaded";
?>
---INI--
-open_basedir="/tmp"
--FILE--
<?php
+ $base_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug61948";
+ mkdir($base_dir . DIRECTORY_SEPARATOR . "foo", 0755, true);
+
+ ini_set("open_basedir", $base_dir);
+
$ch = curl_init();
var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, ""));
- var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "/tmp/foo"));
- var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "/xxx/bar"));
+ var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "$base_dir/foo"));
+ var_dump(curl_setopt($ch, CURLOPT_COOKIEFILE, "c:/xxx/bar"));
curl_close($ch);
?>
+--CLEAN--
+<?php
+ $base_dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . "bug61948";
+ rmdir("$base_dir/foo");
+ rmdir($base_dir);
+?>
--EXPECTF--
-bool(true)
+%a
bool(true)
-Warning: curl_setopt(): open_basedir restriction in effect. File(/xxx/bar) is not within the allowed path(s): (/tmp) in %sbug61948.php on line %d
+Warning: curl_setopt(): open_basedir restriction in effect. File(c:/xxx/bar) is not within the allowed path(s): (%sbug61948) in %sbug61948.php on line %d
bool(false)
diff --git a/ext/date/tests/date_default_timezone_get-1-win32.phpt b/ext/date/tests/date_default_timezone_get-1-win32.phpt
deleted file mode 100644
index 73003fb689..0000000000
--- a/ext/date/tests/date_default_timezone_get-1-win32.phpt
+++ /dev/null
@@ -1,21 +0,0 @@
---TEST--
-date_default_timezone_get() function [1]
---SKIPIF--
-<?php
- if(substr(PHP_OS, 0, 3) != 'WIN') die("skip skip on non windows");
-?>
---INI--
-date.timezone=
---FILE--
-<?php
- putenv('TZ=');
- echo date_default_timezone_get(), "\n";
- echo date('e'), "\n";
- /* The behaviour on windows is to select an arbitrary timezone name from the current system settings.
- This gives no chance to hardcode the timezone name, for instance for UTC+1 it could choose
- from the multiple names like Europe/Berlin or Europe/Paris . For this reason the test is
- parametrized so there is no hardcoded timezone data.*/
-?>
---EXPECT--
-UTC
-UTC
diff --git a/ext/date/tests/gmstrftime_variation11.phpt b/ext/date/tests/gmstrftime_variation11.phpt
index f90e51ec16..d760a6d951 100644
--- a/ext/date/tests/gmstrftime_variation11.phpt
+++ b/ext/date/tests/gmstrftime_variation11.phpt
@@ -1,11 +1,5 @@
--TEST--
-Test gmstrftime() function : usage variation - Checking month related formats which was not supported on Windows before VC14.
---SKIPIF--
-<?php
-if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
- die("skip Test is valid for Windows");
-}
-?>
+Test gmstrftime() function : usage variation - Checking month related formats which was not supported on Windows before VC14.
--FILE--
<?php
/* Prototype : string gmstrftime(string format [, int timestamp])
diff --git a/ext/date/tests/gmstrftime_variation13.phpt b/ext/date/tests/gmstrftime_variation13.phpt
index cccfa89d42..6bc0b034c7 100644
--- a/ext/date/tests/gmstrftime_variation13.phpt
+++ b/ext/date/tests/gmstrftime_variation13.phpt
@@ -1,11 +1,5 @@
--TEST--
-Test gmstrftime() function : usage variation - Checking date related formats which was not supported on Windows before VC14.
---SKIPIF--
-<?php
-if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
- die("skip Test is valid for Windows");
-}
-?>
+Test gmstrftime() function : usage variation - Checking date related formats which was not supported on Windows before VC14.
--FILE--
<?php
/* Prototype : string gmstrftime(string format [, int timestamp])
diff --git a/ext/date/tests/gmstrftime_variation15.phpt b/ext/date/tests/gmstrftime_variation15.phpt
index 0a32b43322..d430e9fe48 100644
--- a/ext/date/tests/gmstrftime_variation15.phpt
+++ b/ext/date/tests/gmstrftime_variation15.phpt
@@ -1,11 +1,5 @@
--TEST--
-Test gmstrftime() function : usage variation - Checking time related formats which was not supported on Windows before VC14.
---SKIPIF--
-<?php
-if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
- die("skip Test is valid for Windows");
-}
-?>
+Test gmstrftime() function : usage variation - Checking time related formats which was not supported on Windows before VC14.
--FILE--
<?php
/* Prototype : string gmstrftime(string format [, int timestamp])
diff --git a/ext/date/tests/gmstrftime_variation17.phpt b/ext/date/tests/gmstrftime_variation17.phpt
index 5fa308f645..63c331b8aa 100644
--- a/ext/date/tests/gmstrftime_variation17.phpt
+++ b/ext/date/tests/gmstrftime_variation17.phpt
@@ -1,11 +1,5 @@
--TEST--
Test gmstrftime() function : usage variation - Checking day related formats which was not supported on Windows before vc14.
---SKIPIF--
-<?php
-if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
- die("skip Test is valid for Windows");
-}
-?>
--FILE--
<?php
/* Prototype : string gmstrftime(string format [, int timestamp])
diff --git a/ext/date/tests/gmstrftime_variation19.phpt b/ext/date/tests/gmstrftime_variation19.phpt
index 78af097cbd..1202e2c107 100644
--- a/ext/date/tests/gmstrftime_variation19.phpt
+++ b/ext/date/tests/gmstrftime_variation19.phpt
@@ -1,11 +1,5 @@
--TEST--
Test gmstrftime() function : usage variation - Checking newline and tab formats which was not supported on Windows before VC14.
---SKIPIF--
-<?php
-if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
- die("skip Test is valid for Windows");
-}
-?>
--FILE--
<?php
/* Prototype : string gmstrftime(string format [, int timestamp])
diff --git a/ext/date/tests/gmstrftime_variation21.phpt b/ext/date/tests/gmstrftime_variation21.phpt
index 08ca2fc606..2bdb34999d 100644
--- a/ext/date/tests/gmstrftime_variation21.phpt
+++ b/ext/date/tests/gmstrftime_variation21.phpt
@@ -1,11 +1,5 @@
--TEST--
-Test gmstrftime() function : usage variation - Checking Preferred date and time representation on Windows.
---SKIPIF--
-<?php
-if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
- die("skip Test is valid for Windows");
-}
-?>
+Test gmstrftime() function : usage variation - Checking Preferred date and time representation on Windows.
--FILE--
<?php
/* Prototype : string gmstrftime(string format [, int timestamp])
diff --git a/ext/date/tests/gmstrftime_variation9.phpt b/ext/date/tests/gmstrftime_variation9.phpt
index ec69404cfc..560ea2db47 100644
--- a/ext/date/tests/gmstrftime_variation9.phpt
+++ b/ext/date/tests/gmstrftime_variation9.phpt
@@ -1,11 +1,5 @@
--TEST--
Test gmstrftime() function : usage variation - Checking week related formats which was not supported on Windows before vc14.
---SKIPIF--
-<?php
-if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
- die("skip Test is only valid for Windows");
-}
-?>
--FILE--
<?php
/* Prototype : string gmstrftime(string format [, int timestamp])
diff --git a/ext/date/tests/strftime_variation11.phpt b/ext/date/tests/strftime_variation11.phpt
index 08d5634daa..95d2d6aaa9 100644
--- a/ext/date/tests/strftime_variation11.phpt
+++ b/ext/date/tests/strftime_variation11.phpt
@@ -1,11 +1,5 @@
--TEST--
Test strftime() function : usage variation - Checking month related formats which was not supported on Windows before VC14.
---SKIPIF--
-<?php
-if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
- die("skip Test is valid for Windows");
-}
-?>
--FILE--
<?php
/* Prototype : string strftime(string format [, int timestamp])
diff --git a/ext/date/tests/strftime_variation13.phpt b/ext/date/tests/strftime_variation13.phpt
index 3218558184..4e0385fd71 100644
--- a/ext/date/tests/strftime_variation13.phpt
+++ b/ext/date/tests/strftime_variation13.phpt
@@ -1,11 +1,5 @@
--TEST--
Test strftime() function : usage variation - Checking date related formats which was not supported on Windows before VC14.
---SKIPIF--
-<?php
-if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
- die("skip Test is valid for Windows");
-}
-?>
--FILE--
<?php
/* Prototype : string strftime(string format [, int timestamp])
diff --git a/ext/date/tests/strftime_variation15.phpt b/ext/date/tests/strftime_variation15.phpt
index 962afd89c5..8bfc07ddff 100644
--- a/ext/date/tests/strftime_variation15.phpt
+++ b/ext/date/tests/strftime_variation15.phpt
@@ -1,11 +1,5 @@
--TEST--
Test strftime() function : usage variation - Checking time related formats which was not supported on Windows before VC14.
---SKIPIF--
-<?php
-if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
- die("skip Test is valid for Windows");
-}
-?>
--FILE--
<?php
/* Prototype : string strftime(string format [, int timestamp])
diff --git a/ext/date/tests/strftime_variation17.phpt b/ext/date/tests/strftime_variation17.phpt
index 66527e3436..99acdacbb4 100644
--- a/ext/date/tests/strftime_variation17.phpt
+++ b/ext/date/tests/strftime_variation17.phpt
@@ -1,11 +1,5 @@
--TEST--
Test strftime() function : usage variation - Checking day related formats which was not supported on Windows before VC14.
---SKIPIF--
-<?php
-if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
- die("skip Test is valid for Windows");
-}
-?>
--FILE--
<?php
/* Prototype : string strftime(string format [, int timestamp])
diff --git a/ext/date/tests/strftime_variation19.phpt b/ext/date/tests/strftime_variation19.phpt
index 49fe1c1f1c..7989e01c7d 100644
--- a/ext/date/tests/strftime_variation19.phpt
+++ b/ext/date/tests/strftime_variation19.phpt
@@ -1,11 +1,5 @@
--TEST--
Test strftime() function : usage variation - Checking newline and tab formats which was not supported on Windows before VC14.
---SKIPIF--
-<?php
-if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
- die("skip Test is valid for Windows");
-}
-?>
--FILE--
<?php
/* Prototype : string strftime(string format [, int timestamp])
diff --git a/ext/date/tests/strftime_variation21.phpt b/ext/date/tests/strftime_variation21.phpt
index 735659298a..3cdc3b6995 100644
--- a/ext/date/tests/strftime_variation21.phpt
+++ b/ext/date/tests/strftime_variation21.phpt
@@ -1,11 +1,5 @@
--TEST--
Test strftime() function : usage variation - Checking Preferred date and time representation on Windows.
---SKIPIF--
-<?php
-if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
- die("skip Test is valid for Windows");
-}
-?>
--FILE--
<?php
/* Prototype : string strftime(string format [, int timestamp])
diff --git a/ext/date/tests/strftime_variation9.phpt b/ext/date/tests/strftime_variation9.phpt
index eff030984f..6318282253 100644
--- a/ext/date/tests/strftime_variation9.phpt
+++ b/ext/date/tests/strftime_variation9.phpt
@@ -1,11 +1,5 @@
--TEST--
Test strftime() function : usage variation - Checking week related formats which was not supported on Windows before VC14.
---SKIPIF--
-<?php
-if (strtoupper(substr(PHP_OS, 0, 3)) != 'WIN') {
- die("skip Test is valid for Windows");
-}
-?>
--FILE--
<?php
/* Prototype : string strftime(string format [, int timestamp])
diff --git a/ext/pcre/tests/bug72463_2.phpt b/ext/pcre/tests/bug72463_2.phpt
index 1baeb0f2a1..9b9ac9bdc5 100644
--- a/ext/pcre/tests/bug72463_2.phpt
+++ b/ext/pcre/tests/bug72463_2.phpt
@@ -1,11 +1,5 @@
--TEST--
Bug #72463 mail fails with invalid argument
---SKIPIF--
-<?php
-if(substr(PHP_OS, 0, 3) != "WIN") {
- die('skip windows only');
-}
-?>
--INI--
SMTP=non.existent.smtp.server
--FILE--
diff --git a/ext/sockets/tests/bug63000.phpt b/ext/sockets/tests/bug63000.phpt
index a467d143c6..024f784ccb 100644
--- a/ext/sockets/tests/bug63000.phpt
+++ b/ext/sockets/tests/bug63000.phpt
@@ -5,9 +5,6 @@ Bug #63000: Multicast on OSX
if (!extension_loaded('sockets')) {
die('skip sockets extension not available.');
}
-if (PHP_OS !== 'Darwin') {
- die('skip Is not OSX.');
-}
--FILE--
<?php
$socket = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
diff --git a/ext/sockets/tests/socket_send.phpt b/ext/sockets/tests/socket_send.phpt
index a11e0d7732..dd6be6898b 100644
--- a/ext/sockets/tests/socket_send.phpt
+++ b/ext/sockets/tests/socket_send.phpt
@@ -8,9 +8,6 @@ if (getenv("SKIP_ONLINE_TESTS")) die("skip online test");
if (!extension_loaded('sockets')) {
die('SKIP sockets extension not available.');
}
-if(substr(PHP_OS, 0, 3) == 'WIN' ) {
- die('skip not for windows');
-}
?>
--FILE--
<?php
diff --git a/ext/sockets/tests/socket_send_win32.phpt b/ext/sockets/tests/socket_send_win32.phpt
deleted file mode 100644
index 3f53dfc5a2..0000000000
--- a/ext/sockets/tests/socket_send_win32.phpt
+++ /dev/null
@@ -1,43 +0,0 @@
---TEST--
-int socket_send ( resource $socket , string $buf , int $len , int $flags );
---CREDITS--
-marcosptf - <marcosptf@yahoo.com.br> - #phparty7 - @phpsp - novatec/2015 - sao paulo - br
---SKIPIF--
-<?php
-if (!extension_loaded('sockets')) {
- die('SKIP sockets extension not available.');
-}
-if(substr(PHP_OS, 0, 3) != 'WIN' ) {
- die('skip windows only test');
-}
-?>
---FILE--
-<?php
-$port = 80;
-$host = "yahoo.com";
-$stringSocket = "send_socket_to_connected_socket";
-$stringSocketLength = strlen($stringSocket);
-
-$socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
-$socketConn = socket_connect($socket, $host, $port);
-
-if(socket_send($socket, $stringSocket, $stringSocketLength, MSG_OOB)===$stringSocketLength){
- print("okey\n");
-}
-
-if(socket_send($socket, $stringSocket, $stringSocketLength, MSG_DONTROUTE)===$stringSocketLength){
- print("okey\n");
-}
-?>
-<?php
-socket_close($socket);
-unset($port);
-unset($host);
-unset($stringSocket);
-unset($stringSocketLength);
-unset($socket);
-unset($socketConn);
-?>
---EXPECT--
-okey
-okey
diff --git a/ext/sockets/tests/socket_sendrecvmsg_multi_msg-win32.phpt b/ext/sockets/tests/socket_sendrecvmsg_multi_msg-unix.phpt
index 8de2bb5a97..6b46f33715 100644
--- a/ext/sockets/tests/socket_sendrecvmsg_multi_msg-win32.phpt
+++ b/ext/sockets/tests/socket_sendrecvmsg_multi_msg-unix.phpt
@@ -1,18 +1,24 @@
--TEST--
-sendmsg()/recvmsg(): test ability to receive multiple messages (WIN32)
+sendmsg()/recvmsg(): test ability to receive multiple messages
--SKIPIF--
<?php
if (!extension_loaded('sockets'))
die('skip sockets extension not available.');
+
+require 'ipv6_skipif.inc';
+
if (!defined('IPPROTO_IPV6'))
die('skip IPv6 not available.');
-if (substr(PHP_OS, 0, 3) != 'WIN')
- die('skip Only for Windows!');
+if (substr(PHP_OS, 0, 3) == 'WIN')
+ die('skip Not for the Windows!');
/* Windows supports IPV6_RECVTCLASS and is able to receive the tclass via
* WSARecvMsg (though only the top 6 bits seem to reported), but WSASendMsg
- * does not accept IPV6_TCLASS messages. We still test that sendmsg() works
- * corectly by sending an IPV6_PKTINFO message that will have no effect */
+ * does not accept IPV6_TCLASS messages */
+if (!defined('IPV6_RECVPKTINFO')) {
+ die('skip IPV6_RECVPKTINFO not available.');
+}
+?>
--FILE--
<?php
include __DIR__."/mcast_helpers.php.inc";
@@ -39,11 +45,8 @@ $r = socket_sendmsg($sends1, [
"iov" => ["test ", "thing", "\n"],
"control" => [[
"level" => IPPROTO_IPV6,
- "type" => IPV6_PKTINFO,
- "data" => [
- 'addr' => '::1',
- 'ifindex' => 1 /* we're assuming loopback is 1. Is this a safe assumption? */
- ],
+ "type" => IPV6_TCLASS,
+ "data" => 40,
]]
], 0);
var_dump($r);
@@ -60,10 +63,10 @@ print_r($data);
--EXPECTF--
creating send socket
-resource(%d) of type (Socket)
+resource(5) of type (Socket)
bool(true)
creating receive socket
-resource(%d) of type (Socket)
+resource(6) of type (Socket)
bool(true)
int(11)
Array
@@ -95,7 +98,7 @@ Array
(
[level] => %d
[type] => %d
- [data] => 0
+ [data] => 40
)
)
diff --git a/ext/sockets/tests/socket_sendrecvmsg_multi_msg.phpt b/ext/sockets/tests/socket_sendrecvmsg_multi_msg.phpt
index 6b46f33715..750b22dabf 100644
--- a/ext/sockets/tests/socket_sendrecvmsg_multi_msg.phpt
+++ b/ext/sockets/tests/socket_sendrecvmsg_multi_msg.phpt
@@ -1,24 +1,16 @@
--TEST--
-sendmsg()/recvmsg(): test ability to receive multiple messages
+sendmsg()/recvmsg(): test ability to receive multiple messages (WIN32)
--SKIPIF--
<?php
if (!extension_loaded('sockets'))
die('skip sockets extension not available.');
-
-require 'ipv6_skipif.inc';
-
if (!defined('IPPROTO_IPV6'))
die('skip IPv6 not available.');
-if (substr(PHP_OS, 0, 3) == 'WIN')
- die('skip Not for the Windows!');
/* Windows supports IPV6_RECVTCLASS and is able to receive the tclass via
* WSARecvMsg (though only the top 6 bits seem to reported), but WSASendMsg
- * does not accept IPV6_TCLASS messages */
+ * does not accept IPV6_TCLASS messages. We still test that sendmsg() works
+ * corectly by sending an IPV6_PKTINFO message that will have no effect */
-if (!defined('IPV6_RECVPKTINFO')) {
- die('skip IPV6_RECVPKTINFO not available.');
-}
-?>
--FILE--
<?php
include __DIR__."/mcast_helpers.php.inc";
@@ -45,8 +37,11 @@ $r = socket_sendmsg($sends1, [
"iov" => ["test ", "thing", "\n"],
"control" => [[
"level" => IPPROTO_IPV6,
- "type" => IPV6_TCLASS,
- "data" => 40,
+ "type" => IPV6_PKTINFO,
+ "data" => [
+ 'addr' => '::1',
+ 'ifindex' => 1 /* we're assuming loopback is 1. Is this a safe assumption? */
+ ],
]]
], 0);
var_dump($r);
@@ -63,10 +58,10 @@ print_r($data);
--EXPECTF--
creating send socket
-resource(5) of type (Socket)
+resource(%d) of type (Socket)
bool(true)
creating receive socket
-resource(6) of type (Socket)
+resource(%d) of type (Socket)
bool(true)
int(11)
Array
@@ -98,7 +93,7 @@ Array
(
[level] => %d
[type] => %d
- [data] => 40
+ [data] => 0
)
)
diff --git a/ext/standard/tests/file/bug43353-win32.phpt b/ext/standard/tests/file/bug43353-win32.phpt
deleted file mode 100644
index 76605d97a8..0000000000
--- a/ext/standard/tests/file/bug43353-win32.phpt
+++ /dev/null
@@ -1,25 +0,0 @@
---TEST--
-Bug #43353 wrong detection of 'data' wrapper
---SKIPIF--
-<?php
-if(substr(PHP_OS, 0, 3) != "WIN")
- die("skip Run only on Windows");
-?>
---INI--
-allow_url_fopen=1
---FILE--
-<?php
-
-var_dump(is_dir('file:///datafoo:test'));
-var_dump(is_dir('datafoo:test'));
-var_dump(file_get_contents('data:text/plain,foo'));
-var_dump(file_get_contents('datafoo:text/plain,foo'));
-
-?>
---EXPECTF--
-bool(false)
-bool(false)
-string(3) "foo"
-
-Warning: file_get_contents(datafoo:text/plain,foo): failed to open stream: No such file or directory in %s
-bool(false)
diff --git a/ext/standard/tests/file/bug43353.phpt b/ext/standard/tests/file/bug43353.phpt
index 87d0650006..d9576f24e2 100644
--- a/ext/standard/tests/file/bug43353.phpt
+++ b/ext/standard/tests/file/bug43353.phpt
@@ -1,10 +1,5 @@
--TEST--
Bug #43353 wrong detection of 'data' wrapper
---SKIPIF--
-<?php
-if(substr(PHP_OS, 0, 3) == "WIN")
- die("skip on Windows");
-?>
--INI--
allow_url_fopen=1
--FILE--
diff --git a/ext/standard/tests/file/bug44805.phpt b/ext/standard/tests/file/bug44805.phpt
index 8e13c38629..c9a2918e9c 100644
--- a/ext/standard/tests/file/bug44805.phpt
+++ b/ext/standard/tests/file/bug44805.phpt
@@ -1,11 +1,5 @@
--TEST--
Bug#44806 (rename() function is not portable to Windows)
---SKIPIF--
-<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die('skip.. only for Windows');
-}
-?>
--FILE--
<?php
$dirname = dirname(__FILE__);
diff --git a/ext/standard/tests/file/bug60120.phpt b/ext/standard/tests/file/bug60120.phpt
index 150333aa62..ce9f3b4099 100644
--- a/ext/standard/tests/file/bug60120.phpt
+++ b/ext/standard/tests/file/bug60120.phpt
@@ -2,9 +2,6 @@
Bug #60120 (proc_open hangs when data in stdin/out/err is getting larger or equal to 2048)
--SKIPIF--
<?php
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die('skip only for Windows');
-}
$php = getenv('TEST_PHP_EXECUTABLE');
if (!$php) {
die("skip No php executable defined\n");
diff --git a/ext/standard/tests/file/bug65272.phpt b/ext/standard/tests/file/bug65272.phpt
index c6c6aa136e..81a1e48979 100644
--- a/ext/standard/tests/file/bug65272.phpt
+++ b/ext/standard/tests/file/bug65272.phpt
@@ -1,9 +1,5 @@
--TEST--
Bug #65272: flock() correctly sets wouldblock out param in windows
---SKIPIF--
-<?php
-if (stripos(PHP_OS, 'win') !== 0) die("skip windows required");
-?>
--FILE--
<?php
diff --git a/ext/standard/tests/general_functions/proc_open-win32-mb0.phpt b/ext/standard/tests/general_functions/proc_open-mb0.phpt
index 981c4b22aa..9f4eef504b 100644
--- a/ext/standard/tests/general_functions/proc_open-win32-mb0.phpt
+++ b/ext/standard/tests/general_functions/proc_open-mb0.phpt
@@ -2,7 +2,6 @@
proc_open with bypass_shell subprocess parameter passing
--SKIPIF--
<?php # vim:syn=php
-if (substr(PHP_OS, 0, 3) != 'WIN') die("skip Valid only on Windows");
if (php_sapi_name() != "cli") die('skip CLI only test');
if (!function_exists("proc_open")) echo "skip proc_open() is not available";
?>
diff --git a/ext/standard/tests/general_functions/proc_open-win32-mb1.phpt b/ext/standard/tests/general_functions/proc_open-mb1.phpt
index f1a70a23e8..7787b7aff1 100644
--- a/ext/standard/tests/general_functions/proc_open-win32-mb1.phpt
+++ b/ext/standard/tests/general_functions/proc_open-mb1.phpt
@@ -2,7 +2,6 @@
proc_open without bypass_shell subprocess parameter passing
--SKIPIF--
<?php # vim:syn=php
-if (substr(PHP_OS, 0, 3) != 'WIN') die("skip Valid only on Windows");
if (php_sapi_name() != "cli") die('skip CLI only test');
if (!function_exists("proc_open")) echo "skip proc_open() is not available";
?>
diff --git a/ext/standard/tests/mail/bug69115.phpt b/ext/standard/tests/mail/bug69115.phpt
index bc485de678..d907a3f520 100644
--- a/ext/standard/tests/mail/bug69115.phpt
+++ b/ext/standard/tests/mail/bug69115.phpt
@@ -1,11 +1,5 @@
--TEST--
Bug #69115 crash in mail (plus indirect pcre test)
---SKIPIF--
-<?php
-if( substr(PHP_OS, 0, 3) != 'WIN' ) {
- die('skip...Windows only test');
-}
-?>
--INI--
SMTP =
smtp_port =
diff --git a/ext/standard/tests/network/syslog_basic-win32.phpt b/ext/standard/tests/network/syslog_basic.phpt
index 88d3c5a6d9..30f21cfb7a 100644
--- a/ext/standard/tests/network/syslog_basic-win32.phpt
+++ b/ext/standard/tests/network/syslog_basic.phpt
@@ -1,10 +1,5 @@
--TEST--
-Test syslog() function : basic functionality
---SKIPIF--
-<?php
-if(substr(PHP_OS, 0, 3) != "WIN")
- die("skip Only run on Windows");
-?>
+Test syslog() function : basic functionality
--FILE--
<?php
/* Prototype : bool syslog(int priority, string message)
diff --git a/ext/standard/tests/streams/bug61371-win.phpt b/ext/standard/tests/streams/bug61371-unix.phpt
index dc70530447..7c64d1d30f 100644
--- a/ext/standard/tests/streams/bug61371-win.phpt
+++ b/ext/standard/tests/streams/bug61371-unix.phpt
@@ -2,8 +2,8 @@
Bug #61371: stream_context_create() causes memory leaks on use streams_socket_create
--SKIPIF--
<?php
-if(substr(PHP_OS, 0, 3) != 'WIN' ) {
- die('skip windows only test');
+if(substr(PHP_OS, 0, 3) == 'WIN' ) {
+ die('skip non windows test');
}
--FILE--
<?php
@@ -19,7 +19,7 @@ for($test=1;$test<=3;$test++) {
echo 'memory: '.round($current / 1024, 0)."kb\n";
for($i=0;$i<=100;$i++) {
$context = stream_context_create(array());
- $stream = stream_socket_client('udp://127.0.0.1:80', $errno, $errstr, 10, STREAM_CLIENT_CONNECT, $context);
+ $stream = stream_socket_client('udp://0.0.0.0:80', $errno, $errstr, 10, STREAM_CLIENT_CONNECT, $context);
if ($doFclose) fclose($stream);
unset($context);
unset($stream);
diff --git a/ext/standard/tests/streams/bug61371.phpt b/ext/standard/tests/streams/bug61371.phpt
index 7c64d1d30f..924219f896 100644
--- a/ext/standard/tests/streams/bug61371.phpt
+++ b/ext/standard/tests/streams/bug61371.phpt
@@ -1,10 +1,5 @@
--TEST--
Bug #61371: stream_context_create() causes memory leaks on use streams_socket_create
---SKIPIF--
-<?php
-if(substr(PHP_OS, 0, 3) == 'WIN' ) {
- die('skip non windows test');
-}
--FILE--
<?php
function test($doFclose) {
@@ -19,7 +14,7 @@ for($test=1;$test<=3;$test++) {
echo 'memory: '.round($current / 1024, 0)."kb\n";
for($i=0;$i<=100;$i++) {
$context = stream_context_create(array());
- $stream = stream_socket_client('udp://0.0.0.0:80', $errno, $errstr, 10, STREAM_CLIENT_CONNECT, $context);
+ $stream = stream_socket_client('udp://127.0.0.1:80', $errno, $errstr, 10, STREAM_CLIENT_CONNECT, $context);
if ($doFclose) fclose($stream);
unset($context);
unset($stream);
diff --git a/sapi/cgi/tests/bug75574_utf8_win.phpt b/sapi/cgi/tests/bug75574_utf8.phpt
index f250de9102..650d4a75f1 100644
--- a/sapi/cgi/tests/bug75574_utf8_win.phpt
+++ b/sapi/cgi/tests/bug75574_utf8.phpt
@@ -2,10 +2,6 @@
Bug #75574 putenv does not work properly if parameter contains non-ASCII unicode character, UTF-8
--SKIPIF--
<?php
-
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die("skip Valid only on Windows");
-}
include "skipif.inc";
?>
--FILE--
@@ -29,7 +25,7 @@ unlink($fn);
?>
===DONE===
---EXPECT--
+--EXPECT--
bool(true)
string(3) "啊"
===DONE===
diff --git a/sapi/cli/tests/002-win32.phpt b/sapi/cli/tests/002-unix.phpt
index 6176625c5b..c67b93eba2 100644
--- a/sapi/cli/tests/002-win32.phpt
+++ b/sapi/cli/tests/002-unix.phpt
@@ -3,8 +3,8 @@ running code with -r
--SKIPIF--
<?php
include "skipif.inc";
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die ("skip only for Windows");
+if (substr(PHP_OS, 0, 3) == 'WIN') {
+ die ("skip not for Windows");
}
?>
--FILE--
@@ -12,7 +12,7 @@ if (substr(PHP_OS, 0, 3) != 'WIN') {
$php = getenv('TEST_PHP_EXECUTABLE');
-var_dump(`$php -n -r "var_dump('hello');"`);
+var_dump(`$php -n -r 'var_dump("hello");'`);
echo "Done\n";
?>
diff --git a/sapi/cli/tests/002.phpt b/sapi/cli/tests/002.phpt
index c67b93eba2..496715376e 100644
--- a/sapi/cli/tests/002.phpt
+++ b/sapi/cli/tests/002.phpt
@@ -1,18 +1,15 @@
--TEST--
running code with -r
--SKIPIF--
-<?php
-include "skipif.inc";
-if (substr(PHP_OS, 0, 3) == 'WIN') {
- die ("skip not for Windows");
-}
+<?php
+include "skipif.inc";
?>
--FILE--
<?php
$php = getenv('TEST_PHP_EXECUTABLE');
-var_dump(`$php -n -r 'var_dump("hello");'`);
+var_dump(`$php -n -r "var_dump('hello');"`);
echo "Done\n";
?>
diff --git a/sapi/cli/tests/argv_mb.phpt b/sapi/cli/tests/argv_mb.phpt
index e8c47f0972..2a9d7a132a 100644
--- a/sapi/cli/tests/argv_mb.phpt
+++ b/sapi/cli/tests/argv_mb.phpt
@@ -1,11 +1,8 @@
--TEST--
Test basic argv multibyte API integration
--SKIPIF--
-<?php
-include "skipif.inc";
-if (substr(PHP_OS, 0, 3) != 'WIN') {
- die ("skip only for Windows");
-}
+<?php
+include "skipif.inc";
?>
--FILE--
<?php
diff --git a/tests/security/open_basedir_mkdir.phpt b/tests/security/open_basedir_mkdir.phpt
index 91cb392206..2ef4812cd2 100644
--- a/tests/security/open_basedir_mkdir.phpt
+++ b/tests/security/open_basedir_mkdir.phpt
@@ -1,11 +1,5 @@
--TEST--
Test open_basedir configuration
---SKIPIF--
-<?php
-if(PHP_OS_FAMILY !== "Windows") {
- die('skip Windows only variation');
-}
-?>
--INI--
open_basedir=.
--FILE--