Skip to content

[Process] Run open_basedir tests in separate processes #44711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

julienfalque
Copy link
Contributor

Q A
Branch? 4.4
Bug fix? no
New feature? no
Deprecations? no
Tickets -
License MIT
Doc PR -

While working on #43239, I noticed that when a test sets open_basedir, the setting is not reset to its initial value after the test, which can have an impact on subsequent tests. I could not find the reason why the setting cannot be reset. I assume this is for security reasons, so the solution is to always run such test in a separate process.

This only concerns two tests for now. Before running those in separate process, the first one prevented subsequent tests in the same class from being run because they are skipped when open_basedir is set, which was always true.

@carsonbot carsonbot added this to the 4.4 milestone Dec 19, 2021
@nicolas-grekas nicolas-grekas changed the title Run open_basedir tests in separate processes [Process] Run open_basedir tests in separate processes Dec 27, 2021
@nicolas-grekas
Copy link
Member

Thank you @julienfalque.

@nicolas-grekas nicolas-grekas merged commit 6d67f8c into symfony:4.4 Dec 27, 2021
@julienfalque julienfalque deleted the open-basedir-tests-separate-process branch December 27, 2021 11:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants