From b1a4af56f09a9469eeaf006480804451e60fe411 Mon Sep 17 00:00:00 2001 From: kkadosh Date: Sun, 3 Nov 2019 14:49:03 +0100 Subject: Log ip addresses --- .../disable_function/disabled_function_ensure_server_valid_certs.phpt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt') diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt index 8a50c97..40b58cc 100644 --- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt +++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt @@ -15,4 +15,4 @@ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, '0'); echo "1337"; ?> --EXPECTF-- -Fatal error: [snuffleupagus][disabled_function] Aborted execution on call of the function 'curl_setopt', because its argument '$option' content (81) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/disabled_function_ensure_server_valid_certs.php on line %d +Fatal error: [snuffleupagus][0.0.0.0][disabled_function] Aborted execution on call of the function 'curl_setopt', because its argument '$option' content (81) matched the rule 'Please don't turn CURLOPT_SSL_VERIFYHOST off.' in %s/disabled_function_ensure_server_valid_certs.php on line %d -- cgit v1.3 From 3e2b6545b623f0ba1b016c03b43d999cfcbc8d2f Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 1 May 2020 19:50:56 +0200 Subject: Make the testsuite work on php7.4 Before php7.4, it seems that the curl module was loaded by default, but since it's no the case anymore, it has to be manually specified in the testsuite. Interestingly, Php's testsuite mechanism is running snippets to determine some runtime parameters like the extension directory. Unfortunately,it tries to run them with Snuffleupagus loaded, resulting in an error, since no configuration file is passed. --- .travis.yml | 2 ++ Makefile | 1 + .../disabled_function_ensure_client_valid_certs.phpt | 2 ++ ...sabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt | 2 ++ ...sabled_function_ensure_client_valid_certs_curl_setopt_array.phpt | 2 ++ .../disabled_function_ensure_server_valid_certs.phpt | 2 ++ ...sabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt | 2 ++ ...sabled_function_ensure_server_valid_certs_curl_setopt_array.phpt | 6 ++++-- src/tests/xxe/disable_xxe_dom.phpt | 2 ++ src/tests/xxe/disable_xxe_dom_disabled.phpt | 2 ++ src/tests/xxe/disable_xxe_simplexml.phpt | 2 ++ src/tests/xxe/disable_xxe_simplexml_oop.phpt | 2 ++ src/tests/xxe/disable_xxe_xml_parse.phpt | 2 ++ 13 files changed, 27 insertions(+), 2 deletions(-) (limited to 'src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt') diff --git a/.travis.yml b/.travis.yml index 4e2ec64..f5a8fee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,6 +42,8 @@ script: - phpize - ./configure --enable-snuffleupagus --enable-coverage - make -j 2 + - sed -i "s/\$ext_params -d display_errors=0 -r/-d display_errors=0 -r/" run-tests.php + - cat run-tests.php - TEST_PHP_ARGS="-q" REPORT_EXIT_STATUS=1 make test after_success: diff --git a/Makefile b/Makefile index c0d65c2..db5878e 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,7 @@ compile_debug: ## compile a debug build make -C src debug: compile_debug ## compile and run a debug build + sed -i "s/\$$ext_params -d display_errors=0 -r/-d display_errors=0 -r/" src/run-tests.php TEST_PHP_ARGS='-q' REPORT_EXIT_STATUS=1 make -C src test coverage: ## compile snuffleugpaus, and run the testsuite with coverage diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt index 1d51b05..dc53593 100644 --- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt +++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs.phpt @@ -5,6 +5,8 @@ Disable functions - Ensure that client certificates validation can't be disabled if (!extension_loaded("snuffleupagus")) { die("skip"); } if (!extension_loaded("curl")) { die("skip"); } ?> +--EXTENSIONS-- +curl --INI-- sp.configuration_file={PWD}/config/disabled_function_curl_verify_certs.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt index a79ff48..9ff37ec 100644 --- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt +++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_multi_setopt.phpt @@ -5,6 +5,8 @@ Disable functions - Ensure that client certificates validation can't be disabled if (!extension_loaded("snuffleupagus")) { die("skip"); } if (!extension_loaded("curl")) { die("skip"); } ?> +--EXTENSIONS-- +curl --INI-- sp.configuration_file={PWD}/config/disabled_function_curl_verify_certs.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt index 6c7bc93..246fee6 100644 --- a/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt +++ b/src/tests/disable_function/disabled_function_ensure_client_valid_certs_curl_setopt_array.phpt @@ -5,6 +5,8 @@ Disable functions - Ensure that client certificates validation can't be disabled if (!extension_loaded("snuffleupagus")) { die("skip"); } if (!extension_loaded("curl")) { die("skip"); } ?> +--EXTENSIONS-- +curl --INI-- sp.configuration_file={PWD}/config/disabled_function_curl_verify_certs.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt index 40b58cc..fa583b0 100644 --- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt +++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs.phpt @@ -5,6 +5,8 @@ Disable functions - Ensure that server certificates validation can't be disabled if (!extension_loaded("snuffleupagus")) { die("skip"); } if (!extension_loaded("curl")) { die("skip"); } ?> +--EXTENSIONS-- +curl --INI-- sp.configuration_file={PWD}/config/disabled_function_curl_verify_certs.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt index 06acd6c..3b374ee 100644 --- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt +++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_multi_setopt.phpt @@ -5,6 +5,8 @@ Disable functions - Ensure that server certificates validation can't be disabled if (!extension_loaded("snuffleupagus")) { die("skip"); } if (!extension_loaded("curl")) { die("skip"); } ?> +--EXTENSIONS-- +curl --INI-- sp.configuration_file={PWD}/config/disabled_function_curl_verify_certs.ini --FILE-- diff --git a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt index c716625..97accce 100644 --- a/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt +++ b/src/tests/disable_function/disabled_function_ensure_server_valid_certs_curl_setopt_array.phpt @@ -2,9 +2,11 @@ Disable functions - Ensure that server certificates validation can't be disabled via `curl_setopt_array` --SKIPIF-- +--EXTENSIONS-- +curl --INI-- sp.configuration_file={PWD}/config/disabled_function_curl_verify_certs.ini --FILE-- diff --git a/src/tests/xxe/disable_xxe_dom.phpt b/src/tests/xxe/disable_xxe_dom.phpt index e1459e3..2f45f66 100644 --- a/src/tests/xxe/disable_xxe_dom.phpt +++ b/src/tests/xxe/disable_xxe_dom.phpt @@ -8,6 +8,8 @@ Disable XXE echo "skip"; } ?> +--EXTENSIONS-- +dom --INI-- sp.configuration_file={PWD}/config/disable_xxe.ini --FILE-- diff --git a/src/tests/xxe/disable_xxe_dom_disabled.phpt b/src/tests/xxe/disable_xxe_dom_disabled.phpt index a791ebc..59526d2 100644 --- a/src/tests/xxe/disable_xxe_dom_disabled.phpt +++ b/src/tests/xxe/disable_xxe_dom_disabled.phpt @@ -5,6 +5,8 @@ Disable XXE if (!extension_loaded("snuffleupagus")) echo "skip"; if (!extension_loaded("dom")) echo "skip"; ?> +--extensions-- +dom --INI-- sp.configuration_file={PWD}/config/disable_xxe_disable.ini --FILE-- diff --git a/src/tests/xxe/disable_xxe_simplexml.phpt b/src/tests/xxe/disable_xxe_simplexml.phpt index 88396c0..35d79de 100644 --- a/src/tests/xxe/disable_xxe_simplexml.phpt +++ b/src/tests/xxe/disable_xxe_simplexml.phpt @@ -5,6 +5,8 @@ Disable XXE if (!extension_loaded("snuffleupagus")) echo "skip"; if (!extension_loaded("simplexml")) echo "skip"; ?> +--EXTENSIONS-- +xml --INI-- sp.configuration_file={PWD}/config/disable_xxe.ini --FILE-- diff --git a/src/tests/xxe/disable_xxe_simplexml_oop.phpt b/src/tests/xxe/disable_xxe_simplexml_oop.phpt index 43c4fbf..33c3bb5 100644 --- a/src/tests/xxe/disable_xxe_simplexml_oop.phpt +++ b/src/tests/xxe/disable_xxe_simplexml_oop.phpt @@ -5,6 +5,8 @@ Disable XXE if (!extension_loaded("snuffleupagus")) echo "skip"; if (!extension_loaded("simplexml")) echo "skip"; ?> +--EXTENSIONS-- +xml --INI-- sp.configuration_file={PWD}/config/disable_xxe.ini --FILE-- diff --git a/src/tests/xxe/disable_xxe_xml_parse.phpt b/src/tests/xxe/disable_xxe_xml_parse.phpt index ca77729..b6dec2d 100644 --- a/src/tests/xxe/disable_xxe_xml_parse.phpt +++ b/src/tests/xxe/disable_xxe_xml_parse.phpt @@ -8,6 +8,8 @@ Disable XXE in xml_parse echo "skip because the `xml` extension isn't loaded"; } ?> +--EXTENSIONS-- +xml --INI-- sp.configuration_file={PWD}/config/disable_xxe.ini --FILE-- -- cgit v1.3