Bug #52447 [NEW]: FAIL getlastmod() and others [ext/standard/tests/file/statpage.phpt]
| From: | glen at delfi dot ee | Date: | Mon, 26 Jul 2010 17:18:41 +0000 |
| Subject: | Bug #52447 [NEW]: FAIL getlastmod() and others [ext/standard/tests/file/statpage.phpt] | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-152793@lists.php.net to get a copy of this message | ||
From:
Operating system: PLD Linux
PHP version: 5.3.3
Package: Filesystem function related
Bug Type: Bug
Bug description:FAIL getlastmod() and others [ext/standard/tests/file/statpage.phpt]
Description:
------------
ext/standard/tests/file/statpage.phpt test fails, apparently because
getmyinode() returns false, when the script is evaluated or feed from pipe,
it
so returns false:
$ php -r 'var_dump(getmyinode());'
bool(false)
$ echo '<?php var_dump(getmyinode());' | php
bool(false)
and i suppose this is how tests are run, because the test fails:
+ export NO_INTERACTION=1 REPORT_EXIT_STATUS=1 MALLOC_CHECK_=2
+ unset TZ LANG LC_ALL
+ /usr/bin/make -j16 test EXTENSION_DIR=modules
PHP_TEST_SHARED_SYSTEM_EXTENSIONS= RUN_TESTS_SETTINGS=-q --show-out
--show-diff
ext/standard/tests/file/statpage.phpt
Build complete.
Don't forget to run 'make test'.
=====================================================================
PHP : /home/users/glen/rpm/BUILD.i686-linux/php-5.3.3/sapi/cli/php
PHP_SAPI : cli
PHP_VERSION : 5.3.3
ZEND_VERSION: 2.3.0
PHP_OS : Linux - Linux carme-pld-i686 2.6.34.1-3 #1 SMP Tue Jul 6
16:15:11
CEST 2010 i686
INI actual : /home/users/glen/rpm/BUILD.i686-linux/php-5.3.3/tmp-php.ini
More .INIs :
CWD : /home/users/glen/rpm/BUILD.i686-linux/php-5.3.3
Extra dirs :
VALGRIND : Not used
=====================================================================
Running selected tests.
TEST 1/1 [ext/standard/tests/file/statpage.phpt]
========OUT========
int(1280163890)
bool(false)
int(1009)
int(22286)
int(1000)
Done
========DONE========
========DIFF========
002+ bool(false)
005- int(%d)
========DONE========
FAIL getlastmod() and others [ext/standard/tests/file/statpage.phpt]
=====================================================================
Number of tests : 1 1
Tests skipped : 0 ( 0.0%) --------
Tests warned : 0 ( 0.0%) ( 0.0%)
Tests failed : 1 (100.0%) (100.0%)
Expected fail : 0 ( 0.0%) ( 0.0%)
Tests passed : 0 ( 0.0%) ( 0.0%)
---------------------------------------------------------------------
Time taken : 0 seconds
=====================================================================
=====================================================================
FAILED TEST SUMMARY
---------------------------------------------------------------------
getlastmod() and others [ext/standard/tests/file/statpage.phpt]
=====================================================================
$ cat ext/standard/tests/file/statpage.phpt
--TEST--
getlastmod() and others
--FILE--
<?php
var_dump(getlastmod());
var_dump(getmyinode());
var_dump(getmyuid());
var_dump(getmypid());
var_dump(getmygid());
echo "Done\n";
?>
--EXPECTF--
int(%d)
int(%i)
int(%d)
int(%d)
int(%d)
Done
so this test must be removed (at least getmyinode() from it), as it is
impossible to test what inode is when script is ran from pipe, and it does
not
test anything useful.
also, i tried to find the script in svn, but no luck, it's only present in
cvs?
http://svn.php.net/viewvc/php/php-src/trunk/ext/standard/tests/file/
http://svn.php.net/viewvc/php/php-src/branches/PHP_5_3/ext/standard/tests/file/
http://svn.php.net/viewvc/php/php-src/tags/php_5_3_3/ext/standard/tests/file/
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/tests/file/statpage.phpt
i'd appreachiate of info how release tarballs are and where to get latest
source, because snapshots from http://qa.php.net also contain the
test
file, not
in svn web.
attached is patch which removes getmyinode() and it's result from test file
Expected result:
----------------
test things that are testable, remove bogus tests.
--
Edit bug report at http://bugs.php.net/bug.php?id=52447&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=52447&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=52447&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=52447&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=52447&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=52447&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=52447&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=52447&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=52447&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=52447&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=52447&r=support
Expected behavior: http://bugs.php.net/fix.php?id=52447&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=52447&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=52447&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=52447&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=52447&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=52447&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=52447&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=52447&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=52447&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=52447&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=52447&r=mysqlcfg