Re: Re: Test failure on MacOS X and Failure analysis
| From: | Raghubansh | Date: | Thu, 28 Jun 2007 13:05:47 +0000 |
| Subject: | Re: Re: Test failure on MacOS X and Failure analysis | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.cvs php.qa |
| Request: | Send a blank email to php-qa+get-37371@lists.php.net to get a copy of this message | ||
I have noticed bit weird behavior of symlink() & link() where given an
invalid input like NULL, true, empty string ('') works fine on SuSE 9 64bit
& Fedora core 3 64-bit. Its hard to make things always portable but things
of this sort can be avoided if we tried to do strict type checking of the
inputs that are provided to these PHP functions.
(a) User works only on platform X and extpects the PHP function to return
I am in favor of (b), but understand how hard it is to. Going forward with the writing test, i think of following and agree as suggested by Tony. :) 1. Breaking the tests into smaller ones, 2. Generalize output only where ever must, because if lot of generalization is done then we might be missing the errors that would occur, 3. Write specific tests for non portable behavior. Moving forward to make testcases better, i would like to know "Which are the operating system that i need to test all my testcases before commiting to php.net". What are the Operating system where PHP tests are run ? How frequently the tests are run on them ? Knowing the fact, that its not possible to test testcases on all platforms before commit, I would like to test them on essential ones and will try n work on feedback/failure that are noticed when testcases are run on all different platforms. with Regards, Raghubansh, IBM On 6/28/07, Pierre <pierre.php@gmail.com> wrote:exactly what he would see from (say) the equivalent C function (b) User works on multiple platforms and wants his PHP app to behave exactly the same way across all of them.
On 6/28/07, Zoe Slattery <zoe.slattery@googlemail.com> wrote: Derick Rethans wrote:-- with Regards, RaghubanshOn Thu, 28 Jun 2007, Zoe Slattery wrote:returnHi I think there are two user scenarios to consider: (a) User works only on platform X and extpects the PHP function tobehaveexactly what he would see from (say) the equivalent C function (b) User works on multiple platforms and wants his PHP app to(a) but toexactly the same way across all of them. For writing tests it sounds like we are agreeing to follow scenariohismakes changes to the doc so that the user in scenario (b) knows whyworkI'd say that PHP should work like in (b) though - everything shouldapplication might not work.the same on every platform.For many, or even most, functions that has to be the goal. But for filesystem functions I'm not sure that it's always practical, for eample chmod() has (as far as I know) no meaning on Windows but is very useful on Linux, so we'd have to differentiate here. You are right, operating systems specific functions cannot be portable. However we have a couple of issues with some file system (or related functions) which should be solved soon or later. The one I can think about are realpath, basename, dirname or pathinfo (for example, pathinfo should/could be portable (someone reported a bug about it). recently). --Pierre