Skip to content

Commit 306a72a

Browse files
committed
Add test for GH-10405
1 parent dc6fbec commit 306a72a

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

ext/opcache/tests/gh10405.inc

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?php
2+
print "included\n";

ext/opcache/tests/gh10405.phpt

+26
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
--TEST--
2+
GH-10405 (Missing zend_shared_alloc_unlock)
3+
--INI--
4+
opcache.enable=1
5+
opcache.enable_cli=1
6+
opcache.optimization_level=-1
7+
opcache.preload={PWD}/preload_user.inc
8+
opcache.preload_user={ENV:TEST_NON_ROOT_USER}
9+
opcache.log_verbosity_level=2
10+
--EXTENSIONS--
11+
opcache
12+
posix
13+
--SKIPIF--
14+
<?php
15+
if (PHP_OS_FAMILY == 'Windows') die('skip Preloading is not supported on Windows');
16+
if (posix_geteuid() !== 0) die('skip Test needs root user');
17+
?>
18+
--FILE--
19+
<?php
20+
require __DIR__ . '/gh10405.inc';
21+
?>
22+
OK
23+
--EXPECTF--
24+
bool(false)
25+
included
26+
OK

0 commit comments

Comments
 (0)