From 8bd58502ca39d65df45c0020a4d5165072397199 Mon Sep 17 00:00:00 2001 From: Matteo Beccati Date: Wed, 29 Oct 2014 14:32:41 +0100 Subject: [PATCH 1/7] Don't treat warnings as failures in the junit output This matches Travis and the actual return code. --- run-tests.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/run-tests.php b/run-tests.php index 1b5bcec2532..315ae09200a 100755 --- a/run-tests.php +++ b/run-tests.php @@ -2718,7 +2718,7 @@ function junit_mark_test_as($type, $file_name, $test_name, $time = null, $messag if (is_array($type)) { $output_type = $type[0] . 'ED'; - $temp = array_intersect(array('XFAIL', 'FAIL'), $type); + $temp = array_intersect(array('XFAIL', 'FAIL', 'WARN'), $type); $type = reset($temp); } else { $output_type = $type . 'ED'; @@ -2732,6 +2732,9 @@ function junit_mark_test_as($type, $file_name, $test_name, $time = null, $messag } elseif ('SKIP' == $type) { junit_suite_record($suite, 'test_skip'); $JUNIT['files'][$file_name]['xml'] .= "$escaped_message\n"; + } elseif ('WARN' == $type) { + junit_suite_record($suite, 'test_warn'); + $JUNIT['files'][$file_name]['xml'] .= "$escaped_message\n"; } elseif('FAIL' == $type) { junit_suite_record($suite, 'test_fail'); $JUNIT['files'][$file_name]['xml'] .= "$escaped_details\n"; From 79a4339f1b23c8cb534679667f7ce781f21c5bb3 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Wed, 29 Oct 2014 19:28:21 +0100 Subject: [PATCH 2/7] fix sapi/phpdbg/config.w32 --- sapi/phpdbg/config.w32 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sapi/phpdbg/config.w32 b/sapi/phpdbg/config.w32 index 651c7e6d16a..8a685d33477 100644 --- a/sapi/phpdbg/config.w32 +++ b/sapi/phpdbg/config.w32 @@ -1,6 +1,6 @@ ARG_ENABLE('phpdbg', 'Build phpdbg', 'no'); ARG_ENABLE('phpdbgs', 'Build phpdbg shared', 'no'); -ARG_ENABLE('phpdbgwebhelper', 'Build phpdbg webhelper', 'yes'); +ARG_ENABLE('phpdbg-webhelper', 'Build phpdbg webhelper', 'yes'); PHPDBG_SOURCES='phpdbg.c phpdbg_prompt.c phpdbg_cmd.c phpdbg_info.c phpdbg_help.c phpdbg_break.c ' + 'phpdbg_print.c phpdbg_bp.c phpdbg_opcode.c phpdbg_list.c phpdbg_utils.c ' + @@ -16,8 +16,8 @@ if (PHP_PHPDBG == "yes") { ADD_FLAG("CFLAGS_PHPDBG", "/D YY_NO_UNISTD_H"); ADD_FLAG("LDFLAGS_PHPDBG", "/stack:8388608"); - if (PHP_PHPDBGWEBHELPER == "yes") { - EXTENSION('phpdbg-webhelper', 'phpdbg_rinit_hook.c phpdbg_webdata_compress.c'); + if (PHP_PHPDBG_WEBHELPER == "yes") { + EXTENSION('phpdbg_webhelper', 'phpdbg_rinit_hook.c phpdbg_webdata_transfer.c'); } } From fdbfcc0b51b5d78777625d5be93a282e23cc0540 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Wed, 29 Oct 2014 19:32:52 +0100 Subject: [PATCH 3/7] dll export APIs needed by phpdbg --- ext/standard/basic_functions.c | 4 ++-- ext/standard/basic_functions.h | 4 ++++ main/php_main.h | 3 --- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index ca14b28ccd2..c5392760e82 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -5051,7 +5051,7 @@ static int user_tick_function_compare(user_tick_function_entry * tick_fe1, user_ } /* }}} */ -void php_call_shutdown_functions(TSRMLS_D) /* {{{ */ +PHPAPI void php_call_shutdown_functions(TSRMLS_D) /* {{{ */ { if (BG(user_shutdown_function_names)) { zend_try { @@ -5063,7 +5063,7 @@ void php_call_shutdown_functions(TSRMLS_D) /* {{{ */ } /* }}} */ -void php_free_shutdown_functions(TSRMLS_D) /* {{{ */ +PHPAPI void php_free_shutdown_functions(TSRMLS_D) /* {{{ */ { if (BG(user_shutdown_function_names)) zend_try { diff --git a/ext/standard/basic_functions.h b/ext/standard/basic_functions.h index 3af85b3d403..eaeb9bca839 100644 --- a/ext/standard/basic_functions.h +++ b/ext/standard/basic_functions.h @@ -261,4 +261,8 @@ PHPAPI extern zend_bool register_user_shutdown_function(char *function_name, siz PHPAPI extern zend_bool remove_user_shutdown_function(char *function_name, size_t function_len TSRMLS_DC); PHPAPI extern zend_bool append_user_shutdown_function(php_shutdown_function_entry shutdown_function_entry TSRMLS_DC); +PHPAPI void php_call_shutdown_functions(TSRMLS_D); +PHPAPI void php_free_shutdown_functions(TSRMLS_D); + + #endif /* BASIC_FUNCTIONS_H */ diff --git a/main/php_main.h b/main/php_main.h index 1325486bd97..03c89c5d6f2 100644 --- a/main/php_main.h +++ b/main/php_main.h @@ -50,9 +50,6 @@ PHPAPI int php_handle_auth_data(const char *auth TSRMLS_DC); PHPAPI void php_html_puts(const char *str, uint siz TSRMLS_DC); PHPAPI int php_stream_open_for_zend_ex(const char *filename, zend_file_handle *handle, int mode TSRMLS_DC); -extern void php_call_shutdown_functions(TSRMLS_D); -extern void php_free_shutdown_functions(TSRMLS_D); - /* environment module */ extern int php_init_environ(void); extern int php_shutdown_environ(void); From f842b8f4be9350dfd0444633c62fe7a5c76c54a5 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Wed, 29 Oct 2014 19:39:46 +0100 Subject: [PATCH 4/7] unix sockets aren't available on windows --- sapi/phpdbg/phpdbg_wait.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sapi/phpdbg/phpdbg_wait.c b/sapi/phpdbg/phpdbg_wait.c index 95024b8d77f..6f9eea90e37 100644 --- a/sapi/phpdbg/phpdbg_wait.c +++ b/sapi/phpdbg/phpdbg_wait.c @@ -365,6 +365,7 @@ void phpdbg_webdata_decompress(char *msg, int len TSRMLS_DC) { PHPDBG_COMMAND(wait) /* {{{ */ { +#ifndef PHP_WIN32 struct sockaddr_un local, remote; int rlen, sr, sl; unlink(PHPDBG_G(socket_path)); @@ -414,6 +415,7 @@ PHPDBG_COMMAND(wait) /* {{{ */ efree(data); phpdbg_notice("wait", "import=\"success\"", "Successfully imported request data, stopped before executing"); +#endif return SUCCESS; } /* }}} */ From 4b8f411d313bddb0c1cd9308a7402ea20fb348b4 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Wed, 29 Oct 2014 19:49:20 +0100 Subject: [PATCH 5/7] use portable strndup implementation --- sapi/phpdbg/phpdbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c index 5ebc203529b..7ca79972972 100644 --- a/sapi/phpdbg/phpdbg.c +++ b/sapi/phpdbg/phpdbg.c @@ -549,7 +549,7 @@ static int php_sapi_phpdbg_deactivate(TSRMLS_D) /* {{{ */ php_phpdbg_globals_ctor(pg); - pg->exec = strndup(PHPDBG_G(exec), PHPDBG_G(exec_len)); + pg->exec = zend_strndup(PHPDBG_G(exec), PHPDBG_G(exec_len)); pg->exec_len = PHPDBG_G(exec_len); pg->oplog = PHPDBG_G(oplog); pg->prompt[0] = PHPDBG_G(prompt)[0]; From 5d76185792d2c7c7d47838b71a0b230f9668e21c Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Wed, 29 Oct 2014 20:02:41 +0100 Subject: [PATCH 6/7] export output globals needed by phpdbg --- main/output.c | 6 +++++- main/php_output.h | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/main/output.c b/main/output.c index 1dac7179b8e..c2b7b3422dc 100644 --- a/main/output.c +++ b/main/output.c @@ -35,7 +35,11 @@ #include "zend_stack.h" #include "php_output.h" -ZEND_DECLARE_MODULE_GLOBALS(output); +#ifdef ZTS +PHPAPI int output_globals_id; +#else +PHPAPI php_output_globals output_globals; +#endif const char php_output_default_handler_name[sizeof("default output handler")] = "default output handler"; const char php_output_devnull_handler_name[sizeof("null output handler")] = "null output handler"; diff --git a/main/php_output.h b/main/php_output.h index 0312e256f80..947da2c915d 100644 --- a/main/php_output.h +++ b/main/php_output.h @@ -152,6 +152,12 @@ ZEND_BEGIN_MODULE_GLOBALS(output) int output_start_lineno; ZEND_END_MODULE_GLOBALS(output) +#ifdef ZTS +PHPAPI extern int output_globals_id; +#else +PHPAPI extern php_output_globals output_globals; +#endif + /* there should not be a need to use OG() from outside of output.c */ #ifdef ZTS # define OG(v) TSRMG(output_globals_id, zend_output_globals *, v) From fc904569ea5c5513925a69bf43820845eb3db104 Mon Sep 17 00:00:00 2001 From: Anatol Belski Date: Wed, 29 Oct 2014 20:03:28 +0100 Subject: [PATCH 7/7] fix output globals importing --- sapi/phpdbg/phpdbg_frame.c | 1 - sapi/phpdbg/phpdbg_prompt.c | 1 - 2 files changed, 2 deletions(-) diff --git a/sapi/phpdbg/phpdbg_frame.c b/sapi/phpdbg/phpdbg_frame.c index 437e6d474a8..0506c305dcb 100644 --- a/sapi/phpdbg/phpdbg_frame.c +++ b/sapi/phpdbg/phpdbg_frame.c @@ -25,7 +25,6 @@ #include "phpdbg_list.h" ZEND_EXTERN_MODULE_GLOBALS(phpdbg); -ZEND_EXTERN_MODULE_GLOBALS(output); void phpdbg_restore_frame(TSRMLS_D) /* {{{ */ { diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c index c1fcb59a086..915bccfa69f 100644 --- a/sapi/phpdbg/phpdbg_prompt.c +++ b/sapi/phpdbg/phpdbg_prompt.c @@ -41,7 +41,6 @@ #include "phpdbg_eol.h" ZEND_EXTERN_MODULE_GLOBALS(phpdbg); -ZEND_EXTERN_MODULE_GLOBALS(output); extern int phpdbg_startup_run; #ifdef HAVE_LIBDL