1--TEST--
2FPM: GH-16432 - fpm_get_status segfault on high nprocs
3--SKIPIF--
4<?php include "skipif.inc"; ?>
5--FILE--
6<?php
7
8require_once "tester.inc";
9
10$cfg = <<<EOT
11[global]
12error_log = {{FILE:LOG}}
13log_level = notice
14[unconfined]
15listen = {{ADDR}}
16pm = dynamic
17pm.max_children = 12800
18pm.start_servers = 1
19pm.min_spare_servers = 1
20pm.max_spare_servers = 1
21catch_workers_output = yes
22EOT;
23
24$code = <<<EOT
25<?php
26var_dump(empty(fpm_get_status()));
27EOT;
28
29$tester = new FPM\Tester($cfg, $code);
30[$sourceFilePath, $scriptName] = $tester->createSourceFileAndScriptName();
31$tester->start();
32$tester->expectLogStartNotices();
33$tester->request()->expectBody('bool(false)');
34$tester->terminate();
35$tester->expectLogTerminatingNotices();
36$tester->close();
37
38?>
39Done
40--EXPECT--
41Done
42--CLEAN--
43<?php
44require_once "tester.inc";
45FPM\Tester::clean();
46?>
47