Edit report at http://bugs.php.net/bug.php?id=52447&edit=1
ID: 52447
User updated by: glen at delfi dot ee
Reported by: glen at delfi dot ee
Summary: FAIL getlastmod() and others
[ext/standard/tests/file/statpage.phpt]
Status: Open
Type: Bug
Package: Filesystem function related
Operating System: PLD Linux
PHP Version: 5.3.3
Block user comment: N
New Comment:
if you retry the test, you'll see that "var_dump(getlastmod());" result
is
growing, i.e it is actually timestamp of when the test was run, not
anything
actual to the test script that was run.
so another patch to remove getlastmod() call an result, leaving only
irrelevant
things to test, i.e as said earlier, the test is to be removed
whatsoever
Previous Comments:
------------------------------------------------------------------------
[2010-07-26 19:18:40] glen at delfi dot ee
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 this bug report at http://bugs.php.net/bug.php?id=52447&edit=1