Edit report at https://bugs.php.net/bug.php?id=64714&edit=1

 ID:                 64714
 Patch added by:     mattfic...@php.net
 Reported by:        mattfic...@php.net
 Summary:            ext/standard/tests/file/bug24482.phpt finds too many
                     files if run too fast
 Status:             Open
 Type:               Bug
 Package:            Testing related
 Operating System:   Windows
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

The following patch has been added/updated:

Patch Name: bug24482.patch.txt
Revision:   1366915651
URL:        
https://bugs.php.net/patch-display.php?bug=64714&patch=bug24482.patch.txt&revision=1366915651


Previous Comments:
------------------------------------------------------------------------
[2013-04-25 18:32:05] mattfic...@php.net

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 this bug report at https://bugs.php.net/bug.php?id=64714&edit=1

Reply via email to