-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Fix race in test_inherit_env #42795
Fix race in test_inherit_env #42795
Conversation
`env` tests set (and unset) randomly generated variables with names starting with `TEST`. So in `test_inherit_env` between variable capture and process spawn `TEST*` variables can be unset if `env` tests executed concurrently. Thus `TEST*` variables must not be checked in that test.
r? @aturon (rust_highfive has picked a reviewer for you, use r? to override) |
Could this test actually be moved to a |
Shouldn't tests which modify global state be moved to run-pass, and this test (which doesn't modify global state) kept where it is instead? |
Yes, depends on how much work you're willing to do. One's much easier than the other most likely |
Should fix race rust-lang#42795
…crichton Move global vars changing tests into run-pass Should fix race rust-lang#42795
Could it be that |
env
tests set (and unset) randomly generated variables with namesstarting with
TEST
. So intest_inherit_env
between variablecapture and process spawn
TEST*
variables can be unset ifenv
tests executed concurrently. Thus
TEST*
variables must not bechecked in that test.