Repository navigation
test: isolate Windows registry and driver directories - #508
Conversation
zeroshade
left a comment
There was a problem hiding this comment.
Thanks — the process-private hive + temp roots approach is sound, and every production registry access in config/dirs_windows.go now goes through ConfigLevel.key() → winregroot, so nothing escapes the fixture.
One thing I'd like to settle before merging: with this change, the Windows DBC_TEST_LEVEL_SYSTEM CI job no longer exercises real HKLM\SOFTWARE\ADBC\Drivers or C:\Program Files\ADBC\Drivers. Isolation is the right default for dev machines, but CI runners are disposable — could we add an opt-out (e.g. an env var that skips wintest.Setup()) so one Windows job keeps covering the real locations?
Smaller items:
assertLocalHTTPRoundTripin the child process doesn't relate to registry/filesystem isolation — what is it guarding?- The
RWMutexes inwinregroot/systempatharen't needed since overrides are only set inTestMainbeforem.Run(); plain vars would do. Also consider merging the two packages. - With isolation in place, the
test_registrybuild-tag gate onregistry_test.gomay no longer be necessary (follow-up). - Please squash on merge;
80a6eefis superseded by6b4e99d.
|
@zeroshade Updated in 8c873ab.
|
zeroshade
left a comment
There was a problem hiding this comment.
Thanks — DBC_TEST_WINDOWS_REAL_LOCATIONS addresses my concern: the Windows System job now exercises the real HKLM/Program Files locations (confirmed in the CI log: TestSubcommandsSystem passes with the env set), while every other run stays isolated and Setup() never falls back to real roots implicitly. The rationale for keeping the loopback check, the mutexes and the package split is reasonable now that it's documented, and dropping the test_registry gate is a nice simplification.
Please squash on merge (80a6eef is superseded by 6b4e99d).
Fix unsafe Windows tests discovered while reviewing #502 by isolating registry and driver directories in process-private temporary fixtures.