mirror of
https://github.com/php/php-src.git
synced 2025-08-16 22:18:50 +02:00
Merge branch 'PHP-7.4'
* PHP-7.4: Make bug52820.phpt more robust Explicitly start mysql Use "set -e" in some pipeline steps
This commit is contained in:
commit
e957a8cd92
5 changed files with 13 additions and 6 deletions
|
@ -70,6 +70,7 @@ jobs:
|
||||||
- script: make -j$(/usr/bin/nproc) >/dev/null
|
- script: make -j$(/usr/bin/nproc) >/dev/null
|
||||||
displayName: 'Make Build'
|
displayName: 'Make Build'
|
||||||
- script: |
|
- script: |
|
||||||
|
set -e
|
||||||
sudo make install
|
sudo make install
|
||||||
sudo mkdir /etc/php.d
|
sudo mkdir /etc/php.d
|
||||||
sudo chmod 777 /etc/php.d
|
sudo chmod 777 /etc/php.d
|
||||||
|
@ -79,6 +80,8 @@ jobs:
|
||||||
echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
|
echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
|
||||||
displayName: 'Install Build'
|
displayName: 'Install Build'
|
||||||
- script: |
|
- script: |
|
||||||
|
set -e
|
||||||
|
sudo service mysql start
|
||||||
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
|
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
|
||||||
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
|
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
|
||||||
sudo -u postgres psql -c "CREATE DATABASE test;"
|
sudo -u postgres psql -c "CREATE DATABASE test;"
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
steps:
|
steps:
|
||||||
- script: |
|
- script: |
|
||||||
|
set -e
|
||||||
sudo make install
|
sudo make install
|
||||||
sudo mkdir /etc/php.d
|
sudo mkdir /etc/php.d
|
||||||
sudo chmod 777 /etc/php.d
|
sudo chmod 777 /etc/php.d
|
||||||
|
|
|
@ -18,6 +18,8 @@ jobs:
|
||||||
displayName: 'Make Build'
|
displayName: 'Make Build'
|
||||||
- template: install.yml
|
- template: install.yml
|
||||||
- script: |
|
- script: |
|
||||||
|
set -e
|
||||||
|
sudo service mysql start
|
||||||
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
|
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
|
||||||
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
|
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
|
||||||
sudo -u postgres psql -c "CREATE DATABASE test;"
|
sudo -u postgres psql -c "CREATE DATABASE test;"
|
||||||
|
|
|
@ -63,6 +63,7 @@ jobs:
|
||||||
echo pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/pdo_mysql.ini
|
echo pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/pdo_mysql.ini
|
||||||
displayName: 'Install Build'
|
displayName: 'Install Build'
|
||||||
- script: |
|
- script: |
|
||||||
|
sudo service mysql start
|
||||||
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
|
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
|
||||||
displayName: 'Setup'
|
displayName: 'Setup'
|
||||||
- template: test.yml
|
- template: test.yml
|
||||||
|
|
|
@ -7,7 +7,7 @@ if (!function_exists('zend_leak_variable'))
|
||||||
/* unfortunately no standard function does a cast to FILE*, so we need
|
/* unfortunately no standard function does a cast to FILE*, so we need
|
||||||
* curl to test this */
|
* curl to test this */
|
||||||
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
|
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
|
||||||
$handle=curl_init('http://127.0.0.1:37349/');
|
$handle=curl_init('file:///i_dont_exist/');
|
||||||
curl_setopt($handle, CURLOPT_VERBOSE, true);
|
curl_setopt($handle, CURLOPT_VERBOSE, true);
|
||||||
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
|
||||||
if (!@curl_setopt($handle, CURLOPT_STDERR, fopen("php://memory", "w+")))
|
if (!@curl_setopt($handle, CURLOPT_STDERR, fopen("php://memory", "w+")))
|
||||||
|
@ -15,7 +15,7 @@ if (!@curl_setopt($handle, CURLOPT_STDERR, fopen("php://memory", "w+")))
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
function do_stuff($url) {
|
function do_stuff($url) {
|
||||||
$handle=curl_init('http://127.0.0.1:37349/');
|
$handle=curl_init('file:///i_dont_exist/');
|
||||||
curl_setopt($handle, CURLOPT_VERBOSE, true);
|
curl_setopt($handle, CURLOPT_VERBOSE, true);
|
||||||
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
|
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
|
||||||
curl_setopt($handle, CURLOPT_STDERR, $o = fopen($url, "w+"));
|
curl_setopt($handle, CURLOPT_STDERR, $o = fopen($url, "w+"));
|
||||||
|
@ -42,22 +42,22 @@ echo "\nDone.\n";
|
||||||
--EXPECTF--
|
--EXPECTF--
|
||||||
temp stream (close after):
|
temp stream (close after):
|
||||||
About to rewind!
|
About to rewind!
|
||||||
* %ATrying 127.0.0.1...%AConnection refused%A
|
* Couldn't open file /i_dont_exist/
|
||||||
* Closing connection%A%d
|
* Closing connection%A%d
|
||||||
|
|
||||||
memory stream (close after):
|
memory stream (close after):
|
||||||
About to rewind!
|
About to rewind!
|
||||||
* %ATrying 127.0.0.1...%AConnection refused%A
|
* Couldn't open file /i_dont_exist/
|
||||||
* Closing connection%A%d
|
* Closing connection%A%d
|
||||||
|
|
||||||
temp stream (leak):
|
temp stream (leak):
|
||||||
About to rewind!
|
About to rewind!
|
||||||
* %ATrying 127.0.0.1...%AConnection refused%A
|
* Couldn't open file /i_dont_exist/
|
||||||
* Closing connection%A%d
|
* Closing connection%A%d
|
||||||
|
|
||||||
memory stream (leak):
|
memory stream (leak):
|
||||||
About to rewind!
|
About to rewind!
|
||||||
* %ATrying 127.0.0.1...%AConnection refused%A
|
* Couldn't open file /i_dont_exist/
|
||||||
* Closing connection%A%d
|
* Closing connection%A%d
|
||||||
|
|
||||||
Done.
|
Done.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue