PHP  
 PHP_7_1
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Test Failure Report for ext/opcache/tests/revalidate_path_01.phpt ('revalidate_path 01: OPCache must cache only resolved real paths when revalidate_path is set')

Script

1: <?php
2: $dir 
dirname(__FILE__);
3:
$dir1 "$dir/test1";
4:
$dir2 "$dir/test2";
5:
$link "$dir/test";
6:
$file1 "$dir1/index.php";
7:
$file2 "$dir2/index.php";
8:
$main "$dir/main.php";
9: @
mkdir($dir1);
10: @
mkdir($dir2);
11: @
file_put_contents($main,  '<?php include(\'' $link .'/index.php\');');
12: @
file_put_contents($file1"TEST 1\n");
13: @
file_put_contents($file2"TEST 2\n");
14: while (
filemtime($file1) != filemtime($file2)) {
15:     
touch($file1);
16:     
touch($file2);
17: }
18: if (
substr(PHP_OS03) == 'WIN') {
19:     @
rmdir($link);
20:     
$ln str_replace('/''\\'$link);
21:     
$d1 realpath($dir1);
22:     `
mklink /j $ln $d1`;
23: } else {
24:     @
unlink($link);
25:     @
symlink($dir1$link);
26: }
27:
28: include 
"php_cli_server.inc";
29:
//php_cli_server_start('-d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.revalidate_path=1');
30:
php_cli_server_start('-d opcache.enable=1 -d opcache.enable_cli=1 -d opcache.revalidate_path=1 -d opcache.file_update_protection=0 -d realpath_cache_size=0');
31: echo 
file_get_contents('http://' PHP_CLI_SERVER_ADDRESS '/main.php');
32: echo 
file_get_contents('http://' PHP_CLI_SERVER_ADDRESS '/main.php');
33: if (
substr(PHP_OS03) == 'WIN') {
34:     @
rmdir($link);
35:     
$ln str_replace('/''\\'$link);
36:     
$d2 realpath($dir2);
37:     `
mklink /j $ln $d2`;
38: } else {
39:     @
unlink($link);
40:     @
symlink($dir2$link);
41: }
42: echo 
file_get_contents('http://' PHP_CLI_SERVER_ADDRESS '/main.php');
43: echo 
file_get_contents('http://' PHP_CLI_SERVER_ADDRESS '/main.php');
44:
?>
45:

Expected

TEST 1
TEST 1
TEST 2
TEST 2

Output

Unable to connect to server

Diff

001+ Unable to connect to server
001- TEST 1
002- TEST 1
003- TEST 2
004- TEST 2

 

Generated at Thu, 23 Nov 2017 06:57:06 +0000 (26 hours ago)

Copyright © 2005-2017 The PHP Group
All rights reserved.