diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2020-02-04 00:44:55 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2020-02-04 00:45:54 +0100 |
commit | a0c93bf65eb41ecb2c10c22294ef6ade631f42be (patch) | |
tree | 12a5cee506a3acbd9e8f6e8f36891deda27028e6 | |
parent | 3fb41c202801ef26cd20c5778c17a899913eb3d1 (diff) | |
parent | 079905acd536e772241def9ad098d16f45ef37d8 (diff) | |
download | php-git-a0c93bf65eb41ecb2c10c22294ef6ade631f42be.tar.gz |
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #78090: bug45161.phpt takes forever to finish
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | ext/curl/tests/bug45161.phpt | 13 | ||||
-rw-r--r-- | ext/curl/tests/bug46739.phpt | 9 |
3 files changed, 13 insertions, 12 deletions
@@ -65,6 +65,9 @@ PHP NEWS . Fixed bug #78902 (Memory leak when using stream_filter_append). (liudaixiao) . Fixed bug #78969 (PASSWORD_DEFAULT should match PASSWORD_BCRYPT instead of being null). (kocsismate) +- Testing: + . Fixed bug #78090 (bug45161.phpt takes forever to finish). (cmb) + - XSL: . Fixed bug #70078 (XSL callbacks with nodes as parameter leak memory). (cmb) diff --git a/ext/curl/tests/bug45161.phpt b/ext/curl/tests/bug45161.phpt index bf6f669771..d6d722fe28 100644 --- a/ext/curl/tests/bug45161.phpt +++ b/ext/curl/tests/bug45161.phpt @@ -2,12 +2,7 @@ Bug #45161 (Reusing a curl handle leaks memory) --SKIPIF-- <?php -if (substr(PHP_OS, 0, 3) == 'WIN') { - exit("skip not for Windows"); -} -if (!extension_loaded("curl")) { - exit("skip curl extension not loaded"); -} +include 'skipif.inc'; $curl_version = curl_version(); if ($curl_version['version_number'] < 0x071100) { exit("skip: test works only with curl >= 7.17.0"); @@ -15,10 +10,12 @@ if ($curl_version['version_number'] < 0x071100) { ?> --FILE-- <?php +include 'server.inc'; +$host = curl_cli_server_start(); // Fill memory for test $ch = curl_init(); -$fp = fopen('/dev/null', 'w'); +$fp = fopen(PHP_OS_FAMILY === 'Windows' ? 'nul' : '/dev/null', 'w'); /* $i = $start = $end = 100000.00; @@ -32,7 +29,7 @@ for ($i = 0; $i < 100; $i++) { // Start actual test $start = memory_get_usage() + 1024; for($i = 0; $i < 1024; $i++) { - curl_setopt($ch, CURLOPT_URL, 'http://127.0.0.1:9/'); + curl_setopt($ch, CURLOPT_URL, "{$host}/get.inc"); curl_setopt($ch, CURLOPT_FILE, $fp); curl_exec($ch); } diff --git a/ext/curl/tests/bug46739.phpt b/ext/curl/tests/bug46739.phpt index b7adc5662f..bf9a5c20d3 100644 --- a/ext/curl/tests/bug46739.phpt +++ b/ext/curl/tests/bug46739.phpt @@ -2,13 +2,14 @@ Bug #46739 (array returned by curl_getinfo should contain content_type key) --SKIPIF-- <?php -if (!extension_loaded("curl")) { - exit("skip curl extension not loaded"); -} +include 'skipif.inc'; ?> --FILE-- <?php -$ch = curl_init('http://127.0.0.1:9/'); +include 'server.inc'; +$host = curl_cli_server_start(); +$ch = curl_init("{$host}/get.inc"); +curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_exec($ch); $info = curl_getinfo($ch); |