php-src/sapi/fpm/tests/setsofib.phpt
David CARLIER 5174ee2353 FPM add routing view global option (for FreeBSD for now).
set the route table FIB id to the sockets created within FPM up to
the max set by the system, avoiding having to use setfib command line.
Closes #8470.
2022-07-08 06:37:47 +01:00

45 lines
681 B
PHP

--TEST--
FPM: listen.setfib`
--SKIPIF--
<?php
include "skipif.inc";
if (!str_contains(PHP_OS, 'FreeBSD')) {
die('skipped supported only on FreeBSD');
}
?>
--FILE--
<?php
require_once "tester.inc";
$cfg = <<<EOT
[global]
error_log = {{FILE:LOG}}
pid = {{FILE:PID}}
[setfib]
listen = {{ADDR}}
listen.setfib = 68000
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
EOT;
$tester = new FPM\Tester($cfg);
$tester->start();
$tester->expectLogError('Invalid routing table id 68000, max is 1');
$tester->terminate();
$tester->close();
?>
Done
--EXPECT--
Done
--CLEAN--
<?php
require_once "tester.inc";
FPM\Tester::clean();
?>