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:
Nikita Popov 2020-03-18 11:46:37 +01:00
commit e957a8cd92
5 changed files with 13 additions and 6 deletions

View file

@ -70,6 +70,7 @@ jobs:
- script: make -j$(/usr/bin/nproc) >/dev/null
displayName: 'Make Build'
- script: |
set -e
sudo make install
sudo mkdir /etc/php.d
sudo chmod 777 /etc/php.d
@ -79,6 +80,8 @@ jobs:
echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
displayName: 'Install Build'
- script: |
set -e
sudo service mysql start
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 "CREATE DATABASE test;"

View file

@ -1,5 +1,6 @@
steps:
- script: |
set -e
sudo make install
sudo mkdir /etc/php.d
sudo chmod 777 /etc/php.d

View file

@ -18,6 +18,8 @@ jobs:
displayName: 'Make Build'
- template: install.yml
- script: |
set -e
sudo service mysql start
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 "CREATE DATABASE test;"

View file

@ -63,6 +63,7 @@ jobs:
echo pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/pdo_mysql.ini
displayName: 'Install Build'
- script: |
sudo service mysql start
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
displayName: 'Setup'
- template: test.yml

View file

@ -7,7 +7,7 @@ if (!function_exists('zend_leak_variable'))
/* unfortunately no standard function does a cast to FILE*, so we need
* curl to test this */
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_RETURNTRANSFER, true);
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--
<?php
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_RETURNTRANSFER, true);
curl_setopt($handle, CURLOPT_STDERR, $o = fopen($url, "w+"));
@ -42,22 +42,22 @@ echo "\nDone.\n";
--EXPECTF--
temp stream (close after):
About to rewind!
* %ATrying 127.0.0.1...%AConnection refused%A
* Couldn't open file /i_dont_exist/
* Closing connection%A%d
memory stream (close after):
About to rewind!
* %ATrying 127.0.0.1...%AConnection refused%A
* Couldn't open file /i_dont_exist/
* Closing connection%A%d
temp stream (leak):
About to rewind!
* %ATrying 127.0.0.1...%AConnection refused%A
* Couldn't open file /i_dont_exist/
* Closing connection%A%d
memory stream (leak):
About to rewind!
* %ATrying 127.0.0.1...%AConnection refused%A
* Couldn't open file /i_dont_exist/
* Closing connection%A%d
Done.