com php-src: rename test: sapi/fpm/tests/023-bug72212.phpt sapi/fpm/tests/024-bug72212.phpt

From: Date: Tue, 19 Sep 2017 05:26:53 +0000
Subject: com php-src: rename test: sapi/fpm/tests/023-bug72212.phpt sapi/fpm/tests/024-bug72212.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-99461@lists.php.net to get a copy of this message
Commit: ee84f34344d17deac21733c935041bd980184839 Author: Remi Collet <remi@php.net> Tue, 19 Sep 2017 07:26:53 +0200 Parents: 3cd5f2889931cbe6242406ffcf871556257541d1 Branches: PHP-7.2 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=ee84f34344d17deac21733c935041bd980184839 Log: rename test Changed paths: D sapi/fpm/tests/023-bug72212.phpt A sapi/fpm/tests/024-bug72212.phpt Diff: diff --git a/sapi/fpm/tests/023-bug72212.phpt b/sapi/fpm/tests/023-bug72212.phpt deleted file mode 100644 index e601aaf..0000000 --- a/sapi/fpm/tests/023-bug72212.phpt +++ /dev/null @@ -1,82 +0,0 @@ ---TEST-- -FPM: bug #75212 php_value acts like php_admin_value ---SKIPIF-- -<?php include "skipif.inc"; ?> ---FILE-- -<?php - -include "include.inc"; - -$logfile = __DIR__.'/php-fpm.log.tmp'; -$srcfile = __DIR__.'/bug75212.php'; -$inifile = __DIR__.'/.user.ini'; -$port = 9000+PHP_INT_SIZE; - -$cfg = <<<EOT -[global] -error_log = $logfile -[unconfined] -listen = 127.0.0.1:$port -pm = dynamic -pm.max_children = 5 -pm.start_servers = 1 -pm.min_spare_servers = 1 -pm.max_spare_servers = 3 -php_admin_value[memory_limit]=32M -php_value[date.timezone]=Europe/London -EOT; - -$code = <<<EOT -<?php -echo "Test Start\n"; -var_dump(ini_get('memory_limit'), ini_get('date.timezone')); -echo "Test End\n"; -EOT; -file_put_contents($srcfile, $code); - -$ini = <<<EOT -memory_limit=64M -date.timezone=Europe/Paris - -EOT; -file_put_contents($inifile, $ini); - -$fpm = run_fpm($cfg, $tail); -if (is_resource($fpm)) { - fpm_display_log($tail, 2); - try { - $req = run_request('127.0.0.1', $port, $srcfile); - echo strstr($req, "Test Start"); - echo "Request ok\n"; - } catch (Exception $e) { - echo "Request error\n"; - } - proc_terminate($fpm); - fpm_display_log($tail, -1); - fclose($tail); - proc_close($fpm); -} - -?> -Done ---EXPECTF-- -[%s] NOTICE: fpm is running, pid %d -[%s] NOTICE: ready to handle connections -Test Start -string(3) "32M" -string(12) "Europe/Paris" -Test End - -Request ok -[%s] NOTICE: Terminating ... -[%s] NOTICE: exiting, bye-bye! -Done ---CLEAN-- -<?php - $logfile = __DIR__.'/php-fpm.log.tmp'; - $srcfile = __DIR__.'/bug75212.php'; - $inifile = __DIR__.'/.user.ini'; - @unlink($logfile); - @unlink($srcfile); - @unlink($inifile); -?> diff --git a/sapi/fpm/tests/024-bug72212.phpt b/sapi/fpm/tests/024-bug72212.phpt new file mode 100644 index 0000000..e601aaf --- /dev/null +++ b/sapi/fpm/tests/024-bug72212.phpt @@ -0,0 +1,82 @@ +--TEST-- +FPM: bug #75212 php_value acts like php_admin_value +--SKIPIF-- +<?php include "skipif.inc"; ?> +--FILE-- +<?php + +include "include.inc"; + +$logfile = __DIR__..'/php-fpm.log.tmp'; +$srcfile = __DIR__.'/bug75212.php'; +$inifile = __DIR__.'/.user.ini'; +$port = 9000+PHP_INT_SIZE; + +$cfg = <<<EOT +[global] +error_log = $logfile +[unconfined] +listen = 127.0.0.1:$port +pm = dynamic +pm.max_children = 5 +pm.start_servers = 1 +pm.min_spare_servers = 1 +pm.max_spare_servers = 3 +php_admin_value[memory_limit]=32M +php_value[date.timezone]=Europe/London +EOT; + +$code = <<<EOT +<?php +echo "Test Start\n"; +var_dump(ini_get('memory_limit'), ini_get('date.timezone')); +echo "Test End\n"; +EOT; +file_put_contents($srcfile, $code); + +$ini = <<<EOT +memory_limit=64M +date.timezone=Europe/Paris + +EOT; +file_put_contents($inifile, $ini); + +$fpm = run_fpm($cfg, $tail); +if (is_resource($fpm)) { + fpm_display_log($tail, 2); + try { + $req = run_request('127.0.0.1', $port, $srcfile); + echo strstr($req, "Test Start"); + echo "Request ok\n"; + } catch (Exception $e) { + echo "Request error\n"; + } + proc_terminate($fpm); + fpm_display_log($tail, -1); + fclose($tail); + proc_close($fpm); +} + +?> +Done +--EXPECTF-- +[%s] NOTICE: fpm is running, pid %d +[%s] NOTICE: ready to handle connections +Test Start +string(3) "32M" +string(12) "Europe/Paris" +Test End + +Request ok +[%s] NOTICE: Terminating ... +[%s] NOTICE: exiting, bye-bye! +Done +--CLEAN-- +<?php + $logfile = __DIR__.'/php-fpm.log.tmp'; + $srcfile = __DIR__.'/bug75212.php'; + $inifile = __DIR__.'/.user.ini'; + @unlink($logfile); + @unlink($srcfile); + @unlink($inifile); +?>

« previous php.cvs (#99461) next »