fix race condition in SplFileInfo_getInode_basic

These failed once on @smith's diff and I think it was from them both running at the same time.

I'm not really sure why the others changed their path, but that is the original zend file.
It shouldn't matter as it is a error line that will be set to whatever we print out if the test passes.

Done with:

  tools/import_zend_test.py -z /tmp/php-5.4.13/ -o SplFileInfo_get
Esse commit está contido em:
Paul Tarjan
2013-04-25 11:01:27 -07:00
commit de Sara Golemon
commit fe7efe7192
6 arquivos alterados com 15 adições e 11 exclusões
@@ -2,4 +2,4 @@ HipHop Fatal error: %a
Stack trace:
#0 %s: SplFileInfo->getGroup()
#1 {main}
thrown in hphp/test/zend/bad/ext-spl/SplFileInfo_getGroup_error.php on line %d
thrown in hphp/test/zend/bad/ext-spl/SplFileInfo_getGroup_error.phpt on line %d
@@ -2,4 +2,4 @@ HipHop Fatal error: %a
Stack trace:
#0 %s: SplFileInfo->getInode()
#1 {main}
thrown in hphp/test/zend/bad/ext-spl/SplFileInfo_getInode_error.php on line %d
thrown in hphp/test/zend/bad/ext-spl/SplFileInfo_getInode_error.phpt on line %d
@@ -2,4 +2,4 @@ HipHop Fatal error: %a
Stack trace:
#0 %s: SplFileInfo->getOwner()
#1 {main}
thrown in hphp/test/zend/bad/ext-spl/SplFileInfo_getOwner_error.php on line %d
thrown in hphp/test/zend/bad/ext-spl/SplFileInfo_getOwner_error.phpt on line %d
@@ -1,11 +1,11 @@
<?php
//file
touch ('test_file_ptfi');
$fileInfo = new SplFileInfo('test_file_ptfi');
$result = shell_exec('ls -i test_file_ptfi');
touch ('SplFileInfo_getInode_basic.txt');
$fileInfo = new SplFileInfo('SplFileInfo_getInode_basic.txt');
$result = shell_exec('ls -i SplFileInfo_getInode_basic.txt');
var_dump($fileInfo->getInode() == $result);
?><?php
unlink('test_file_ptfi');
unlink('SplFileInfo_getInode_basic.txt');
?>
@@ -1,11 +1,11 @@
<?php
//file
touch ('test_file_ptfi');
chmod('test_file_ptfi', 0557);
$fileInfo = new SplFileInfo('test_file_ptfi');
touch ('SplFileInfo_getPerms_basic.txt');
chmod('SplFileInfo_getPerms_basic.txt', 0557);
$fileInfo = new SplFileInfo('SplFileInfo_getPerms_basic.txt');
var_dump($fileInfo->getPerms() == 0100557);
?><?php
unlink('test_file_ptfi');
unlink('SplFileInfo_getPerms_basic.txt');
?>
+4
Ver Arquivo
@@ -512,6 +512,10 @@ def walk(filename, source):
test = test.replace('31337', '31338')
if '/ext-standard-file/fpassthru_variation.php' in full_dest_filename:
test = test.replace('passthru.tmp', 'fpassthru_variation.tmp')
if '/ext-spl/SplFileInfo_getPerms_basic.php' in full_dest_filename:
test = test.replace('test_file_ptfi', 'SplFileInfo_getPerms_basic.txt')
if '/ext-spl/SplFileInfo_getInode_basic.php' in full_dest_filename:
test = test.replace('test_file_ptfi', 'SplFileInfo_getInode_basic.txt')
file(full_dest_filename, 'w').write(test)