com php-src: fix AppVeyor failures with Opcache enabled: ext/opcache/tests/basic_logging.phpt ext/opcache/tests/zz z_basic_logging.phpt
| From: | Anatol Belski | Date: | Sun, 15 Jan 2017 20:13:15 +0000 |
| Subject: | com php-src: fix AppVeyor failures with Opcache enabled: ext/opcache/tests/basic_logging.phpt ext/opcache/tests/zz z_basic_logging.phpt | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-96736@lists.php.net to get a copy of this message | ||
Commit: 4f19bb7af61fb05f369b0bc48a962eae5ab23320
Author: Anatol Belski <ab@php.net> Sun, 15 Jan 2017 21:13:15 +0100
Parents: 60aff0bd30197a4fd898904a45f1677e333a6dda
Branches: PHP-7.0 PHP-7.1 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=4f19bb7af61fb05f369b0bc48a962eae5ab23320
Log:
fix AppVeyor failures with Opcache enabled
opcache_reset() only schedules the restart. Under circumstances,
the follow up requests might run uncached, until the restart
condition is met. To mitigate the false positives caused by this
behavior, any tests using opcache_reset() should not be put in
between other tests. Thus, moving the corresponding test to be
executed last.
Changed paths:
D ext/opcache/tests/basic_logging.phpt
A ext/opcache/tests/zzz_basic_logging.phpt
Diff:
diff --git a/ext/opcache/tests/basic_logging.phpt b/ext/opcache/tests/basic_logging.phpt
deleted file mode 100644
index f0ecd6f..0000000
--- a/ext/opcache/tests/basic_logging.phpt
+++ /dev/null
@@ -1,24 +0,0 @@
---TEST--
-Test basic logging for the Opcache
---DESCRIPTION--
-This test runs a simple PHP script and ensures the Opcache
-outputs the correct logging at the highest log_verbosity_level
-
---INI--
-opcache.enable=1
-opcache.enable_cli=1
-opcache.file_cache_only=0
-opcache.log_verbosity_level=4
---SKIPIF--
-<?php require_once('skipif.inc'); ?>
---FILE--
-<?php
-echo "Foo Bar\n";
-opcache_reset();
-echo "Opcache reset";
-?>
---EXPECTF--
-%s Message Cached script '%sbasic_logging%s'
-Foo Bar
-%s Debug Restart Scheduled! Reason: user
-Opcache reset
diff --git a/ext/opcache/tests/zzz_basic_logging.phpt b/ext/opcache/tests/zzz_basic_logging.phpt
new file mode 100644
index 0000000..f0ecd6f
--- /dev/null
+++ b/ext/opcache/tests/zzz_basic_logging.phpt
@@ -0,0 +1,24 @@
+--TEST--
+Test basic logging for the Opcache
+--DESCRIPTION--
+This test runs a simple PHP script and ensures the Opcache
+outputs the correct logging at the highest log_verbosity_level
+
+--INI--
+opcache.enable=1
+opcache..enable_cli=1
+opcache.file_cache_only=0
+opcache.log_verbosity_level=4
+--SKIPIF--
+<?php require_once('skipif.inc'); ?>
+--FILE--
+<?php
+echo "Foo Bar\n";
+opcache_reset();
+echo "Opcache reset";
+?>
+--EXPECTF--
+%s Message Cached script '%sbasic_logging%s'
+Foo Bar
+%s Debug Restart Scheduled! Reason: user
+Opcache reset