mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
Get rid of atime change testing in bug72666_variation3.phpt
This commit is contained in:
@@ -5,23 +5,11 @@ Bug #72666 (stat cache clearing inconsistent - plain wrapper)
|
|||||||
$filename = __DIR__ . '/bug72666_variation3.txt';
|
$filename = __DIR__ . '/bug72666_variation3.txt';
|
||||||
|
|
||||||
file_put_contents($filename, "test");
|
file_put_contents($filename, "test");
|
||||||
$fd = fopen($filename, "r");
|
|
||||||
$atime1 = fileatime($filename);
|
|
||||||
sleep(1);
|
|
||||||
var_dump(fread($fd, 4));
|
|
||||||
$atime2 = fileatime($filename);
|
|
||||||
$mtime1 = filemtime($filename);
|
$mtime1 = filemtime($filename);
|
||||||
fclose($fd);
|
|
||||||
$fd = fopen($filename, "w");
|
$fd = fopen($filename, "w");
|
||||||
sleep(1);
|
sleep(1);
|
||||||
var_dump(fwrite($fd, "data"));
|
var_dump(fwrite($fd, "data"));
|
||||||
$mtime2 = filemtime($filename);
|
$mtime2 = filemtime($filename);
|
||||||
if (substr(PHP_OS, 0, 3) == 'WIN') {
|
|
||||||
// Windows do not hundle atime
|
|
||||||
var_dump($atime2 == $atime1);
|
|
||||||
} else {
|
|
||||||
var_dump($atime2 > $atime1);
|
|
||||||
}
|
|
||||||
var_dump($mtime2 > $mtime1);
|
var_dump($mtime2 > $mtime1);
|
||||||
?>
|
?>
|
||||||
--CLEAN--
|
--CLEAN--
|
||||||
@@ -29,7 +17,5 @@ var_dump($mtime2 > $mtime1);
|
|||||||
unlink(__DIR__ . '/bug72666_variation3.txt');
|
unlink(__DIR__ . '/bug72666_variation3.txt');
|
||||||
?>
|
?>
|
||||||
--EXPECT--
|
--EXPECT--
|
||||||
string(4) "test"
|
|
||||||
int(4)
|
int(4)
|
||||||
bool(true)
|
bool(true)
|
||||||
bool(true)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user