Skip to content

fix(test): test delete Windows registry accidently#4918

Open
baka-gourd wants to merge 15 commits into
rust-lang:mainfrom
baka-gourd:windows-registry-per-test-uuid
Open

fix(test): test delete Windows registry accidently#4918
baka-gourd wants to merge 15 commits into
rust-lang:mainfrom
baka-gourd:windows-registry-per-test-uuid

Conversation

@baka-gourd

Copy link
Copy Markdown

fix #4915

This PR is intended to fix the issue mentioned in the ticket regarding the accidental deletion of existing registry entries. However, while investigating the problem, we also discovered a concurrency issue in RegistryGuard, so the scope of the fix is quite extensive.

  • Add per-test Windows registry isolation using a unique test UUID.
  • Route Windows registry helpers through test-specific registry subkeys when a UUID is present.
  • Update RegistryGuard to support multiple registry values and clean up the per-test registry subtree.
  • Forward the registry UUID through the test Config and CliTestContext.
  • Update Windows unit and integration tests to use UUID-scoped registry guards.
  • Keep PATH registry checks and Programs entry checks isolated in tests.
  • Treat missing registry keys or values as non-fatal during registry cleanup.
  • No new UUID dependency is introduced; UUIDs are generated from rand.

@baka-gourd baka-gourd force-pushed the windows-registry-per-test-uuid branch from a758fde to c4635ae Compare June 21, 2026 13:53
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.

Current tests run on Windows will accidently clears installed registry values by normal installation of rustup

1 participant