From: mattficken Operating system: Windows PHP version: Irrelevant Package: Testing related Bug Type: Bug Bug description:ext/standard/tests/file/bug24482.phpt finds too many files if run too fast
Description: ------------ ext/standard/tests/file/bug24482.phpt, run fast enough with other tests, on 4+ cpu core machines may get a different count of the files in the ext/standard/tests/file directory from glob() and opendir(). This is not a stat cache problem. Its just that other PHPT tests create files in ext/standard/tests/file directory and, though they clean them up, on very fast Windows servers, sometimes the deletion is committed to the file system (by Windows) during the time between the glob() and opendir() calls. This isn't really a PHP problem, but rather an OS behavior/side-effect of performance optimizations in the OS/file-system. The simple solution is to change the directory the test checks to ext/standard/tests. PHPT tests don't create test files there at all, so the count of files/directories there won't change during a test run. Test script: --------------- See ext/standard/tests/file/bug24482.phpt Expected result: ---------------- Pass Actual result: -------------- Fail (2 different counts) -- Edit bug report at https://bugs.php.net/bug.php?id=64714&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=64714&r=trysnapshot54 Try a snapshot (PHP 5.3): https://bugs.php.net/fix.php?id=64714&r=trysnapshot53 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=64714&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=64714&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=64714&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=64714&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=64714&r=needscript Try newer version: https://bugs.php.net/fix.php?id=64714&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=64714&r=support Expected behavior: https://bugs.php.net/fix.php?id=64714&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=64714&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=64714&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=64714&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64714&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=64714&r=dst IIS Stability: https://bugs.php.net/fix.php?id=64714&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=64714&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=64714&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=64714&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=64714&r=mysqlcfg