xref: /PHP-5.6/sapi/fpm/tests/skipapparmor.inc (revision dff0d512)
1<?php
2
3$logfile = dirname(__FILE__).'/php-fpm.log.tmp';
4$cfg = <<<EOT
5[global]
6error_log = $logfile
7[a]
8listen = 127.0.0.1:9001
9pm = dynamic
10pm.max_children = 5
11pm.start_servers = 2
12pm.min_spare_servers = 1
13pm.max_spare_servers = 3
14apparmor_hat = a
15EOT;
16
17$fpm = run_fpm($cfg, $out, '-t');
18$ok = false;
19if (is_resource($fpm)) {
20    if (strpos(stream_get_contents($out), "test is successful") !== FALSE) {
21        $ok = true;
22    }
23    fclose($out);
24    proc_close($fpm);
25}
26if (!$ok) {
27    die("skip No apparmor support built in");
28}
29
30?>
31