Skip to content

Commit d2ec5be

Browse files
committed
Make gh7875.phpt more resilient
Apparently, on Cirrus CI FreeBSD chmodding a file to 0444 doesn't make it readonly. So in this case, we skip the test. [1] <#7975>
1 parent de4afc0 commit d2ec5be

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ext/standard/tests/mail/gh7875.phpt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
--TEST--
22
GH-7875 (mails are sent even if failure to log throws exception)
3+
--SKIPIF--
4+
<?php
5+
$filename = __DIR__ . "/gh7875.mail.log";
6+
touch($filename);
7+
chmod($filename, 0444);
8+
clearstatcache();
9+
$is_writable = is_writable($filename);
10+
chmod($filename, 0644);
11+
unlink($filename);
12+
if ($is_writable) die("skip cannot make file read-only");
13+
?>
314
--INI--
415
sendmail_path={MAIL:{PWD}/gh7875.mail.out}
516
mail.log={PWD}/gh7875.mail.log

0 commit comments

Comments
 (0)