mirror of
https://github.com/php/pftt2.git
synced 2026-03-24 09:12:17 +01:00
Enable opcache to run full list of PHPT tests in test package #23
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @hollyhuiLi on GitHub (May 21, 2019).
When we manually run PHPT tests with run-test.php, we could update the php.ini to enable opcache to run the full set of tests. Switch to PFTT, we need to figure out the right way to run PHPT tests with opcache on:
There is an opcache.groovy enables opcache scenario, but it seems only good for tests under ext/opcache ( more failures testing other tests)
Also, add opcache.groovy together with default.groovy like below will cause the pftt tool to run tests twice
pftt -config opcache,default core_list ...
Adding a new groovy to return combination of opcache and default scenarios will also run the tests twice
@cmb69 commented on GitHub (May 24, 2019):
It seems to me that running with
-config opcacheworks as intended, i.e. the tests are executed with Opcache enabled. Test failures when running parallel tests with Opcache enabled are not unlikely to occur on Windows; see php/php-src#3851. There's a preliminary fix to allow to have multiple Opcache instances, which needs more testing (I'll do that ASAP). Then this has to be supported by PFTT2, and also PFTT2 needs to support --CONFLICTS--. The PHPTs in PHP-7.3 and earlier do not have --CONFLICTS-- clauses, so for these versions PFTT must not run parallel tests when Opcache is enabled, even when the mentioned improvements are in place.I wonder, though, how PFTT2 currently handles the missing --CONFLICTS-- clauses; these are actually not particularly related to Opcache, but rather deal with the fact that the PHPTs have originally not supposed to be run in parallel.
@hollyhuiLi commented on GitHub (May 25, 2019):
If I understood correctly, the more failed tests under PFTT2 with -config opcache are as expected because of they are running in parallel? But we didn't see that much of failure when we run PHPT tests with run-test.php, even we have multiple instances of cmd windows running for different builds. Is that because PFTT2 has more more threads and there are quite a lot of tests running in parallel which increased the chance of failing?
@cmb69 commented on GitHub (May 25, 2019):
@hollyhuiLi As it is now, there is a separate Opcache instance per user and PHP version (on Windows). That means different PHP builds will have their own Opcache instance, so there shouldn't be any issues (besides the general --CONFLICTS-- issue) running these test suites in parallel. Running tests for the same PHP build in parallel (multiple cmd windows) is likely to have issues. And for PFTT2 the situation is likely worse, due to the many parallel threads using the same Opcache instance.
@cmb69 commented on GitHub (Oct 10, 2019):
@lavturo, is this still an issue? It seems to me that
-config opcacheworks as expected (potential test failures due to parallel running tests would be a different issue).@lavturo commented on GitHub (Oct 10, 2019):
@cmb69 If this is in regards to
-config opcache, then it's fine. That is not an issue.@cmb69 commented on GitHub (Oct 10, 2019):
Thanks for the confirmation. So this ticket can be closed.