PHP  
 PHP_5_6
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for sapi/cli/tests/cli_process_title_unix.phpt ('Check cli_process_title support on Unix')

Script

1: <?php
2:
echo "*** Testing setting the process title ***\n";
3:
4:
$set_title $original_title uniqid("title"true);
5:
$pid getmypid();
6:
7: if (
cli_set_process_title($original_title) === true)
8:   echo 
"Successfully set title\n";
9:
10:
$ps_output shell_exec("ps -p $pid -o command | tail -n 1");
11:
12: if (
$ps_output === null)
13: {
14:   echo 
"ps failed\n";
15:   die();
16: }
17:
18:
$loaded_title trim($ps_output);
19: if (
strpos(strtoupper(substr(PHP_OS013)), "BSD") !== false)
20: {
21:   
// Fix up title for BSD
22:   
$set_title "php: $original_title (php)";
23: }
24:
25: if (
$loaded_title == $set_title)
26:   echo 
"Successfully verified title using ps\n";
27: else
28:   echo 
"Actually loaded from ps: $loaded_title\n";
29:
30:
$read_title cli_get_process_title();
31: if (
$read_title == $original_title)
32:   echo 
"Successfully verified title using get\n";
33: else
34:   echo 
"Actually loaded from get: $read_title\n";
35:
36:
?>
37:

Expected

*** Testing setting the process title ***
Successfully set title
Successfully verified title using ps
Successfully verified title using get

Output

*** Testing setting the process title ***
Successfully set title
Actually loaded from ps: valgrind -q --tool=memcheck --trace-children=yes --log-file=/var/php_gcov/PHP_5_6/sapi/cli/tests/cli_process_title_unix.mem /var/php_gcov/PHP_5_6/sapi/cli/php -n -c /var/php_gcov/PHP_5_6/tmp-php.ini -d output_handler= -d open_basedir= -d safe_mode=0 -d disable_functions= -d output_buffering=Off -d error_reporting=32767 -d display_errors=1 -d display_startup_errors=1 -d log_errors=0 -d html_errors=0 -d track_errors=1 -d report_memleaks=1 -d report_zend_debug=0 -d docref_root= -d docref_ext=.html -d error_prepend_string= -d error_append_string= -d auto_prepend_file= -d auto_append_file= -d magic_quotes_runtime=0 -d ignore_repeated_errors=0 -d precision=14 -d memory_limit=128M -d opcache.fast_shutdown=0 -d opcache.file_update_protection=0 -d extension_dir=/var/php_gcov/PHP_5_6/modules/ -d zend_extension=/var/php_gcov/PHP_5_6/modules/opcache.so -d session.auto_start=0 -d tidy.clean_output=0 -d zlib.output_compression=Off -d mbstring.func_overload=0 -f /var/php_gcov/PHP_5_6/sapi/cli/tests/cli_process_title_unix.php
Successfully verified title using get

Diff

003+ Actually loaded from ps: valgrind -q --tool=memcheck --trace-children=yes --log-file=/var/php_gcov/PHP_5_6/sapi/cli/tests/cli_process_title_unix.mem /var/php_gcov/PHP_5_6/sapi/cli/php -n -c /var/php_gcov/PHP_5_6/tmp-php.ini -d output_handler= -d open_basedir= -d safe_mode=0 -d disable_functions= -d output_buffering=Off -d error_reporting=32767 -d display_errors=1 -d display_startup_errors=1 -d log_errors=0 -d html_errors=0 -d track_errors=1 -d report_memleaks=1 -d report_zend_debug=0 -d docref_root= -d docref_ext=.html -d error_prepend_string= -d error_append_string= -d auto_prepend_file= -d auto_append_file= -d magic_quotes_runtime=0 -d ignore_repeated_errors=0 -d precision=14 -d memory_limit=128M -d opcache.fast_shutdown=0 -d opcache.file_update_protection=0 -d extension_dir=/var/php_gcov/PHP_5_6/modules/ -d zend_extension=/var/php_gcov/PHP_5_6/modules/opcache.so -d session.auto_start=0 -d tidy.clean_output=0 -d zlib.output_compression=Off -d mbstring.func_overload=0 -f /var/php_gcov/PHP_5_6/sapi/cli/tests/cli_process_title_unix.php
003- Successfully verified title using ps

 

Generated at Thu, 28 Aug 2014 18:52:45 +0000 (2 days ago)

Copyright © 2005-2014 The PHP Group
All rights reserved.