Skip to content

Commit e957a8c

Browse files
committed
Merge branch 'PHP-7.4'
* PHP-7.4: Make bug52820.phpt more robust Explicitly start mysql Use "set -e" in some pipeline steps
2 parents 70ef2f3 + ba6834f commit e957a8c

File tree

5 files changed

+13
-6
lines changed

5 files changed

+13
-6
lines changed

azure/i386/job.yml

+3
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ jobs:
7070
- script: make -j$(/usr/bin/nproc) >/dev/null
7171
displayName: 'Make Build'
7272
- script: |
73+
set -e
7374
sudo make install
7475
sudo mkdir /etc/php.d
7576
sudo chmod 777 /etc/php.d
@@ -79,6 +80,8 @@ jobs:
7980
echo opcache.protect_memory=1 >> /etc/php.d/opcache.ini
8081
displayName: 'Install Build'
8182
- script: |
83+
set -e
84+
sudo service mysql start
8285
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
8386
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
8487
sudo -u postgres psql -c "CREATE DATABASE test;"

azure/install.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
steps:
22
- script: |
3+
set -e
34
sudo make install
45
sudo mkdir /etc/php.d
56
sudo chmod 777 /etc/php.d

azure/job.yml

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
displayName: 'Make Build'
1919
- template: install.yml
2020
- script: |
21+
set -e
22+
sudo service mysql start
2123
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
2224
sudo -u postgres psql -c "ALTER USER postgres PASSWORD 'postgres';"
2325
sudo -u postgres psql -c "CREATE DATABASE test;"

azure/msan_job.yml

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ jobs:
6363
echo pdo_mysql.default_socket=/var/run/mysqld/mysqld.sock > /etc/php.d/pdo_mysql.ini
6464
displayName: 'Install Build'
6565
- script: |
66+
sudo service mysql start
6667
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS test"
6768
displayName: 'Setup'
6869
- template: test.yml

ext/standard/tests/file/bug52820.phpt

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ if (!function_exists('zend_leak_variable'))
77
/* unfortunately no standard function does a cast to FILE*, so we need
88
* curl to test this */
99
if (!extension_loaded("curl")) exit("skip curl extension not loaded");
10-
$handle=curl_init('http://127.0.0.1:37349/');
10+
$handle=curl_init('file:///i_dont_exist/');
1111
curl_setopt($handle, CURLOPT_VERBOSE, true);
1212
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
1313
if (!@curl_setopt($handle, CURLOPT_STDERR, fopen("php://memory", "w+")))
1414
die("skip fopencookie not supported on this platform");
1515
--FILE--
1616
<?php
1717
function do_stuff($url) {
18-
$handle=curl_init('http://127.0.0.1:37349/');
18+
$handle=curl_init('file:///i_dont_exist/');
1919
curl_setopt($handle, CURLOPT_VERBOSE, true);
2020
curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);
2121
curl_setopt($handle, CURLOPT_STDERR, $o = fopen($url, "w+"));
@@ -42,22 +42,22 @@ echo "\nDone.\n";
4242
--EXPECTF--
4343
temp stream (close after):
4444
About to rewind!
45-
* %ATrying 127.0.0.1...%AConnection refused%A
45+
* Couldn't open file /i_dont_exist/
4646
* Closing connection%A%d
4747
4848
memory stream (close after):
4949
About to rewind!
50-
* %ATrying 127.0.0.1...%AConnection refused%A
50+
* Couldn't open file /i_dont_exist/
5151
* Closing connection%A%d
5252

5353
temp stream (leak):
5454
About to rewind!
55-
* %ATrying 127.0.0.1...%AConnection refused%A
55+
* Couldn't open file /i_dont_exist/
5656
* Closing connection%A%d
5757
5858
memory stream (leak):
5959
About to rewind!
60-
* %ATrying 127.0.0.1...%AConnection refused%A
60+
* Couldn't open file /i_dont_exist/
6161
* Closing connection%A%d
6262

6363
Done.

0 commit comments

Comments
 (0)