mirror of
https://github.com/php/php-src.git
synced 2025-08-15 13:38:49 +02:00
Fix borked SKIPIFs
This commit is contained in:
parent
1f0ffece91
commit
0aa3acc6c4
42 changed files with 74 additions and 57 deletions
|
@ -4,7 +4,7 @@ Bug #54995 (Missing CURLINFO_RESPONSE_CODE support)
|
|||
<?php
|
||||
include 'skipif.inc';
|
||||
|
||||
if ($curl_version['version_number'] > 0x070a08) {
|
||||
if (curl_version()['version_number'] > 0x070a08) {
|
||||
exit("skip: tests works a versions of curl >= 7.10.8");
|
||||
}
|
||||
?>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
--TEST--
|
||||
Handling of large year values
|
||||
--SKIPIF--
|
||||
<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK"; ?>
|
||||
<?php if (PHP_INT_SIZE != 8) die("skip 64-bit only"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
date_default_timezone_set("America/Toronto");
|
||||
|
|
|
@ -3,9 +3,11 @@ Bug #26317 (military timezone offset signedness)
|
|||
--INI--
|
||||
date.timezone=GMT0
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!@putenv("TZ=GMT0") || getenv("TZ") != 'GMT0') {
|
||||
die("skip unable to change TZ environment variable\n");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
echo date("Y-m-d H:i:s\n", strtotime("2003-11-19 16:20:42 Z"));
|
||||
|
|
|
@ -3,9 +3,11 @@ Bug #26320 (strtotime handling of XML Schema/ISO 8601 format)
|
|||
--INI--
|
||||
date.timezone=GMT0
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!@putenv("TZ=GMT0") || getenv("TZ") != 'GMT0') {
|
||||
die("skip unable to change TZ environment variable\n");
|
||||
}
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
echo date("Y-m-d H:i:s\n", strtotime("2003-11-19T12:30:42"));
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
--TEST--
|
||||
Bug #41523 (strtotime('0000-00-00 00:00:00') is parsed as 1999-11-30) (64 bit)
|
||||
--SKIPIF--
|
||||
<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK"; ?>
|
||||
<?php if (PHP_INT_SIZE != 8) die("skip 64-bit only"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
date_default_timezone_set("UTC");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
--TEST--
|
||||
Bug #41523 (strtotime('0000-00-00 00:00:00') is parsed as 1999-11-30) (32 bit)
|
||||
--SKIPIF--
|
||||
<?php echo PHP_INT_SIZE == 8 ? "skip 32-bit only" : "OK"; ?>
|
||||
<?php if (PHP_INT_SIZE == 8) die("skip 32-bit only"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
date_default_timezone_set("UTC");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
--TEST--
|
||||
Test for bug #75851: Year component overflow with date formats "c", "o", "r" and "y"
|
||||
--SKIPIF--
|
||||
<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK"; ?>
|
||||
<?php if (PHP_INT_SIZE != 8) die("skip 64-bit only"); ?>
|
||||
--INI--
|
||||
date.timezone = UTC
|
||||
--FILE--
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
--TEST--
|
||||
mktime() [3] (64-bit)
|
||||
--SKIPIF--
|
||||
<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK" ?>
|
||||
<?php if (PHP_INT_SIZE != 8) die("skip 64-bit only"); ?>
|
||||
--INI--
|
||||
error_reporting=2047
|
||||
--FILE--
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
--TEST--
|
||||
mktime() [3] (32-bit)
|
||||
--SKIPIF--
|
||||
<?php echo PHP_INT_SIZE == 8 ? "skip 32-bit only" : "OK" ?>
|
||||
<?php if (PHP_INT_SIZE == 8) die("skip 32-bit only"); ?>
|
||||
--INI--
|
||||
error_reporting=2047
|
||||
--FILE--
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
--TEST--
|
||||
strtotime() and mysql timestamps (64 bit)
|
||||
--SKIPIF--
|
||||
<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK"; ?>
|
||||
<?php if (PHP_INT_SIZE != 8) die("skip 64-bit only"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
date_default_timezone_set('UTC');
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
--TEST--
|
||||
strtotime() and mysql timestamps (32 bit)
|
||||
--SKIPIF--
|
||||
<?php echo PHP_INT_SIZE == 8 ? "skip 32-bit only" : "OK"; ?>
|
||||
<?php if (PHP_INT_SIZE == 8) die("skip 32-bit only"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
date_default_timezone_set('UTC');
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
--TEST--
|
||||
strtotime() function (64 bit)
|
||||
--SKIPIF--
|
||||
<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK"; ?>
|
||||
<?php if (PHP_INT_SIZE != 8) die("skip 64-bit only"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
date_default_timezone_set('Europe/Lisbon');
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
--TEST--
|
||||
strtotime() function (32 bit)
|
||||
--SKIPIF--
|
||||
<?php echo PHP_INT_SIZE == 8 ? "skip 32-bit only" : "OK"; ?>
|
||||
<?php if (PHP_INT_SIZE == 8) die("skip 32-bit only"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
date_default_timezone_set('Europe/Lisbon');
|
||||
|
|
|
@ -5,7 +5,7 @@ memory_limit=-1
|
|||
--SKIPIF--
|
||||
<?php
|
||||
if (!extension_loaded('gd')) die('skip gd extension not available');
|
||||
if (!GD_BUNGLED && version_compare(GD_VERSION, '2.2.5', '<=')) die('skip upstream fix not yet released');
|
||||
if (!GD_BUNDLED && version_compare(GD_VERSION, '2.2.5', '<=')) die('skip upstream fix not yet released');
|
||||
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
|
||||
?>
|
||||
--FILE--
|
||||
|
|
|
@ -1,16 +1,15 @@
|
|||
--TEST--
|
||||
imageploygon()
|
||||
imagepolygon()
|
||||
--SKIPIF--
|
||||
<?php
|
||||
if (!function_exists('imagepolygon')) die('skip imagepolygon() not available');
|
||||
require_once('skipif_imagetype.inc');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/* Prototype : bool imagepolygon ( resource $image , array $points , int $num_points , int $color )
|
||||
* Description: Draws a polygon.
|
||||
* Source code: ext/standard/image.c
|
||||
* Source code: ext/gd/gd.c
|
||||
* Alias to functions:
|
||||
*/
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
<?php echo PHP_INT_SIZE == 8 ? "skip 32-bit only" : "OK"; ?>
|
||||
<?php if (PHP_INT_SIZE == 8) die("skip 32-bit only"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Bug#59597 NumberFormatter::parse() with TYPE_INT64 results in a 32 bit integer
|
||||
--SKIPIF--
|
||||
<?php if( !extension_loaded( 'intl' ) ) print 'skip'; ?>
|
||||
<?php echo PHP_INT_SIZE != 8 ? "skip 64-bit only" : "OK"; ?>
|
||||
<?php if (PHP_INT_SIZE != 8) die("skip 64-bit only"); ?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ Patrick Allaert <patrickallaert@php.net>
|
|||
<?php if (!function_exists("ldap_sasl_bind")) die("skip LDAP extension not compiled with SASL support"); ?>
|
||||
<?php
|
||||
require "connect.inc";
|
||||
$link = fsockopen($host, $port);
|
||||
$link = @fsockopen($host, $port);
|
||||
if (!$link) {
|
||||
die("skip no server listening");
|
||||
}
|
||||
|
|
|
@ -7,7 +7,7 @@ mysqli_stmt_bind_result (SHOW)
|
|||
require_once('skipifconnectfailure.inc');
|
||||
|
||||
require_once("connect.inc");
|
||||
$link = my_mysqli_connect($host, $user, $passwd);
|
||||
$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket);
|
||||
|
||||
$stmt = mysqli_prepare($link, "SHOW VARIABLES LIKE 'port'");
|
||||
mysqli_stmt_execute($stmt);
|
||||
|
|
|
@ -6,7 +6,7 @@ require_once('skipif.inc');
|
|||
require_once('skipifemb.inc');
|
||||
require_once('connect.inc');
|
||||
|
||||
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
|
||||
if (!$link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
|
||||
die(sprintf("SKIP Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
|
||||
$host, $user, $db, $port, $socket));
|
||||
}
|
||||
|
|
|
@ -6,7 +6,7 @@ require_once('skipif.inc');
|
|||
require_once('skipifemb.inc');
|
||||
require_once('connect.inc');
|
||||
|
||||
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
|
||||
if (!$link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
|
||||
die(sprintf("SKIP Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
|
||||
$host, $user, $db, $port, $socket));
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ PDOTest::skip();
|
|||
|
||||
$db = PDOTest::factory();
|
||||
if ($db->getAttribute(PDO::ATTR_DRIVER_NAME) == 'pgsql') die('skip pgsql has its own test for this feature');
|
||||
if (!$db->getAttribute(PDO::ATTR_EMULATE_PREPARES) && !$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, true)) die('skip driver cannot emulate prepared statements');
|
||||
if (!@$db->getAttribute(PDO::ATTR_EMULATE_PREPARES) && !@$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, true)) die('skip driver cannot emulate prepared statements');
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
|
|
@ -13,10 +13,10 @@ $matches = array();
|
|||
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
|
||||
die(sprintf("skip Cannot determine MySQL Server version\n"));
|
||||
|
||||
$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2];
|
||||
$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
|
||||
if ($version < 50000)
|
||||
die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
|
||||
$matches[0], $matches[1], $matches[2], $version));
|
||||
$matches[1], $matches[2], $matches[3], $version));
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
|
|
@ -12,11 +12,11 @@ $matches = array();
|
|||
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
|
||||
die(sprintf("skip Cannot determine MySQL Server version\n"));
|
||||
|
||||
$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2];
|
||||
$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
|
||||
die("skip $version");
|
||||
if ($version < 40100)
|
||||
die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
|
||||
$matches[0], $matches[1], $matches[2], $version));
|
||||
$matches[1], $matches[2], $matches[3], $version));
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
|
|
@ -12,10 +12,10 @@ $matches = array();
|
|||
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
|
||||
die(sprintf("skip Cannot determine MySQL Server version\n"));
|
||||
|
||||
$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2];
|
||||
$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
|
||||
if ($version < 50000)
|
||||
die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
|
||||
$matches[0], $matches[1], $matches[2], $version));
|
||||
$matches[1], $matches[2], $matches[3], $version));
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
|
|
@ -15,10 +15,10 @@ $matches = array();
|
|||
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
|
||||
die(sprintf("skip Cannot determine MySQL Server version\n"));
|
||||
|
||||
$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2];
|
||||
$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
|
||||
if ($version < 41000)
|
||||
die(sprintf("skip Need MySQL Server 4.1.0+, found %d.%02d.%02d (%d)\n",
|
||||
$matches[0], $matches[1], $matches[2], $version));
|
||||
$matches[1], $matches[2], $matches[3], $version));
|
||||
--FILE--
|
||||
<?php
|
||||
require_once(__DIR__ . DIRECTORY_SEPARATOR . 'mysql_pdo_test.inc');
|
||||
|
|
|
@ -15,10 +15,10 @@ $matches = array();
|
|||
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
|
||||
die(sprintf("skip Cannot determine MySQL Server version\n"));
|
||||
|
||||
$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2];
|
||||
$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
|
||||
if ($version < 41000)
|
||||
die(sprintf("skip Will work different with MySQL Server < 4.1.0, found %d.%02d.%02d (%d)\n",
|
||||
$matches[0], $matches[1], $matches[2], $version));
|
||||
$matches[1], $matches[2], $matches[3], $version));
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
|
|
@ -13,10 +13,10 @@ $matches = array();
|
|||
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
|
||||
die(sprintf("skip Cannot determine MySQL Server version\n"));
|
||||
|
||||
$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2];
|
||||
$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
|
||||
if ($version < 40106)
|
||||
die(sprintf("skip Need MySQL Server 4.1.6+, found %d.%02d.%02d (%d)\n",
|
||||
$matches[0], $matches[1], $matches[2], $version));
|
||||
$matches[1], $matches[2], $matches[3], $version));
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
|
|
@ -13,10 +13,10 @@ $matches = array();
|
|||
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
|
||||
die(sprintf("skip Cannot determine MySQL Server version\n"));
|
||||
|
||||
$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2];
|
||||
$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
|
||||
if ($version < 50000)
|
||||
die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
|
||||
$matches[0], $matches[1], $matches[2], $version));
|
||||
$matches[1], $matches[2], $matches[3], $version));
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
|
|
@ -11,10 +11,10 @@ $matches = array();
|
|||
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
|
||||
die(sprintf("skip Cannot determine MySQL Server version\n"));
|
||||
|
||||
$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2];
|
||||
$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
|
||||
if ($version < 50000)
|
||||
die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
|
||||
$matches[0], $matches[1], $matches[2], $version));
|
||||
$matches[1], $matches[2], $matches[3], $version));
|
||||
|
||||
if (!MySQLPDOTest::isPDOMySQLnd())
|
||||
die("skip This will not work with libmysql");
|
||||
|
|
|
@ -13,10 +13,10 @@ $matches = array();
|
|||
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
|
||||
die(sprintf("skip Cannot determine MySQL Server version\n"));
|
||||
|
||||
$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2];
|
||||
$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
|
||||
if ($version < 50000)
|
||||
die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
|
||||
$matches[0], $matches[1], $matches[2], $version));
|
||||
$matches[1], $matches[2], $matches[3], $version));
|
||||
|
||||
if (!MySQLPDOTest::isPDOMySQLnd())
|
||||
die("skip This will not work with libmysql");
|
||||
|
|
|
@ -12,10 +12,10 @@ $matches = array();
|
|||
if (!preg_match('/^(\d+)\.(\d+)\.(\d+)/ismU', $row['_version'], $matches))
|
||||
die(sprintf("skip Cannot determine MySQL Server version\n"));
|
||||
|
||||
$version = $matches[0] * 10000 + $matches[1] * 100 + $matches[2];
|
||||
$version = $matches[1] * 10000 + $matches[2] * 100 + $matches[3];
|
||||
if ($version < 50000)
|
||||
die(sprintf("skip Need MySQL Server 5.0.0+, found %d.%02d.%02d (%d)\n",
|
||||
$matches[0], $matches[1], $matches[2], $version));
|
||||
$matches[1], $matches[2], $matches[3], $version));
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
|
|
|
@ -4,7 +4,10 @@ readline() function - without input
|
|||
Jonathan Stevens <info at jonathanstevens dot be>
|
||||
User Group: PHP-WVL & PHPGent #PHPTestFest
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("readline") || !function_exists('readline') || die("skip"); ?>
|
||||
<?php
|
||||
if (!extension_loaded("readline")) die("skip readline extension is not available");
|
||||
if (!function_exists('readline')) die("skip readline() not available");
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
var_dump(readline());
|
||||
|
|
|
@ -5,6 +5,12 @@ Multicast support: IPv4 send options with unusual values
|
|||
if (!extension_loaded('sockets')) {
|
||||
die('skip sockets extension not available.');
|
||||
}
|
||||
$domain = AF_INET;
|
||||
$level = IPPROTO_IP;
|
||||
$s = socket_create($domain, SOCK_DGRAM, SOL_UDP);
|
||||
if ($s === false) {
|
||||
die("skip unable to create socket");
|
||||
}
|
||||
if (socket_set_option($s, $level, IP_MULTICAST_IF, 1) === false) {
|
||||
die("skip interface 1 either doesn't exist or has no ipv4 address");
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ $br = socket_bind($s, '::', 3000);
|
|||
/* On Linux, there is no route ff00::/8 by default on lo, which makes it
|
||||
* troublesome to send multicast traffic from lo, which we must since
|
||||
* we're dealing with interface-local traffic... */
|
||||
$so = socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_GROUP, array(
|
||||
$so = @socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_GROUP, array(
|
||||
"group" => 'ff01::114',
|
||||
"interface" => 0,
|
||||
));
|
||||
|
@ -31,11 +31,11 @@ if ($r === false) {
|
|||
if (!defined("MCAST_JOIN_SOURCE_GROUP"))
|
||||
die('skip source operations are unavailable');
|
||||
|
||||
$so = socket_set_option($s, IPPROTO_IPV6, MCAST_LEAVE_GROUP, array(
|
||||
$so = @socket_set_option($s, IPPROTO_IPV6, MCAST_LEAVE_GROUP, array(
|
||||
"group" => 'ff01::114',
|
||||
"interface" => 0,
|
||||
));
|
||||
$so = socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_SOURCE_GROUP, array(
|
||||
$so = @socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_SOURCE_GROUP, array(
|
||||
"group" => 'ff01::114',
|
||||
"interface" => 0,
|
||||
"source" => '2001::dead:beef',
|
||||
|
|
|
@ -13,7 +13,7 @@ $br = socket_bind($s, '::', 3000);
|
|||
/* On Linux, there is no route ff00::/8 by default on lo, which makes it
|
||||
* troublesome to send multicast traffic from lo, which we must since
|
||||
* we're dealing with interface-local traffic... */
|
||||
$so = socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_GROUP, array(
|
||||
$so = @socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_GROUP, array(
|
||||
"group" => 'ff01::114',
|
||||
"interface" => 0,
|
||||
));
|
||||
|
@ -24,12 +24,12 @@ $r = socket_sendto($s, $m = "testing packet", strlen($m), 0, 'ff01::114', 3000);
|
|||
if ($r === false) {
|
||||
die('skip unable to send multicast packet.');
|
||||
}
|
||||
$so = socket_set_option($s, IPPROTO_IPV6, MCAST_LEAVE_GROUP, array(
|
||||
$so = @socket_set_option($s, IPPROTO_IPV6, MCAST_LEAVE_GROUP, array(
|
||||
"group" => 'ff01::114',
|
||||
"interface" => 0,
|
||||
));
|
||||
if (defined("MCAST_JOIN_SOURCE_GROUP")) {
|
||||
$so = socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_SOURCE_GROUP, array(
|
||||
$so = @socket_set_option($s, IPPROTO_IPV6, MCAST_JOIN_SOURCE_GROUP, array(
|
||||
"group" => 'ff01::114',
|
||||
"interface" => 0,
|
||||
"source" => '2001::dead:beef',
|
||||
|
|
|
@ -9,7 +9,7 @@ $s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
|
|||
$br = socket_bind($s, '0.0.0.0', 58393);
|
||||
if ($br === false)
|
||||
die("SKIP IPv4/port 58393 not available");
|
||||
$so = socket_set_option($s, IPPROTO_IP, MCAST_JOIN_GROUP, array(
|
||||
$so = @socket_set_option($s, IPPROTO_IP, MCAST_JOIN_GROUP, array(
|
||||
"group" => '224.0.0.23',
|
||||
"interface" => "lo",
|
||||
));
|
||||
|
|
|
@ -9,7 +9,7 @@ $s = socket_create(AF_INET, SOCK_DGRAM, SOL_UDP);
|
|||
$br = socket_bind($s, '0.0.0.0', 58379);
|
||||
if ($br === false)
|
||||
die("SKIP IPv4/port 58379 not available");
|
||||
$so = socket_set_option($s, IPPROTO_IP, MCAST_JOIN_GROUP, array(
|
||||
$so = @socket_set_option($s, IPPROTO_IP, MCAST_JOIN_GROUP, array(
|
||||
"group" => '224.0.0.23',
|
||||
"interface" => "lo",
|
||||
));
|
||||
|
|
|
@ -7,7 +7,6 @@ if (substr(PHP_OS, 0, 3) == 'WIN') {
|
|||
die('skip.. Not valid for Windows');
|
||||
}
|
||||
?>
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Prototype: array lstat ( string $filename );
|
||||
|
|
|
@ -3,7 +3,7 @@ sapi_windows_set_ctrl_handler()
|
|||
--SKIPIF--
|
||||
<?php
|
||||
|
||||
include "skipinf.inc";
|
||||
include "skipif.inc";
|
||||
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) !== 'WIN')
|
||||
die("skip this test is for Windows platforms only");
|
||||
|
|
|
@ -8,10 +8,16 @@ if (PHP_INT_SIZE < 8) {
|
|||
die("skip need PHP_INT_SIZE>=8");
|
||||
}
|
||||
|
||||
if (!file_exists('/proc/meminfo')) {
|
||||
die('skip Cannot check free RAM from /proc/meminfo on this platform');
|
||||
}
|
||||
|
||||
$free_ram = 0;
|
||||
if ($f = fopen("/proc/meminfo","r")) {
|
||||
while (!feof($f)) {
|
||||
if (!strncmp($line = fgets($f), "MemFree", 7)) {
|
||||
if (substr($line,8)/1024/1024 > 3) {
|
||||
if (preg_match('/MemFree[^\d]*(\d+)/i', fgets($f), $m)) {
|
||||
$free_ram = max($free_ram, $m[1]/1024/1024);
|
||||
if ($free_ram > 3) {
|
||||
$enough_free_ram = true;
|
||||
}
|
||||
}
|
||||
|
@ -19,7 +25,7 @@ if ($f = fopen("/proc/meminfo","r")) {
|
|||
}
|
||||
|
||||
if (empty($enough_free_ram)) {
|
||||
die("skip need +3G free RAM");
|
||||
die(sprintf("skip need +3G free RAM, but only %01.2f available", $free_ram));
|
||||
}
|
||||
|
||||
if (getenv('TRAVIS')) {
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
Bug #20539 (PHP CLI Segmentation Fault)
|
||||
--SKIPIF--
|
||||
<?php if (!extension_loaded("session")) die("skip session extension not available"); ?>
|
||||
<?php unlink(__DIR__. '/sess_' .session_id()); ?>
|
||||
<?php if (file_exists(__DIR__. '/sess_' .session_id())) unlink(__DIR__. '/sess_' .session_id()); ?>
|
||||
--INI--
|
||||
session.auto_start=1
|
||||
session.save_handler=files
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue