Re: Re: svn: /php/php-src/ branches/PHP_5_4/Zend/zend_execute_API.c trunk/Zend/zend_execute_API.c
| From: | Adam Harvey | Date: | Tue, 07 Feb 2012 08:33:52 +0000 |
| Subject: | Re: Re: svn: /php/php-src/ branches/PHP_5_4/Zend/zend_execute_API.c trunk/Zend/zend_execute_API.c | ||
| References: | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-57782@lists.php.net to get a copy of this message | ||
On 3 February 2012 12:15, Adam Harvey <aharvey@php.net> wrote:
> On 3 February 2012 12:05, Stas Malyshev <smalyshev@sugarcrm.com> wrote:
>>> For me at least, tests/func/005a.phpt is the last failing test on
>>> PHP_5_4 on my OS X machine, so it would be nice to get this cleared up
>>> pre-5.4.0 to help get cleaner test suite results.
>>
>>
>> I really wouldn't want to hold the release for another two weeks just for
>> that.
>
> Agreed, which is why I'm suggesting just altering the test itself for
> 5.4 and coming up with a better fix for trunk only.
Specifically, how about the attached patch (also available at
http://www.adamharvey.name/patches/osx-max_execution_time-test-patch.diff,
in case the mailing list decides to strip it)? This only patches the
test to XFAIL this test on OS X, which makes the PHP_5_4 test suite
run without any unexpected failures for me on a default build.
In the longer term, I'll still work up a patch for trunk that at least
attempts to deal with this on a ZE level, but if the test patch is OK
for 5.4, I can apply that straightaway.
Adam
Index: tests/func/005a.phpt =================================================================== --- tests/func/005a.phpt (revision 323108) +++ tests/func/005a.phpt (working copy) @@ -3,6 +3,7 @@ --SKIPIF-- <?php if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); +if (PHP_OS == 'Darwin') die("skip run the Darwin-specific version instead"); ?> --FILE-- <?php Index: tests/func/005a-darwin.phpt =================================================================== --- tests/func/005a-darwin.phpt (revision 0) +++ tests/func/005a-darwin.phpt (revision 0) @@ -0,0 +1,35 @@ +--TEST-- +Testing register_shutdown_function() with timeout. (Bug: #21513) +--SKIPIF-- +<?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); +if (PHP_OS != 'Darwin') die("skip run the non-Darwin-specific version instead"); +?> +--XFAIL-- +OS X has a broken ITIMER_PROF implementation, which leads to max_execution_time not working as expected. +--FILE-- +<?php + +ini_set('display_errors', 0); + +echo "Start\n"; + +function boo() +{ + echo "Shutdown\n"; +} + +register_shutdown_function("boo"); + +/* not necessary, just to show the error sooner */ +set_time_limit(1); + +/* infinite loop to simulate long processing */ +for (;;) {} + +echo "End\n"; + +?> +--EXPECT-- +Start +Shutdown
Index: tests/func/005a.phpt =================================================================== --- tests/func/005a.phpt (revision 323108) +++ tests/func/005a.phpt (working copy) @@ -3,6 +3,7 @@ --SKIPIF-- <?php if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); +if (PHP_OS == 'Darwin') die("skip run the Darwin-specific version instead"); ?> --FILE-- <?php Index: tests/func/005a-darwin.phpt =================================================================== --- tests/func/005a-darwin.phpt (revision 0) +++ tests/func/005a-darwin.phpt (revision 0) @@ -0,0 +1,35 @@ +--TEST-- +Testing register_shutdown_function() with timeout. (Bug: #21513) +--SKIPIF-- +<?php +if (getenv("SKIP_SLOW_TESTS")) die("skip slow test"); +if (PHP_OS != 'Darwin') die("skip run the non-Darwin-specific version instead"); +?> +--XFAIL-- +OS X has a broken ITIMER_PROF implementation, which leads to max_execution_time not working as expected. +--FILE-- +<?php + +ini_set('display_errors', 0); + +echo "Start\n"; + +function boo() +{ + echo "Shutdown\n"; +} + +register_shutdown_function("boo"); + +/* not necessary, just to show the error sooner */ +set_time_limit(1); + +/* infinite loop to simulate long processing */ +for (;;) {} + +echo "End\n"; + +?> +--EXPECT-- +Start +Shutdown