mirror of
https://github.com/php/php-src.git
synced 2024-09-21 09:57:23 +00:00
Make more tests run on Linux
This commit is contained in:
parent
3748d8070f
commit
2f7003847d
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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===
|
@ -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===
|
||||
|
23
ext/curl/tests/bug61948-unix.phpt
Normal file
23
ext/curl/tests/bug61948-unix.phpt
Normal file
@ -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)
|
@ -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)
|
@ -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)
|
||||
|
@ -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
|
@ -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");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : string gmstrftime(string format [, int timestamp])
|
||||
|
@ -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");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : string gmstrftime(string format [, int timestamp])
|
||||
|
@ -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");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : string gmstrftime(string format [, int timestamp])
|
||||
|
@ -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])
|
||||
|
@ -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])
|
||||
|
@ -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");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : string gmstrftime(string format [, int timestamp])
|
||||
|
@ -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])
|
||||
|
@ -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])
|
||||
|
@ -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])
|
||||
|
@ -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])
|
||||
|
@ -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])
|
||||
|
@ -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])
|
||||
|
@ -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])
|
||||
|
@ -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])
|
||||
|
@ -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--
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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
|
@ -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
|
||||
)
|
||||
|
||||
)
|
@ -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
|
||||
)
|
||||
|
||||
)
|
||||
|
@ -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)
|
@ -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--
|
||||
|
@ -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__);
|
||||
|
@ -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");
|
||||
|
@ -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
|
||||
|
||||
|
@ -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";
|
||||
?>
|
@ -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";
|
||||
?>
|
@ -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 =
|
||||
|
@ -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");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype : bool syslog(int priority, string message)
|
@ -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);
|
@ -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);
|
||||
|
@ -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--
|
@ -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";
|
||||
?>
|
@ -3,16 +3,13 @@ running code with -r
|
||||
--SKIPIF--
|
||||
<?php
|
||||
include "skipif.inc";
|
||||
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
||||
die ("skip not for Windows");
|
||||
}
|
||||
?>
|
||||
--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";
|
||||
?>
|
||||
|
@ -3,9 +3,6 @@ Test basic argv multibyte API integration
|
||||
--SKIPIF--
|
||||
<?php
|
||||
include "skipif.inc";
|
||||
if (substr(PHP_OS, 0, 3) != 'WIN') {
|
||||
die ("skip only for Windows");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
@ -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--
|
||||
|
Loading…
Reference in New Issue
Block a user