Re: com php-src: Fixed tests(I am not sure, these tests seems strange, anywayit passes locally now):
tests/run-test/test005.phpttests/run-test/test008.phpt tests/run-test/test008a.phpt

From: Date: Mon, 17 Aug 2015 21:58:30 +0000
Subject: Re: com php-src: Fixed tests(I am not sure, these tests seems strange, anywayit passes locally now):
tests/run-test/test005.phpttests/run-test/test008.phpt tests/run-test/test008a.phpt
References: 1  Groups: php.internals php.qa 
Request: Send a blank email to internals+get-87768@lists.php.net to get a copy of this message
On 13.08.2015 at 16:31, Xinchen Hui wrote: > Commit: 69dbfa8e9f7a292880a639cad647d8ef8cf28a5c > Author: Xinchen Hui <laruence@php.net> Thu, 13 Aug 2015 22:31:59 +0800 > Parents: 896cb514995ff98cb03257d88fc7b55aab5186f9 > Branches: master > > Link: > http://git.php.net/?p=php-src.git;a=commitdiff;h=69dbfa8e9f7a292880a639cad647d8ef8cf28a5c > > Log: > Fixed tests(I am not sure, these tests seems strange, anyway it passes > locally now) > > Changed paths: > M tests/run-test/test005.phpt > M tests/run-test/test008.phpt > M tests/run-test/test008a.phpt > > > Diff: > diff --git a/tests/run-test/test005.phpt b/tests/run-test/test005.phpt > index 5dcb650..07ad7a6 100644 > --- a/tests/run-test/test005.phpt > +++ b/tests/run-test/test005.phpt > @@ -1,8 +1,8 @@ > --TEST-- > -Error message handling (without ZendOptimizer) > +Error message handling (with ZendOpcache) > --SKIPIF-- > <?php > -!extension_loaded("Zend Optimizer") or die("skip Zend Optimizer is > loaded"); > +extension_loaded("Zend Opcache") or die("skip Zend Opcache is not > loaded"); > ?> > --FILE-- > <?php > diff --git a/tests/run-test/test008.phpt b/tests/run-test/test008.phpt > index 41733d9..e37ddbb 100644 > --- a/tests/run-test/test008.phpt > +++ b/tests/run-test/test008.phpt > @@ -1,8 +1,8 @@ > --TEST-- > -Error message handling (with ZendOptimizer) > +Error message handling (without ZendOpcache) > --SKIPIF-- > <?php > -extension_loaded("Zend Optimizer") or die("skip Zend Optimizer is not > loaded"); > +!extension_loaded("Zend Opcache") or die("skip Zend Opcache is loaded"); > ?> > --FILE-- > <?php > diff --git a/tests/run-test/test008a.phpt b/tests/run-test/test008a.phpt > index ff2a93b..bdd48be 100644 > --- a/tests/run-test/test008a.phpt > +++ b/tests/run-test/test008a.phpt > @@ -1,8 +1,8 @@ > --TEST-- > -Error message handling (without ZendOptimizer) > +Error message handling (with ZendOpcache) > --SKIPIF-- > <?php > -if (extension_loaded("Zend Optimizer")) die("skip Zend Optimizer is > loaded"); > +if (!extension_loaded("Zend Opcache")) die("skip Zend Opcache is loaded"); > ?> > --FILE-- > <?php Um, indeed strange tests. The Git history shows that test005.phpt was originally there without any SKIPIF. In 2003, test008.phpt was apparently added to cater to the different output when Zend Opcache was loaded[1], and a respective SKIPIF section for test005.phpt has been added. So both tests were complementing each other. A few months later test008a.phpt was committed: "(re)check in non ZendOptimizer version of test", being basically a duplicate of test005.phpt. I suggest to remove test005.phpt or test008a.phpt. With regard to test008.phpt: is it (still) possible to match the EXPECTF section under certain circumstances? If so, the SKIPIF sections of test008.phpt and test(005|008a).phpt ought to be improved. Otherwise test(005|008a).phpt should be deleted. [1] I don't know why there had been different output. The EXPECTIF section suggests that 1/0 is evaluated during compile time, a warning is thrown and $php_errormsg set appropriately. -- Christoph M. Becker

« previous php.internals (#87768) next »