Skip to content

run-tests: Clear the file cache directory in --file-cache-prime#22784

Merged
arnaud-lb merged 1 commit into
php:masterfrom
arnaud-lb:file-cache-prime-rm
Jul 17, 2026
Merged

run-tests: Clear the file cache directory in --file-cache-prime#22784
arnaud-lb merged 1 commit into
php:masterfrom
arnaud-lb:file-cache-prime-rm

Conversation

@arnaud-lb

Copy link
Copy Markdown
Member

run-tests.php --file-cache-prime sets opcache.file_cache to /tmp which makes it difficult to clear the cache.

Set opcache.file_cache to /tmp/php-run-tests-file-cache, and clear the directory when --file-cache-prime is specified.

@arnaud-lb
arnaud-lb marked this pull request as ready for review July 17, 2026 14:26
@arnaud-lb
arnaud-lb merged commit d79a32d into php:master Jul 17, 2026
18 checks passed
@iluuu1994

iluuu1994 commented Jul 25, 2026

Copy link
Copy Markdown
Member

This causes races with multiple workers:

make test TESTS="-j28 --file-cache-prime"

ERROR: Worker 2 reported unexpected E_WARNING: mkdir(): File exists in run-tests.php on line 2097

I think it makes sense to remove the directly when first running tests, but not for every worker.

I'll send a PR. Edit: #22886

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants