php-src/tests/lang/045.phpt
Nikita Popov b1b98e08d0 Make 045.phpt busy wait
The timeout is only real-time based on Windows. Make this use
a busy wait loop instead. If hard_timeout is broken, this will
fail with a run-tests enforced timeout instead.
2020-04-29 10:12:53 +02:00

25 lines
513 B
PHP

--TEST--
Timeout again inside register_shutdown_function
--SKIPIF--
<?php
if (getenv("SKIP_SLOW_TESTS")) die("skip slow test");
if (PHP_ZTS) die("skip hard_timeout works only on no-zts builds");
?>
--INI--
hard_timeout=1
--FILE--
<?php
set_time_limit(1);
register_shutdown_function("plop");
function plop() {
while (true);
}
plop();
?>
===DONE===
--EXPECTF--
Fatal error: Maximum execution time of 1 second exceeded in %s on line %d
Fatal error: Maximum execution time of 1 second exceeded in %s on line %d