Re: Test failure on MacOS X and Failure analysis
| From: | Hannes Magnusson | Date: | Tue, 26 Jun 2007 23:57:23 +0000 |
| Subject: | Re: Test failure on MacOS X and Failure analysis | ||
| References: | 1 | Groups: | php.qa |
| Request: | Send a blank email to php-qa+get-37078@lists.php.net to get a copy of this message | ||
Sorry for not reading this in more debt (currently on vacation), but
there was one thing that caught my eye
On 6/26/07, Raghubansh <softvirus@gmail.com> wrote:
Hi, Firstly many thanks to Tony, Hanne & Dmrity for providing all the required information which help me analyze various failure on MacOS X.I am actually on FreeBSD..
Failure in readlink_realpath_basic.phpt ================================================================================ Output lines indicating failure : --------------------------------- 035+ string(117) "/private/var/root/tony/php-src_5_2/ext/standard/tests/file/readlink_realpath_basic/..readlink_realpath_basic_link.tmp" 035- bool(false) 039+ Warning: readlink(): Invalid argument in /private/var/root/tony/php-src_5_2/ext/standard/tests/file/readlink_realpath_basic.php on line 48 039- Warning: readlink(): Not a directory in %s on line %d 041+ string(120) "/private/var/root/tony/php-src_5_2/ext/standard/tests/file/readlink_realpath_basic/home/test/readlink_realpath_basic.tmp" 041- bool(false) 067+ string(110) "/private/var/root/tony/php-src_5_2/ext/standard/tests/file/readlink_realpath_basic/readlink_realpath_basic.tmp" 067- bool(false) Explanation: ------------ The failure on line number 35 is coming from realpath(). The expected output is bool(false) because given path is invalid and nonexistent. I think this looks like a bug, If you agree I'll raise bugzillaThis is expected behaviour on BSD realpath() and is not a bug. We however overwrite BSDs realpath() in ZTS... Also, Solaris implements rather weird (imo) realpath() were "sometimes" it returns _relative_ paths, not absolute, if you give it relative path....
The failure on line number 41 & 67, The given path is correct but since it end with a forward slash, it should be treated as dir and hence non-existing The function seems to not behave correctly. I think this looks like a bug, If you agree I'll raise bugzilla.This isn't a bug either, snip from realpath(3) manpages:
The realpath() function will resolve both absolute and relative paths and
return the absolute pathname corresponding to pathname. All but the last
component of pathname must exist when realpath() is called.
-Hannes