mirror of
https://github.com/php/php-src.git
synced 2024-11-24 10:24:11 +08:00
fix many parallel test issues
While running these on HHVM I've run into a lot of parallelism issues. I'm backporting all the fixes I had to do in https://github.com/facebook/hiphop-php/blob/master/hphp/tools/import_zend_test.py#L650 to php core. Most of these changes were just filenames that were shared between tests, but I did more surgery on the fixed ports. I can apreciate port 31337 as much as the next nerd, but random ports are better for tests.
This commit is contained in:
parent
c439ac6c35
commit
9c1e1bbc05
@ -16,7 +16,7 @@ ftp_login($ftp, 'user', 'pass');
|
||||
if (!$ftp) die("Couldn't connect to the server");
|
||||
ftp_set_option($ftp, FTP_AUTOSEEK, false);
|
||||
|
||||
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
|
||||
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic1.txt";
|
||||
$handle = fopen($local_file, 'w');
|
||||
|
||||
var_dump(ftp_fget($ftp, $handle, 'fget.txt', FTP_ASCII, FTP_AUTORESUME));
|
||||
@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file));
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
|
||||
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic1.txt");
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
|
@ -15,7 +15,7 @@ $ftp = ftp_connect('127.0.0.1', $port);
|
||||
ftp_login($ftp, 'user', 'pass');
|
||||
if (!$ftp) die("Couldn't connect to the server");
|
||||
|
||||
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
|
||||
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic2.txt";
|
||||
file_put_contents($local_file, 'ASCIIFoo');
|
||||
$handle = fopen($local_file, 'a');
|
||||
|
||||
@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file));
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
|
||||
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic2.txt");
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
|
@ -15,7 +15,7 @@ $ftp = ftp_connect('127.0.0.1', $port);
|
||||
ftp_login($ftp, 'user', 'pass');
|
||||
if (!$ftp) die("Couldn't connect to the server");
|
||||
|
||||
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
|
||||
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic3.txt";
|
||||
file_put_contents($local_file, 'ASCIIFoo');
|
||||
$handle = fopen($local_file, 'a');
|
||||
|
||||
@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file));
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
|
||||
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_fget_basic3.txt");
|
||||
?>
|
||||
--EXPECT--
|
||||
bool(true)
|
||||
|
@ -16,7 +16,7 @@ ftp_login($ftp, 'user', 'pass');
|
||||
if (!$ftp) die("Couldn't connect to the server");
|
||||
ftp_set_option($ftp, FTP_AUTOSEEK, false);
|
||||
|
||||
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
|
||||
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic1.txt";
|
||||
$handle = fopen($local_file, 'w');
|
||||
|
||||
var_dump(ftp_nb_fget($ftp, $handle, 'fget.txt', FTP_ASCII, FTP_AUTORESUME));
|
||||
@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file));
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
|
||||
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic1.txt");
|
||||
?>
|
||||
--EXPECT--
|
||||
int(2)
|
||||
|
@ -15,7 +15,7 @@ $ftp = ftp_connect('127.0.0.1', $port);
|
||||
ftp_login($ftp, 'user', 'pass');
|
||||
if (!$ftp) die("Couldn't connect to the server");
|
||||
|
||||
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
|
||||
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic2.txt";
|
||||
file_put_contents($local_file, 'ASCIIFoo');
|
||||
$handle = fopen($local_file, 'a');
|
||||
|
||||
@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file));
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
|
||||
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic2.txt");
|
||||
?>
|
||||
--EXPECT--
|
||||
int(2)
|
||||
|
@ -15,7 +15,7 @@ $ftp = ftp_connect('127.0.0.1', $port);
|
||||
ftp_login($ftp, 'user', 'pass');
|
||||
if (!$ftp) die("Couldn't connect to the server");
|
||||
|
||||
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
|
||||
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic3.txt";
|
||||
file_put_contents($local_file, 'ASCIIFoo');
|
||||
$handle = fopen($local_file, 'a');
|
||||
|
||||
@ -24,7 +24,7 @@ var_dump(file_get_contents($local_file));
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
|
||||
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_fget_basic3.txt");
|
||||
?>
|
||||
--EXPECT--
|
||||
int(2)
|
||||
|
@ -18,7 +18,7 @@ $ftp = ftp_connect('127.0.0.1', $port);
|
||||
ftp_login($ftp, 'user', 'pass');
|
||||
if (!$ftp) die("Couldn't connect to the server");
|
||||
|
||||
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt";
|
||||
$local_file = dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_get_large.txt";
|
||||
touch($local_file);
|
||||
ftp_nb_get($ftp, $local_file, 'fget_large.txt', FTP_BINARY, 5368709119);
|
||||
$fp = fopen($local_file, 'r');
|
||||
@ -29,7 +29,7 @@ fclose($fp);
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "localfile.txt");
|
||||
@unlink(dirname(__FILE__) . DIRECTORY_SEPARATOR . "ftp_nb_get_large.txt");
|
||||
?>
|
||||
--EXPECT--
|
||||
string(1) "X"
|
||||
|
@ -7,16 +7,16 @@ Erwin Poeze <erwin.poeze@gmail.com>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
file_put_contents('testdata.csv', 'eerste;tweede;derde');
|
||||
file_put_contents('SplFileObject_getflags_basic.csv', 'eerste;tweede;derde');
|
||||
|
||||
$fo = new SplFileObject('testdata.csv');
|
||||
$fo = new SplFileObject('SplFileObject_getflags_basic.csv');
|
||||
|
||||
$fo->setFlags(SplFileObject::DROP_NEW_LINE);
|
||||
var_dump($fo->getFlags());
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink('testdata.csv');
|
||||
unlink('SplFileObject_getflags_basic.csv');
|
||||
?>
|
||||
--EXPECT--
|
||||
int(1)
|
||||
|
@ -7,10 +7,10 @@ Erwin Poeze <erwin.poeze@gmail.com>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
file_put_contents('testdata.csv', 'eerste;tweede;derde');
|
||||
file_put_contents('SplFileObject_getflags_error001.csv', 'eerste;tweede;derde');
|
||||
|
||||
|
||||
$fo = new SplFileObject('testdata.csv');
|
||||
$fo = new SplFileObject('SplFileObject_getflags_error001.csv');
|
||||
$fo->setFlags(SplFileObject::READ_CSV);
|
||||
|
||||
$fo->setFlags(SplFileObject::DROP_NEW_LINE);
|
||||
@ -20,7 +20,7 @@ var_dump($fo->getFlags());
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink('testdata.csv');
|
||||
unlink('SplFileObject_getflags_error001.csv');
|
||||
?>
|
||||
--EXPECT--
|
||||
int(1)
|
||||
|
@ -5,9 +5,9 @@ Erwin Poeze <erwin.poeze@gmail.com>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
file_put_contents('testdata.csv', 'eerste;tweede;derde');
|
||||
file_put_contents('SplFileObject_getflags_error002.csv', 'eerste;tweede;derde');
|
||||
|
||||
$fo = new SplFileObject('testdata.csv');
|
||||
$fo = new SplFileObject('SplFileObject_getflags_error002.csv');
|
||||
$fo->setFlags(SplFileObject::READ_CSV);
|
||||
|
||||
$fo->getFlags('fake');
|
||||
@ -15,7 +15,7 @@ $fo->getFlags('fake');
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink('testdata.csv');
|
||||
unlink('SplFileObject_getflags_error002.csv');
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: SplFileObject::getFlags() expects exactly 0 parameters, 1 given in %s on line %d
|
||||
|
@ -7,16 +7,16 @@ Erwin Poeze <erwin.poeze@gmail.com>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
file_put_contents('testdata.csv', 'eerste;tweede;derde');
|
||||
file_put_contents('SplFileObject_rewind_error001.csv', 'eerste;tweede;derde');
|
||||
|
||||
$fo = new SplFileObject('testdata.csv');
|
||||
$fo = new SplFileObject('SplFileObject_rewind_error001.csv');
|
||||
|
||||
$fo->rewind( "invalid" );
|
||||
|
||||
?>
|
||||
--CLEAN--
|
||||
<?php
|
||||
unlink('testdata.csv');
|
||||
unlink('SplFileObject_rewind_error001.csv');
|
||||
?>
|
||||
--EXPECTF--
|
||||
Warning: SplFileObject::rewind() expects exactly 0 parameters, 1 given in %s on line %d
|
||||
|
@ -5,11 +5,17 @@ Dave Kelsey <d_kelsey@uk.ibm.com>
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
/* Setup socket server */
|
||||
$server = stream_socket_server('tcp://127.0.0.1:31337');
|
||||
for ($i=0; $i<100; $i++) {
|
||||
$port = rand(10000, 65000);
|
||||
/* Setup socket server */
|
||||
$server = @stream_socket_server("tcp://127.0.0.1:$port");
|
||||
if ($server) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Connect to it */
|
||||
$client = fsockopen('tcp://127.0.0.1:31337');
|
||||
$client = fsockopen("tcp://127.0.0.1:$port");
|
||||
|
||||
if (!$client) {
|
||||
die("Unable to create socket");
|
||||
|
@ -16,11 +16,17 @@ for ($i = 0; $i < 1000; $i++) {
|
||||
}
|
||||
fclose($fd);
|
||||
|
||||
/* Setup socket server */
|
||||
$server = stream_socket_server('tcp://127.0.0.1:31337');
|
||||
for ($i=0; $i<100; $i++) {
|
||||
$port = rand(10000, 65000);
|
||||
/* Setup socket server */
|
||||
$server = @stream_socket_server("tcp://127.0.0.1:$port");
|
||||
if ($server) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
/* Connect to it */
|
||||
$client = fsockopen('tcp://127.0.0.1:31337');
|
||||
$client = fsockopen("tcp://127.0.0.1:$port");
|
||||
|
||||
if (!$client) {
|
||||
die("Unable to create socket");
|
||||
|
@ -17,10 +17,10 @@ if(substr(PHP_OS, 0, 3) == "WIN")
|
||||
|
||||
echo "*** Testing file_put_contents() : usage variation ***\n";
|
||||
|
||||
$filename = dirname(__FILE__).'/fileGetContentsVar9.tmp';
|
||||
$softlink = dirname(__FILE__).'/fileGetContentsVar9.SoftLink';
|
||||
$hardlink = dirname(__FILE__).'/fileGetContentsVar9.HardLink';
|
||||
$chainlink = dirname(__FILE__).'/fileGetContentsVar9.ChainLink';
|
||||
$filename = dirname(__FILE__).'/filePutContentsVar9.tmp';
|
||||
$softlink = dirname(__FILE__).'/filePutContentsVar9.SoftLink';
|
||||
$hardlink = dirname(__FILE__).'/filePutContentsVar9.HardLink';
|
||||
$chainlink = dirname(__FILE__).'/filePutContentsVar9.ChainLink';
|
||||
|
||||
|
||||
// link files even though it original file doesn't exist yet
|
||||
|
@ -3,7 +3,14 @@ Testing fread() on a TCP server socket
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$tcp_socket = stream_socket_server('tcp://127.0.0.1:31337');
|
||||
for ($i=0; $i<100; $i++) {
|
||||
$port = rand(10000, 65000);
|
||||
/* Setup socket server */
|
||||
$server = @stream_socket_server("tcp://127.0.0.1:$port");
|
||||
if ($server) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
socket_set_timeout($tcp_socket, 0, 1000);
|
||||
|
||||
|
@ -3,7 +3,7 @@ Bug #41445 (parse_ini_file() function parses octal numbers in section names) - 2
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$file = dirname(__FILE__)."/bug41445.ini";
|
||||
$file = dirname(__FILE__)."/bug41445_1.ini";
|
||||
|
||||
$data = <<<DATA
|
||||
[2454.33]
|
||||
|
@ -11,12 +11,18 @@ Test fsockopen() function : basic functionality
|
||||
echo "*** Testing fsockopen() : basic functionality ***\n";
|
||||
|
||||
echo "Open a server socket\n";
|
||||
$server = stream_socket_server('tcp://127.0.0.1:31337');
|
||||
|
||||
for ($i=0; $i<100; $i++) {
|
||||
$port = rand(10000, 65000);
|
||||
/* Setup socket server */
|
||||
$server = @stream_socket_server("tcp://127.0.0.1:$port");
|
||||
if ($server) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Initialise all required variables
|
||||
$hostname = 'tcp://127.0.0.1'; // loopback address
|
||||
$port = 31337;
|
||||
$errno = null;
|
||||
$errstr = null;
|
||||
$timeout = 1.5;
|
||||
|
@ -4,11 +4,17 @@ testing fsockopen without a protocol string
|
||||
<?php
|
||||
|
||||
echo "Open a server socket\n";
|
||||
$server = stream_socket_server('tcp://127.0.0.1:31337');
|
||||
for ($i=0; $i<100; $i++) {
|
||||
$port = rand(10000, 65000);
|
||||
/* Setup socket server */
|
||||
$server = @stream_socket_server("tcp://127.0.0.1:$port");
|
||||
if ($server) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
echo "\nCalling fsockopen() without a protocol in the hostname string:\n";
|
||||
$hostname = '127.0.0.1';
|
||||
$port = '31337';
|
||||
$client = fsockopen($hostname, $port);
|
||||
var_dump($client);
|
||||
fclose($client);
|
||||
|
@ -6,14 +6,22 @@ stream_socket_shutdown() test on IPv4 TCP Loopback
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Setup socket server */
|
||||
$server = stream_socket_server('tcp://127.0.0.1:31337');
|
||||
if (!$server) {
|
||||
|
||||
for ($i=0; $i<100; $i++) {
|
||||
$port = rand(10000, 65000);
|
||||
/* Setup socket server */
|
||||
$server = @stream_socket_server("tcp://127.0.0.1:$port");
|
||||
if ($server) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$server) {
|
||||
die('Unable to create AF_INET socket [server]');
|
||||
}
|
||||
|
||||
/* Connect and send request 1 */
|
||||
$client1 = stream_socket_client('tcp://127.0.0.1:31337');
|
||||
$client1 = stream_socket_client("tcp://127.0.0.1:$port");
|
||||
if (!$client1) {
|
||||
die('Unable to create AF_INET socket [client]');
|
||||
}
|
||||
@ -22,7 +30,7 @@ stream_socket_shutdown() test on IPv4 TCP Loopback
|
||||
@fwrite($client1, "Error 1\n");
|
||||
|
||||
/* Connect and send request 2 */
|
||||
$client2 = stream_socket_client('tcp://127.0.0.1:31337');
|
||||
$client2 = stream_socket_client("tcp://127.0.0.1:$port");
|
||||
if (!$client2) {
|
||||
die('Unable to create AF_INET socket [client]');
|
||||
}
|
||||
|
@ -3,9 +3,17 @@ Testing socket_get_status()
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$tcp_socket = stream_socket_server('tcp://127.0.0.1:31337');
|
||||
var_dump(socket_get_status($tcp_socket));
|
||||
fclose($tcp_socket);
|
||||
for ($i=0; $i<100; $i++) {
|
||||
$port = rand(10000, 65000);
|
||||
/* Setup socket server */
|
||||
$server = @stream_socket_server("tcp://127.0.0.1:$port");
|
||||
if ($server) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
var_dump(socket_get_status($server));
|
||||
fclose($server);
|
||||
|
||||
?>
|
||||
--EXPECTF--
|
||||
|
@ -2,14 +2,21 @@
|
||||
Streams Based IPv4 TCP Loopback test
|
||||
--FILE--
|
||||
<?php # vim:ft=php:
|
||||
/* Setup socket server */
|
||||
$server = stream_socket_server('tcp://127.0.0.1:31337');
|
||||
|
||||
for ($i=0; $i<100; $i++) {
|
||||
$port = rand(10000, 65000);
|
||||
/* Setup socket server */
|
||||
$server = @stream_socket_server("tcp://127.0.0.1:$port");
|
||||
if ($server) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$server) {
|
||||
die('Unable to create AF_INET socket [server]');
|
||||
}
|
||||
|
||||
/* Connect to it */
|
||||
$client = stream_socket_client('tcp://127.0.0.1:31337');
|
||||
$client = stream_socket_client("tcp://127.0.0.1:$port");
|
||||
if (!$client) {
|
||||
die('Unable to create AF_INET socket [client]');
|
||||
}
|
||||
|
@ -10,14 +10,22 @@ Streams Based IPv6 TCP Loopback test
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Setup socket server */
|
||||
$server = stream_socket_server('tcp://[::1]:31337');
|
||||
|
||||
for ($i=0; $i<100; $i++) {
|
||||
$port = rand(10000, 65000);
|
||||
/* Setup socket server */
|
||||
$server = @stream_socket_server("tcp://[::1]:$port");
|
||||
if ($server) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$server) {
|
||||
die('Unable to create AF_INET6 socket [server]');
|
||||
}
|
||||
|
||||
/* Connect to it */
|
||||
$client = stream_socket_client('tcp://[::1]:31337');
|
||||
$client = stream_socket_client("tcp://[::1]:$port");
|
||||
if (!$client) {
|
||||
die('Unable to create AF_INET6 socket [client]');
|
||||
}
|
||||
|
@ -16,14 +16,22 @@ Streams Based IPv6 UDP Loopback test
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
/* Setup socket server */
|
||||
$server = stream_socket_server('udp://[::1]:31337', $errno, $errstr, STREAM_SERVER_BIND);
|
||||
|
||||
for ($i=0; $i<100; $i++) {
|
||||
$port = rand(10000, 65000);
|
||||
/* Setup socket server */
|
||||
$server = @stream_socket_server("udp://[::1]:$port", $errno, $errstr, STREAM_SERVER_BIND);
|
||||
if ($server) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$server) {
|
||||
die('Unable to create AF_INET6 socket [server]');
|
||||
}
|
||||
|
||||
/* Connect to it */
|
||||
$client = stream_socket_client('udp://[::1]:31337');
|
||||
$client = stream_socket_client("udp://[::1]:$port");
|
||||
if (!$client) {
|
||||
die('Unable to create AF_INET6 socket [client]');
|
||||
}
|
||||
|
@ -13,10 +13,16 @@ echo "*** Testing stream_set_timeout() : error conditions ***\n";
|
||||
//Test stream_set_timeout with one more than the expected number of arguments
|
||||
echo "\n-- Testing stream_set_timeout() function with more than expected no. of arguments --\n";
|
||||
|
||||
/* Setup socket server */
|
||||
$server = stream_socket_server('tcp://127.0.0.1:31337');
|
||||
for ($i=0; $i<100; $i++) {
|
||||
$port = rand(10000, 65000);
|
||||
/* Setup socket server */
|
||||
$server = @stream_socket_server("tcp://127.0.0.1:$port");
|
||||
if ($server) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
/* Connect to it */
|
||||
$client = fsockopen('tcp://127.0.0.1:31337');
|
||||
$client = fsockopen("tcp://127.0.0.1:$port");
|
||||
|
||||
$seconds = 10;
|
||||
$microseconds = 10;
|
||||
|
@ -20,7 +20,7 @@ $arg3 = array("one","two","three");
|
||||
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_basic1.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -23,7 +23,7 @@ $arg2 = array(111,222);
|
||||
$arg3 = array(111,222,333);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_basic2.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -24,7 +24,7 @@ $arg2 = array(11.11,22.22);
|
||||
$arg3 = array(11.11,22.22,33.33);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_basic3.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -19,7 +19,7 @@ $arg2 = array(TRUE,FALSE);
|
||||
$arg3 = array(TRUE,FALSE,TRUE);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_basic4.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -19,7 +19,7 @@ $arg2 = array(65,66);
|
||||
$arg3 = array(65,66,67);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_basic5.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -20,7 +20,7 @@ $arg2 = array(1000,2000);
|
||||
$arg3 = array(1000,2000,3000);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_basic6.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -23,7 +23,7 @@ $arg2 = array(-1111,-1234567);
|
||||
$arg3 = array(-1111,-1234567,-2345432);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_basic7.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -23,7 +23,7 @@ $arg2 = array(-1111,-1234567);
|
||||
$arg3 = array(-1111,-1234567,-2345432);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_basic7_64bit.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -19,7 +19,7 @@ $arg2 = array(021,0347);
|
||||
$arg3 = array(021,0347,05678);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_basic8.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -24,7 +24,7 @@ $arg2 = array(11,132);
|
||||
$arg3 = array(11,132,177);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_basic9.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
Binary file not shown.
@ -45,7 +45,7 @@ $args_array = array(
|
||||
);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation11.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -45,7 +45,7 @@ $args_array = array(
|
||||
);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation11_64bit.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -68,7 +68,7 @@ $args_array = array(
|
||||
);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation12.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -68,7 +68,7 @@ $args_array = array(
|
||||
);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation12_64bit.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -45,7 +45,7 @@ $args_array = array(
|
||||
);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation13.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -45,7 +45,7 @@ $args_array = array(
|
||||
);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation13_64bit.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -68,7 +68,7 @@ $args_array = array(
|
||||
);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation14.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -68,7 +68,7 @@ $args_array = array(
|
||||
);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation14_64bit.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -38,7 +38,7 @@ $args_array = array(
|
||||
);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation15.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -38,7 +38,7 @@ $args_array = array(
|
||||
);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation15_64bit.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -61,7 +61,7 @@ $args_array = array(
|
||||
);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation16.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -61,7 +61,7 @@ $args_array = array(
|
||||
);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation16_64bit.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -34,7 +34,7 @@ $args_array = array(
|
||||
);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation17.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -57,7 +57,7 @@ $args_array = array(
|
||||
);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation18.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -46,7 +46,7 @@ $args_array = array(
|
||||
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation19.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -46,7 +46,7 @@ $args_array = array(
|
||||
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation19_64bit.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -84,7 +84,7 @@ $values = array(
|
||||
);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation20.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -81,7 +81,7 @@ $values = array(
|
||||
);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation21.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -45,7 +45,7 @@ $args_array = array(
|
||||
// and with int values from the above $args_array array
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation3.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -62,7 +62,7 @@ $args_array = array(
|
||||
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation4.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -62,7 +62,7 @@ $args_array = array(
|
||||
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation4_64bit.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -42,7 +42,7 @@ $args_array = array(
|
||||
);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation5.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
@ -57,7 +57,7 @@ $args_array = array(
|
||||
);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation6.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
Binary file not shown.
@ -60,7 +60,7 @@ $args_array = array(
|
||||
);
|
||||
|
||||
/* creating dumping file */
|
||||
$data_file = dirname(__FILE__) . '/dump.txt';
|
||||
$data_file = dirname(__FILE__) . '/vfprintf_variation8.txt';
|
||||
if (!($fp = fopen($data_file, 'wt')))
|
||||
return;
|
||||
|
||||
|
Binary file not shown.
@ -9,7 +9,7 @@ if (!extension_loaded("zlib")) {
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$filename = dirname(__FILE__)."/temp.txt.gz";
|
||||
$filename = dirname(__FILE__)."/gzeof_variation1.txt.gz";
|
||||
$h = gzopen($filename, 'w');
|
||||
$str = "Here is the string to be written. ";
|
||||
$length = 10;
|
||||
|
@ -12,7 +12,7 @@ is a very common test
|
||||
for all languages
|
||||
EOT;
|
||||
$dirname = 'gzfile_temp';
|
||||
$filename = $dirname.'/plainfile.txt.gz';
|
||||
$filename = $dirname.'/gzfile_basic.txt.gz';
|
||||
mkdir($dirname);
|
||||
$h = gzopen($filename, 'w');
|
||||
gzwrite($h, $plaintxt);
|
||||
|
@ -12,7 +12,7 @@ is a very common test
|
||||
for all languages
|
||||
EOT;
|
||||
$dirname = 'gzfile_temp';
|
||||
$filename = $dirname.'/plainfile.txt';
|
||||
$filename = $dirname.'/gzfile_basic2.txt';
|
||||
mkdir($dirname);
|
||||
$h = fopen($filename, 'w');
|
||||
fwrite($h, $plaintxt);
|
||||
|
@ -18,7 +18,7 @@ echo "*** Testing gzopen() : basic functionality ***\n";
|
||||
|
||||
|
||||
// Initialise all required variables
|
||||
$filename = "temp.txt.gz";
|
||||
$filename = "gzopen_basic2.txt.gz";
|
||||
$modes = array('w', 'w+');
|
||||
$data = "This was the information that was written";
|
||||
|
||||
|
@ -9,7 +9,7 @@ if (!extension_loaded("zlib")) {
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$filename = dirname(__FILE__)."/temp.txt.gz";
|
||||
$filename = dirname(__FILE__)."/gzputs_basic.txt.gz";
|
||||
$h = gzopen($filename, 'w');
|
||||
$str = "Here is the string to be written. ";
|
||||
$length = 10;
|
||||
|
@ -9,7 +9,7 @@ if (!extension_loaded("zlib")) {
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$filename = "temp.txt.gz";
|
||||
$filename = "gzread_variation1.txt.gz";
|
||||
$h = gzopen($filename, 'w');
|
||||
$str = "Here is the string to be written. ";
|
||||
var_dump(gzread($h, 100));
|
||||
|
@ -9,7 +9,7 @@ if (!extension_loaded("zlib")) {
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$filename = "temp.txt.gz";
|
||||
$filename = "gzwrite_basic.txt.gz";
|
||||
$h = gzopen($filename, 'w');
|
||||
$str = "Here is the string to be written. ";
|
||||
$length = 10;
|
||||
|
@ -8,7 +8,7 @@ if (!extension_loaded("zlib")) {
|
||||
?>
|
||||
--FILE--
|
||||
<?php
|
||||
$filename = "temp.txt.gz";
|
||||
$filename = "gzwrite_error.txt.gz";
|
||||
$h = gzopen($filename, 'w');
|
||||
$str = "Here is the string to be written. ";
|
||||
$length = 10;
|
||||
|
@ -9,7 +9,7 @@ if (!extension_loaded("zlib")) {
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$filename = "temp.txt.gz";
|
||||
$filename = "gzwrite_error2.txt.gz";
|
||||
$h = gzopen($filename, 'w');
|
||||
$str = "Here is the string to be written. ";
|
||||
var_dump(gzwrite( $h, $str, 0 ) );
|
||||
|
@ -13,7 +13,7 @@ for all languages
|
||||
|
||||
EOT;
|
||||
$dirname = 'readgzfile_temp';
|
||||
$filename = $dirname.'/plainfile.txt.gz';
|
||||
$filename = $dirname.'/readgzfile_basic.txt.gz';
|
||||
mkdir($dirname);
|
||||
$h = gzopen($filename, 'w');
|
||||
gzwrite($h, $plaintxt);
|
||||
|
@ -13,7 +13,7 @@ for all languages
|
||||
|
||||
EOT;
|
||||
$dirname = 'readgzfile_temp';
|
||||
$filename = $dirname.'/plainfile.txt';
|
||||
$filename = $dirname.'/readgzfile_basic2.txt';
|
||||
mkdir($dirname);
|
||||
$h = fopen($filename, 'w');
|
||||
fwrite($h, $plaintxt);
|
||||
|
@ -9,7 +9,7 @@ if (!extension_loaded("zlib")) {
|
||||
--FILE--
|
||||
<?php
|
||||
|
||||
$filename = "temp.txt.gz";
|
||||
$filename = "zlib_wrapper_fflush_basic.txt.gz";
|
||||
$h = gzopen($filename, 'w');
|
||||
$str = "Here is the string to be written.";
|
||||
$length = 10;
|
||||
|
@ -9,7 +9,7 @@ if (!extension_loaded("zlib")) {
|
||||
--FILE--
|
||||
<?php
|
||||
$f = dirname(__FILE__)."/004.txt.gz";
|
||||
$f2 = "temp.txt.gz";
|
||||
$f2 = "zlib_wrapper_ftruncate_basic.txt.gz";
|
||||
copy($f, $f2);
|
||||
|
||||
$h = gzopen($f2, "r");
|
||||
|
Loading…
Reference in New Issue
Block a user