Bug #69291 [NEW]: SPL directory tests fail under some conditions
| From: | danack@php.net | Date: | Tue, 24 Mar 2015 19:25:30 +0000 |
| Subject: | Bug #69291 [NEW]: SPL directory tests fail under some conditions | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-191575@lists.php.net to get a copy of this message | ||
From: danack
Operating system: Centos
PHP version: 5.5.23
Package: SPL related
Bug Type: Bug
Bug description:SPL directory tests fail under some conditions
Description:
------------
The tests ext/spl/tests/dit_004.phpt and ext/spl/tests/dit_005.phpt fail
on Centos running in a VirtualBox VM, but only under certain
conditions:
* when they are run through "php run-tests.php
ext/spl/tests/dit_004.phpt" - both of them fail.
* dit_004 fails when run as "valgrind -q --tool=memcheck /usr/bin/php
ext/spl/tests/dit_004.php". dit_005.phpt doesn't fail and works fine.
Both of the tests run as expected when you just run the underlying PHP
code that they are calling.
The behaviour is as if the cloned object is jumping to a random entry in
the DirectoryIterator
Test script:
---------------
<?php
$a = new DirectoryIterator(__DIR__);
$b = clone $a;
$bValue = (string)$b;
$aValue = (string)$a;
if ($aValue != $bValue) {
echo "aValue and bValue should be the same".PHP_EOL;
echo $aValue.PHP_EOL;
echo $bValue.PHP_EOL;
}
else {
echo "Ok";
}
Expected result:
----------------
Ok
Actual result:
--------------
aValue and bValue should be the same
.
SplObjectStorage_offsetGet_invalid_parameter.phpt
--
Edit bug report at https://bugs.php.net/bug.php?id=69291&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=69291&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=69291&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=69291&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=69291&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=69291&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=69291&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=69291&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=69291&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=69291&r=support
Expected behavior: https://bugs.php.net/fix.php?id=69291&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=69291&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=69291&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=69291&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=69291&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=69291&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=69291&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=69291&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=69291&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=69291&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=69291&r=mysqlcfg