Internals folks:
Attached is a patch that includes fixes to some .phpt files that are failing when Wincache is enabled. The patch is against the PHP-5.6 branch.
The failures occur because the tests are coded to expect specific resource IDs. However, when Wincache is loaded, it takes a few resource objects "off-the-top". This causes these tests to erroneously fail.
There isn't a bug filed for these; I am starting work on the PHP-5.6/x64 stuff, and wanted to get the pass rate to match the results when Wincache wasn't loaded.
Please review & consider for inclusion in the PHP project.
Thx!
--E.
Hm...looks like the attachment got stripped. Here's the contents of the patch file:
From c5b2dc05d01b74bd6b962f18718a84cbb907fa6d Mon Sep 17 00:00:00 2001
From: Eric Stenson ericsten@php.net
Date: Mon, 25 Nov 2013 10:53:43 -0800
Subject: [PATCH] Fix tests expecting specific resource IDs
When Wincache or APC are installed, the resource IDs are not the same.
This is because Wincache takes a few resource objects for itself. As a
result, these tests become false positives.
Zend/tests/bug41421.phpt | 2 +-
ext/session/tests/session_name_error.phpt | 2 +-
ext/standard/tests/array/each.phpt | Bin 9570 -> 9574 bytes
ext/standard/tests/file/007_error.phpt | 4 +--
ext/standard/tests/file/fgetss_error.phpt | 2 +-
ext/standard/tests/file/ftruncate_error.phpt | 2 +-
ext/standard/tests/general_functions/floatval.phpt | 8 ++---
.../general_functions/gettype_settype_basic.phpt | 32 ++++++++++----------
ext/standard/tests/general_functions/print_r.phpt | 12 ++++----
ext/standard/tests/general_functions/strval.phpt | 4 +--
ext/standard/tests/general_functions/type.phpt | 8 ++---
ext/standard/tests/general_functions/var_dump.phpt | 8 ++---
ext/standard/tests/strings/implode1.phpt | Bin 5875 -> 5877 bytes
tests/strings/001.phpt | 2 ++
14 files changed, 44 insertions(+), 42 deletions(-)
diff --git a/Zend/tests/bug41421.phpt b/Zend/tests/bug41421.phpt
index f10db10..f39fb15 100644
--- a/Zend/tests/bug41421.phpt
+++ b/Zend/tests/bug41421.phpt
@@ -24,6 +24,6 @@ Warning: feof()
: wrapper::stream_eof is not implemented! Assuming EOF in %s on l
Fatal error: Uncaught exception 'Exception' in %s:%d
Stack trace:
#0 [internal function]: wrapper->stream_eof()
-#1 %s(%d): feof(Resource id #6)
+#1 %s(%d): feof(Resource id #%d)
#2 {main}
thrown in %s on line %d
diff --git a/ext/session/tests/session_name_error.phpt b/ext/session/tests/session_name_error.phpt
index 1b99d4e..9f0101d 100644
--- a/ext/session/tests/session_name_error.phpt
+++ b/ext/session/tests/session_name_error.phpt
@@ -231,6 +231,6 @@ string(12) "Hello World!"
-- Iteration 24 --
Warning: session_name()
expects parameter 1 to be string, resource given in %s on line %d
-resource(5) of type (stream)
+resource(%d) of type (stream)
NULL
Done
\ No newline at end of file
diff --git a/ext/standard/tests/array/each.phpt b/ext/standard/tests/array/each.phpt
index 19ee728fd2ee51d8dced3b1ae18aab8e60dba706..974808c08c808d6bd6e2d36d152bfe7e7ecfbca1 100644
GIT binary patch
delta 40
icmaFl^~I-X?Z5ql*wo0bwJcl
CJs9%H|ykt5^U}K@XPz
delta 36
mcmaFn^~h_(X?aG|$!FztfaGuaTt+i6+YHE7*}O+#6$=0u0S-?9
diff --git a/ext/standard/tests/file/007_error.phpt b/ext/standard/tests/file/007_error.phpt
index a369c9d..112beb3 100644
--- a/ext/standard/tests/file/007_error.phpt
+++ b/ext/standard/tests/file/007_error.phpt
@@ -76,7 +76,7 @@ bool(false)
Warning: fopen()
expects at least 2 parameters, 0 given in %s on line %d
bool(false)
-Warning: fclose()
: 5 is not a valid stream resource in %s on line %d
+Warning: fclose()
: %d is not a valid stream resource in %s on line %d
bool(false)
Warning: fclose()
expects parameter 1 to be resource, string given in %s on line %d
@@ -85,7 +85,7 @@ bool(false)
Warning: fclose()
expects exactly 1 parameter, 0 given in %s on line %d
bool(false)
-Warning: feof()
: 5 is not a valid stream resource in %s on line %d
+Warning: feof()
: %d is not a valid stream resource in %s on line %d
bool(false)
Warning: feof()
expects parameter 1 to be resource, string given in %s on line %d
diff --git a/ext/standard/tests/file/fgetss_error.phpt b/ext/standard/tests/file/fgetss_error.phpt
index 3691e96..2b4ad68 100644
--- a/ext/standard/tests/file/fgetss_error.phpt
+++ b/ext/standard/tests/file/fgetss_error.phpt
@@ -98,7 +98,7 @@ bool(false)
Warning: fgetss()
expects parameter 1 to be resource, object given in %s on line %d
bool(false)
-- Testing fgetss()
with closed/unset file handle --
-Warning: fgetss()
: 5 is not a valid stream resource in %s on line %d
+Warning: fgetss()
: %d is not a valid stream resource in %s on line %d
bool(false)
Warning: fgetss()
expects parameter 1 to be resource, null given in %s on line %d
diff --git a/ext/standard/tests/file/ftruncate_error.phpt b/ext/standard/tests/file/ftruncate_error.phpt
index a28095b..254ad76 100644
--- a/ext/standard/tests/file/ftruncate_error.phpt
+++ b/ext/standard/tests/file/ftruncate_error.phpt
@@ -114,7 +114,7 @@ Warning: ftruncate()
expects parameter 1 to be resource, object given in %s on l
bool(false)
-- Testing ftruncate()
with closed/unset file handle --
-Warning: ftruncate()
: 5 is not a valid stream resource in %s on line %d
+Warning: ftruncate()
: %d is not a valid stream resource in %s on line %d
bool(false)
int(36)
diff --git a/ext/standard/tests/general_functions/floatval.phpt b/ext/standard/tests/general_functions/floatval.phpt
index b427bda..9b7a328 100644
--- a/ext/standard/tests/general_functions/floatval.phpt
+++ b/ext/standard/tests/general_functions/floatval.phpt
@@ -157,8 +157,8 @@ float(-5000000)
*** Testing floatval()
on non floating types ***
float(-2147483648)
float(2147483648)
-float(5)
-float(6)
+float(%d)
+float(%d)
float(0)
float(1)
float(-1300)
@@ -175,8 +175,8 @@ float(0)
*** Testing doubleval()
on non floating types ***
float(-2147483648)
float(2147483648)
-float(5)
-float(6)
+float(%d)
+float(%d)
float(0)
float(1)
float(-1300)
diff --git a/ext/standard/tests/general_functions/gettype_settype_basic.phpt b/ext/standard/tests/general_functions/gettype_settype_basic.phpt
index d6fb0d4..d1fd409 100644
--- a/ext/standard/tests/general_functions/gettype_settype_basic.phpt
+++ b/ext/standard/tests/general_functions/gettype_settype_basic.phpt
@@ -232,11 +232,11 @@ int(0)
string(7) "integer"
-- Iteration 12 --
bool(true)
-int(5)
+int(%d)
string(7) "integer"
-- Iteration 13 --
bool(true)
-int(6)
+int(%d)
string(7) "integer"
-- Iteration 14 --
8: Object of class point could not be converted to int
@@ -291,11 +291,11 @@ int(0)
string(7) "integer"
-- Iteration 12 --
bool(true)
-int(5)
+int(%d)
string(7) "integer"
-- Iteration 13 --
bool(true)
-int(6)
+int(%d)
string(7) "integer"
-- Iteration 14 --
8: Object of class point could not be converted to int
@@ -350,11 +350,11 @@ float(0)
string(6) "double"
-- Iteration 12 --
bool(true)
-float(5)
+float(%d)
string(6) "double"
-- Iteration 13 --
bool(true)
-float(6)
+float(%d)
string(6) "double"
-- Iteration 14 --
8: Object of class point could not be converted to double
@@ -409,11 +409,11 @@ float(0)
string(6) "double"
-- Iteration 12 --
bool(true)
-float(5)
+float(%d)
string(6) "double"
-- Iteration 13 --
bool(true)
-float(6)
+float(%d)
string(6) "double"
-- Iteration 14 --
8: Object of class point could not be converted to double
@@ -610,12 +610,12 @@ string(6) "string"
-- Iteration 12 --
2: settype()
: Cannot convert to resource type
bool(false)
-resource(5) of type (stream)
+resource(%d) of type (stream)
string(8) "resource"
-- Iteration 13 --
2: settype()
: Cannot convert to resource type
bool(false)
-resource(6) of type (stream)
+resource(%d) of type (stream)
string(8) "resource"
-- Iteration 14 --
2: settype()
: Cannot convert to resource type
@@ -716,14 +716,14 @@ string(5) "array"
bool(true)
array(1) {
[0]=>
- resource(5) of type (stream)
- resource(%d) of type (stream)
}
string(5) "array"
-- Iteration 13 --
bool(true)
array(1) {
[0]=>
- resource(6) of type (stream)
- resource(%d) of type (stream)
}
string(5) "array"
-- Iteration 14 --
@@ -824,14 +824,14 @@ string(6) "object"
bool(true)
object(stdClass)#2 (1) {
["scalar"]=>
- resource(5) of type (stream)
- resource(%d) of type (stream)
}
string(6) "object"
-- Iteration 13 --
bool(true)
object(stdClass)#2 (1) {
["scalar"]=>
- resource(6) of type (stream)
- resource(%d) of type (stream)
}
string(6) "object"
-- Iteration 14 --
@@ -893,11 +893,11 @@ string(6) "string"
string(6) "string"
-- Iteration 12 --
bool(true)
-string(14) "Resource id #5"
+string(14) "Resource id #%d"
string(6) "string"
-- Iteration 13 --
bool(true)
-string(14) "Resource id #6"
+string(14) "Resource id #%d"
string(6) "string"
-- Iteration 14 --
bool(true)
diff --git a/ext/standard/tests/general_functions/print_r.phpt b/ext/standard/tests/general_functions/print_r.phpt
index 81a523a..19e71fb 100644
--- a/ext/standard/tests/general_functions/print_r.phpt
+++ b/ext/standard/tests/general_functions/print_r.phpt
@@ -1484,13 +1484,13 @@ object_class Object
*** Testingprint_r()
on resources ***
-- Iteration 1 --
-Resource id #5
-Resource id #5
-Resource id #5
+Resource id #%d
+Resource id #%d
+Resource id #%d
-- Iteration 2 --
-Resource id #6
-Resource id #6
-Resource id #6
+Resource id #%d
+Resource id #%d
+Resource id #%d
*** Testing print_r()
on different combinations of scalar
and non-scalar variables ***
diff --git a/ext/standard/tests/general_functions/strval.phpt b/ext/standard/tests/general_functions/strval.phpt
index b92be41..372ac67 100644
--- a/ext/standard/tests/general_functions/strval.phpt
+++ b/ext/standard/tests/general_functions/strval.phpt
@@ -279,9 +279,9 @@ string(0) ""
-- Iteration 1 --
string(6) "Object"
-- Iteration 2 --
-string(14) "Resource id #5"
+string(14) "Resource id #%d"
-- Iteration 3 --
-string(14) "Resource id #6"
+string(14) "Resource id #%d"
-- Iteration 4 --
Notice: Array to string conversion in %sstrval.php on line %d
diff --git a/ext/standard/tests/general_functions/type.phpt b/ext/standard/tests/general_functions/type.phpt
index 98eccbb..51654b1 100644
--- a/ext/standard/tests/general_functions/type.phpt
+++ b/ext/standard/tests/general_functions/type.phpt
@@ -105,9 +105,9 @@ int(0)
bool(true)
int(0)
bool(true)
-int(5)
+int(%d)
bool(true)
-int(6)
+int(%d)
string(54) "Object of class stdClass could not be converted to int"
bool(true)
int(%d)
@@ -128,9 +128,9 @@ float(0)
bool(true)
float(0)
bool(true)
-float(5)
+float(%d)
bool(true)
-float(6)
+float(%d)
string(57) "Object of class stdClass could not be converted to double"
bool(true)
float(%d)
diff --git a/ext/standard/tests/general_functions/var_dump.phpt b/ext/standard/tests/general_functions/var_dump.phpt
index 09e9f3b..c472271 100644
--- a/ext/standard/tests/general_functions/var_dump.phpt
+++ b/ext/standard/tests/general_functions/var_dump.phpt
@@ -844,9 +844,9 @@ object(object_class)#13 (8) {
*** Testing var_dump()
on resources ***
-- Iteration 1 --
-resource(5) of type (stream)
+resource(%d) of type (stream)
-- Iteration 2 --
-resource(6) of type (stream)
+resource(%d) of type (stream)
*** Testing var_dump()
on different combinations of scalar
and non-scalar variables ***
@@ -1227,9 +1227,9 @@ array(4) {
}
array(2) {
[0]=>
- resource(5) of type (stream)
- resource(%d) of type (stream)
[1]=>
- resource(6) of type (stream)
- resource(%d) of type (stream)
}
array(9) {
[0]=>
diff --git a/ext/standard/tests/strings/implode1.phpt b/ext/standard/tests/strings/implode1.phpt
index 3997c54b59eb3b86777b64b58f7ce67f25acac55..3720c069276784a1b588da672f9731c89b4e5fb7 100644
GIT binary patch
delta 32
ncmeyY&D<tb
fFK6f3Ks)Z+ZoqU2PC%oGJ>)s)RAM6{Uz()tUF
delta 30
lcmeyW&oCxb
e2SE32T?;{4L0<Wz;s6a{6o&8I}PnE<>^3giF)
diff --git a/tests/strings/001.phpt b/tests/strings/001.phpt
index 3bfd3db..7b61835 100644
--- a/tests/strings/001.phpt
+++ b/tests/strings/001.phpt
@@ -180,6 +180,8 @@ if ($ss == "$'") {
echo "Testing uniqid: ";
$str = "prefix";
$ui1 = uniqid($str);
+/* Must sleep here to let uniqid generate a different unique ID */
+usleep( 10 );
$ui2 = uniqid($str);
$len = strncasecmp(PHP_OS, 'CYGWIN', 6) ? 19 : 29;
1.7.10.msysgit.1
From: Eric Stenson [mailto:ericsten@microsoft.com]
Sent: Monday, November 25, 2013 11:16 AM
To: 'internals@lists.php.net'
Cc: Pierre Joye
Subject: [PHP-DEV] Patch: Fixing some .phpt's that fail with Wincache
Internals folks:
Attached is a patch that includes fixes to some .phpt files that are failing when Wincache is enabled. The patch is against the PHP-5.6 branch.
The failures occur because the tests are coded to expect specific resource IDs. However, when Wincache is loaded, it takes a few resource objects "off-the-top". This causes these tests to erroneously fail.
There isn't a bug filed for these; I am starting work on the PHP-5.6/x64 stuff, and wanted to get the pass rate to match the results when Wincache wasn't loaded.
Please review & consider for inclusion in the PHP project.
Thx!
--E.
hi Eric!
Hm...looks like the attachment got stripped. Here's the contents of the
patch file:
Can you send it as .txt please?
Thanks!
Cheers,
Pierre
From: Pierre Joye [mailto:pierre.php@gmail.com]
Sent: Monday, November 25, 2013 10:22 PM
Can you send it as .txt please?
Resending as '0001-Fix-tests-expecting-specific-resource-IDs.patch.txt'. Hopefully this makes it through...
--E.
On Mon, Nov 25, 2013 at 8:30 PM, Eric Stenson ericsten@microsoft.comwrote:
diff --git a/ext/standard/tests/strings/implode1.phpt
b/ext/standard/tests/strings/implode1.phpt
index
3997c54b59eb3b86777b64b58f7ce67f25acac55..3720c069276784a1b588da672f9731c89b4e5fb7
100644
GIT binary patch
delta 32
ncmeyY&D<tb
fFK6f3Ks)Z+ZoqU2PC%oGJ>)s)RAM6{Uz()tUFdelta 30
lcmeyW&oCxb
e2SE32T?;{4L0<Wz;s6a{6o&8I}PnE<>^3giF)
What's being changed here?
diff --git a/tests/strings/001.phpt b/tests/strings/001.phpt
index 3bfd3db..7b61835 100644
--- a/tests/strings/001.phpt
+++ b/tests/strings/001.phpt
@@ -180,6 +180,8 @@ if ($ss == "$'") {
echo "Testing uniqid: ";
$str = "prefix";
$ui1 = uniqid($str);
+/* Must sleep here to let uniqid generate a different unique ID */
+usleep( 10 );
$ui2 = uniqid($str);$len = strncasecmp(PHP_OS, 'CYGWIN', 6) ? 19 : 29;
Not sure this is right. uniqid()
should generate different IDs even when
there are two subsequent calls. If it doesn't, that sounds like a bug.
Nikita
2013.11.26. 7:31, "Nikita Popov" nikita.ppv@gmail.com ezt írta:
On Mon, Nov 25, 2013 at 8:30 PM, Eric Stenson <ericsten@microsoft.com
wrote:diff --git a/ext/standard/tests/strings/implode1.phpt
b/ext/standard/tests/strings/implode1.phpt
index
3997c54b59eb3b86777b64b58f7ce67f25acac55..3720c069276784a1b588da672f9731c89b4e5fb7
100644
GIT binary patch
delta 32
ncmeyY&D<tb
fFK6f3Ks)Z+ZoqU2PC%oGJ>)s)RAM6{Uz()tUFdelta 30
lcmeyW&oCxb
e2SE32T?;{4L0<Wz;s6a{6o&8I}PnE<>^3giF)What's being changed here?
diff --git a/tests/strings/001.phpt b/tests/strings/001.phpt
index 3bfd3db..7b61835 100644
--- a/tests/strings/001.phpt
+++ b/tests/strings/001.phpt
@@ -180,6 +180,8 @@ if ($ss == "$'") {
echo "Testing uniqid: ";
$str = "prefix";
$ui1 = uniqid($str);
+/* Must sleep here to let uniqid generate a different unique ID */
+usleep( 10 );
$ui2 = uniqid($str);$len = strncasecmp(PHP_OS, 'CYGWIN', 6) ? 19 : 29;
Not sure this is right.
uniqid()
should generate different IDs even when
there are two subsequent calls. If it doesn't, that sounds like a bug.Nikita
Only if the time is different, and AFAIR some platforms(like win) has less
microtime precision, which could cause problems like that.
But there is a more entropy param for uniqid, maybe that would be a better
solution than sleep.
2013.11.26. 7:31, "Nikita Popov" nikita.ppv@gmail.com ezt írta:
On Mon, Nov 25, 2013 at 8:30 PM, Eric Stenson <ericsten@microsoft.com
wrote:diff --git a/ext/standard/tests/strings/implode1.phpt
b/ext/standard/tests/strings/implode1.phpt
index3997c54b59eb3b86777b64b58f7ce67f25acac55..3720c069276784a1b588da672f9731c89b4e5fb7
100644
GIT binary patch
delta 32
ncmeyY&D<tb
fFK6f3Ks)Z+ZoqU2PC%oGJ>)s)RAM6{Uz()tUFdelta 30
lcmeyW&oCxb
e2SE32T?;{4L0<Wz;s6a{6o&8I}PnE<>^3giF)What's being changed here?
diff --git a/tests/strings/001.phpt b/tests/strings/001.phpt
index 3bfd3db..7b61835 100644
--- a/tests/strings/001.phpt
+++ b/tests/strings/001.phpt
@@ -180,6 +180,8 @@ if ($ss == "$'") {
echo "Testing uniqid: ";
$str = "prefix";
$ui1 = uniqid($str);
+/* Must sleep here to let uniqid generate a different unique ID */
+usleep( 10 );
$ui2 = uniqid($str);$len = strncasecmp(PHP_OS, 'CYGWIN', 6) ? 19 : 29;
Not sure this is right.
uniqid()
should generate different IDs even when
there are two subsequent calls. If it doesn't, that sounds like a bug.Nikita
Only if the time is different, and AFAIR some platforms(like win) has less
microtime precision, which could cause problems like that.
But there is a more entropy param for uniqid, maybe that would be a better
solution than sleep.
Internally, uniqid()
uses usleep(1) only if 'more entropy' is omitted and
not on Windows and Cygwin (must use 'more entropy').
So, when 'more entropy' is present, it will skip usleep(1) but pad the
result with php_combined_lcg().
I'm sure there was a good reason to do so, but it does seem
counter-intuitive at best.
--
Tjerk
From: Tjerk Meesters [mailto:tjerk.meesters@gmail.com]
Sent: Tuesday, November 26, 2013 1:42 AM
2013.11.26. 7:31, "Nikita Popov" <nikita.ppv@gmail.commailto:nikita.ppv@gmail.com> ezt írta:
On Mon, Nov 25, 2013 at 8:30 PM, Eric Stenson <ericsten@microsoft.commailto:ericsten@microsoft.com
wrote:
[...]$ui1 = uniqid($str);
+/* Must sleep here to let uniqid generate a different unique ID */
+usleep( 10 );
$ui2 = uniqid($str);$len = strncasecmp(PHP_OS, 'CYGWIN', 6) ? 19 : 29;
Internally,
uniqid()
uses usleep(1) only if 'more entropy' is omitted and not on Windows and Cygwin (must use 'more entropy').So, when 'more entropy' is present, it will skip usleep(1) but pad the result with php_combined_lcg().
I'm sure there was a good reason to do so, but it does seem counter-intuitive at best.
Ah! My bad. Please remove the usleep(10) and add the ', true' (more entropy) param to the uniqid()
call. This test consistently fails on Windows.
For completeness of coverage, you might consider also testing with the usleep(1) and without the ', true' (more entropy) param.
Thx!
--E.
-----Original Message-----
From: Eric Stenson
From: Tjerk Meesters [mailto:tjerk.meesters@gmail.com]
Sent: Tuesday, November 26, 2013 1:42 AM2013.11.26. 7:31, "Nikita Popov" <nikita.ppv@gmail.commailto:nikita.ppv@gmail.com> ezt írta:
On Mon, Nov 25, 2013 at 8:30 PM, Eric Stenson
<ericsten@microsoft.commailto:ericsten@microsoft.com
wrote:
[...]$ui1 = uniqid($str);
+/* Must sleep here to let uniqid generate a different unique ID
+*/ usleep( 10 );
$ui2 = uniqid($str);$len = strncasecmp(PHP_OS, 'CYGWIN', 6) ? 19 : 29;
Internally,
uniqid()
uses usleep(1) only if 'more entropy' is omitted and not on Windows and Cygwin (must use 'more entropy').So, when 'more entropy' is present, it will skip usleep(1) but pad the result with php_combined_lcg().
I'm sure there was a good reason to do so, but it does seem counter-intuitive at best.
Ah! My bad. Please remove the usleep(10) and add the ', true' (more entropy)
param to theuniqid()
call. This test consistently fails on Windows.For completeness of coverage, you might consider also testing with the usleep(1)
and without the ', true' (more entropy) param.
Here are the updated patches that include the fix for the uniqid()
test (this time with a .txt suffix).
Please consider for the next batch of external developer fixes.
Thx!
--E.
Hi Eric,
From: Tjerk Meesters [mailto:tjerk.meesters@gmail.com]
Sent: Tuesday, November 26, 2013 1:42 AMOn Tue, Nov 26, 2013 at 5:19 PM, Ferenc Kovacs
<tyra3l@gmail.commailto:tyra3l@gmail.com> wrote:
2013.11.26. 7:31, "Nikita Popov"
<nikita.ppv@gmail.commailto:nikita.ppv@gmail.com> ezt írta:On Mon, Nov 25, 2013 at 8:30 PM, Eric Stenson
<ericsten@microsoft.commailto:ericsten@microsoft.com
wrote:[...]
$ui1 = uniqid($str);
+/* Must sleep here to let uniqid generate a different unique ID */
+usleep( 10 );
$ui2 = uniqid($str);$len = strncasecmp(PHP_OS, 'CYGWIN', 6) ? 19 : 29;
Internally,
uniqid()
uses usleep(1) only if 'more entropy' is omitted
and not on Windows and Cygwin (must use 'more entropy').So, when 'more entropy' is present, it will skip usleep(1) but pad the
result with php_combined_lcg().I'm sure there was a good reason to do so, but it does seem
counter-intuitive at best.Ah! My bad. Please remove the usleep(10) and add the ', true' (more
entropy) param to theuniqid()
call. This test consistently fails on
Windows.For completeness of coverage, you might consider also testing with the
usleep(1) and without the ', true' (more entropy) param.Thx!
--E.
I'd suggest you to fork the PHP sources on github so you could make a pull
request. Then it'll be more handy to discuss, test and complete the fixes.
Which wincache codebase should I use to test your patch with PHP-5.6
branch? I'd willingly test when your fork is so far.
Regards
Anatol
-----Original Message-----
From: Anatol Belski [mailto:ab@php.net]
Sent: Wednesday, November 27, 2013 10:54 AM
I'd suggest you to fork the PHP sources on github so you could
make a pull request. Then it'll be more handy to discuss, test
and complete the fixes.Which wincache codebase should I use to test your patch with
PHP-5.6 branch? I'd willingly test when your fork is so far.
Wincache is still in SVN on svn.php.net (https://svn.php.net/repository/pecl/wincache/trunk). It compiles with PHP-5.6, and the tests mostly pass...mostly...
Thx!
--E.
-----Original Message-----
From: Anatol Belski [mailto:ab@php.net]
Sent: Wednesday, November 27, 2013 10:54 AMI'd suggest you to fork the PHP sources on github so you could make a
pull request. Then it'll be more handy to discuss, test and complete
the fixes.
FYI: Pull request #545 submitted.
https://github.com/php/php-src/pull/545
Thx!
--E.
On Mon, Nov 25, 2013 at 11:15 AM, Eric Stenson ericsten@microsoft.comwrote:
Internals folks:
Attached is a patch that includes fixes to some .phpt files that are
failing when Wincache is enabled. The patch is against the PHP-5.6 branch.
I can't reproduce any of these test failures with wincacheu on 5.6, either
with opcache or with no code cache (either with PFTT or run-tests).
I am using 5.6 r1205a6c x64 with the wincache DLL you gave me, on Win7 x64.
This is the wincache snippet of the INI I am using:
wincache.enablecli=1
wincache.ocenabled=0
wincache.fcenabled=1
wincache.ucenabled=1
extension=php_wincache.dll
zend_extension=<path to opcache dll>
What configuration are you using to run these (Win version, php build, INI,
etc...) ?
The failures occur because the tests are coded to expect specific resource
IDs. However, when Wincache is loaded, it takes a few resource objects
"off-the-top". This causes these tests to erroneously fail.There isn't a bug filed for these; I am starting work on the PHP-5.6/x64
stuff, and wanted to get the pass rate to match the results when Wincache
wasn't loaded.Please review & consider for inclusion in the PHP project.
Thx!
--E.