com php-src: Fixes for session and fpm tests in PHP7.0 branch: ext/session/tests/save_handler.inc ext/session/tests/sess
ion_set_save_handler_basic.phpt sapi/fpm/tests/0 02.phpt sapi/fpm/tests/003.phpt sapi/fpm/test s/004.phpt sapi/fpm/tests/013.phpt sapi/fpm
/tests/014.phpt sapi/fpm/tests/015.phpt

From: Date: Sat, 07 Jan 2017 03:55:57 +0000
Subject: com php-src: Fixes for session and fpm tests in PHP7.0 branch: ext/session/tests/save_handler.inc ext/session/tests/sess
ion_set_save_handler_basic.phpt sapi/fpm/tests/0 02.phpt sapi/fpm/tests/003.phpt sapi/fpm/test s/004.phpt sapi/fpm/tests/013.phpt sapi/fpm
/tests/014.phpt sapi/fpm/tests/015.phpt
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-96588@lists.php.net to get a copy of this message
Commit: 3401f553b947ce5570111c0da34eceb69151f140 Author: Mitch Hagstrand <mhagstrand@gmail.com> Fri, 6 Jan 2017 19:55:31 -0800 Parents: f98d8f6c159ddcbc652eaa7f0f6e6a67edf963d5 Branches: PHP-7.0 PHP-7.1 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=3401f553b947ce5570111c0da34eceb69151f140 Log: Fixes for session and fpm tests in PHP7.0 branch 1. Increased the timeout on sapi/fpm tests to match the cli server 2. Disabled session GC in session_set_save_handler_basic.phpt 3. Fixed GC in save_handler.inc to delete files based on age Changed paths: M ext/session/tests/save_handler.inc M ext/session/tests/session_set_save_handler_basic.phpt M sapi/fpm/tests/002.phpt M sapi/fpm/tests/003.phpt M sapi/fpm/tests/004.phpt M sapi/fpm/tests/013.phpt M sapi/fpm/tests/014.phpt M sapi/fpm/tests/015.phpt Diff: diff --git a/ext/session/tests/save_handler.inc b/ext/session/tests/save_handler.inc index 79ebaaa..231109c 100644 --- a/ext/session/tests/save_handler.inc +++ b/ext/session/tests/save_handler.inc @@ -53,7 +53,7 @@ function gc($maxlifetime) { while (($file = readdir($directory)) !== FALSE) { $qualified = ($session_save_path."/".$file); if (is_file($qualified) === TRUE) { - if (substr($file, 0, $length) === SESSION_FILE_PREFIX) { + if (substr($file, 0, $length) === SESSION_FILE_PREFIX && (filemtime($qualified) + $maxlifetime <= time() )) { unlink($qualified); } } diff --git a/ext/session/tests/session_set_save_handler_basic.phpt b/ext/session/tests/session_set_save_handler_basic.phpt index 5342acc..6b99e8d 100644 --- a/ext/session/tests/session_set_save_handler_basic.phpt +++ b/ext/session/tests/session_set_save_handler_basic.phpt @@ -3,6 +3,7 @@ Test session_set_save_handler() function : basic functionality --INI-- session.save_path= session.name=PHPSESSID +session.gc_probability=0 --SKIPIF-- <?php include('skipif.inc'); ?> --FILE-- diff --git a/sapi/fpm/tests/002.phpt b/sapi/fpm/tests/002.phpt index 89e4318..77e89af 100644 --- a/sapi/fpm/tests/002.phpt +++ b/sapi/fpm/tests/002.phpt @@ -26,8 +26,8 @@ $fpm = run_fpm($cfg, $tail); if (is_resource($fpm)) { fpm_display_log($tail, 2); $i = 0; - while (($i++ < 30) && !($fp = @fsockopen('127.0.0.1', $port))) { - usleep(10000); + while (($i++ < 60) && !($fp = @fsockopen('127.0.0.1', $port))) { + usleep(25000); } if ($fp) { echo "Done\n"; diff --git a/sapi/fpm/tests/003.phpt b/sapi/fpm/tests/003.phpt index a4c04ae...8b5265c 100644 --- a/sapi/fpm/tests/003.phpt +++ b/sapi/fpm/tests/003.phpt @@ -29,8 +29,8 @@ $fpm = run_fpm($cfg, $tail); if (is_resource($fpm)) { fpm_display_log($tail, 2); $i = 0; - while (($i++ < 30) && !($fp = fsockopen('[::1]', $port))) { - usleep(10000); + while (($i++ < 60) && !($fp = fsockopen('[::1]', $port))) { + usleep(25000); } if ($fp) { echo "Done\n"; diff --git a/sapi/fpm/tests/004.phpt b/sapi/fpm/tests/004.phpt index 565819a..0b58a6d 100644 --- a/sapi/fpm/tests/004.phpt +++ b/sapi/fpm/tests/004.phpt @@ -29,15 +29,15 @@ $fpm = run_fpm($cfg, $tail); if (is_resource($fpm)) { fpm_display_log($tail, 2); $i = 0; - while (($i++ < 30) && !($fp = @fsockopen('127.0.0.1', $port))) { - usleep(10000); + while (($i++ < 60) && !($fp = @fsockopen('127.0.0.1', $port))) { + usleep(25000); } if ($fp) { echo "Done IPv4\n"; fclose($fp); } - while (($i++ < 30) && !($fp = @fsockopen('[::1]', $port))) { - usleep(10000); + while (($i++ < 60) && !($fp = @fsockopen('[::1]', $port))) { + usleep(25000); } if ($fp) { echo "Done IPv6\n"; diff --git a/sapi/fpm/tests/013.phpt b/sapi/fpm/tests/013.phpt index 8d6a9d1..aa84c27 100644 --- a/sapi/fpm/tests/013.phpt +++ b/sapi/fpm/tests/013.phpt @@ -27,8 +27,8 @@ EOT; $fpm = run_fpm($cfg, $tail); if (is_resource($fpm)) { $i = 0; - while (($i++ < 30) && !($fp = @fsockopen('127.0.0.1', $port))) { - usleep(10000); + while (($i++ < 60) && !($fp = @fsockopen('127.0.0.1', $port))) { + usleep(25000); } if ($fp) { echo "Started\n"; @@ -51,4 +51,4 @@ Done <?php $logfile = dirname(__FILE__).'/php-fpm.log.tmp'; @unlink($logfile); -?> \ No newline at end of file +?> diff --git a/sapi/fpm/tests/014.phpt b/sapi/fpm/tests/014.phpt index ee0e549..8c0d5bf 100644 --- a/sapi/fpm/tests/014.phpt +++ b/sapi/fpm/tests/014.phpt @@ -27,8 +27,8 @@ EOT; $fpm = run_fpm($cfg, $tail); if (is_resource($fpm)) { $i = 0; - while (($i++ < 30) && !($fp = @fsockopen('127.0.0.1', $port))) { - usleep(10000); + while (($i++ < 60) && !($fp = @fsockopen('127.0.0.1', $port))) { + usleep(25000); } if ($fp) { echo "Started\n"; @@ -51,4 +51,4 @@ Done <?php $logfile = dirname(__FILE__).'/php-fpm.log.tmp'; @unlink($logfile); -?> \ No newline at end of file +?> diff --git a/sapi/fpm/tests/015.phpt b/sapi/fpm/tests/015.phpt index c7af5f7..6c092e3 100644 --- a/sapi/fpm/tests/015.phpt +++ b/sapi/fpm/tests/015.phpt @@ -42,8 +42,8 @@ EOT; $fpm = run_fpm($cfg, $tail); if (is_resource($fpm)) { $i = 0; - while (($i++ < 30) && !($fp = @fsockopen('127.0.0.1', $port1))) { - usleep(10000); + while (($i++ < 60) && !($fp = @fsockopen('127.0.0.1', $port1))) { + usleep(25000); } if ($fp) { echo "Started\n"; @@ -88,4 +88,4 @@ Done <?php $logfile = dirname(__FILE__).'/php-fpm.log.tmp'; @unlink($logfile); -?> \ No newline at end of file +?>

« previous php.cvs (#96588) next »