Repository navigation
test: move system crypto tests outside patches - #2557
Merged
Merged
Conversation
Move the Microsoft-specific system crypto command and go/build tests to a top-level toolchaintest module. Run the module from both repository test entry points using the newly built Go toolchain. Remove the tests and fixtures from the Go submodule patch while preserving their coverage outside the upstream source tree.
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
George Adams (gdams)
approved these changes
Oct 8, 2026
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The tests are migrated consistently, invoked by both test entry points, and removed cleanly from the patch set.
0 open findings
What changed in this PR
Moves Microsoft-specific system-crypto tests outside the upstream Go patch set, simplifying future work for #2489.
Changes:
- Adds a standalone
toolchaintestmodule and fixtures. - Runs it from both repository test entry points.
- Removes migrated tests from the crypto-backend patch.
Patches are happy!
| File | Description |
|---|---|
toolchaintest/systemcrypto_test.go |
Tests system-crypto CLI behavior. |
toolchaintest/buildbackend_test.go |
Tests public go/build tag handling. |
toolchaintest/testdata/backendtags_system/main.go |
Provides the base fixture. |
toolchaintest/testdata/backendtags_system/systemcrypto.go |
Provides the tagged fixture. |
toolchaintest/go.mod |
Defines the standalone test module. |
toolchaintest/README.md |
Documents test execution and toolchain selection. |
eng/_util/cmd/build/build.go |
Runs toolchain tests from the development build flow. |
eng/_util/cmd/run-builder/run-builder.go |
Runs toolchain tests in builder CI. |
patches/0002-Add-crypto-backends.patch |
Removes the migrated upstream-tree tests and fixtures. |
🧠 Review effort: Balanced
Give feedback about Copilot approvals in this survey to enter a drawing for a $150 gift card.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates #2489.
Move the Microsoft-specific cmd/go system crypto tests and the go/build AllTags test into a top-level toolchaintest module. The tests use public APIs or invoke an explicitly selected Go executable, so they do not need to modify the upstream Go test tree.
Run toolchaintest from both repository test entry points using the newly built Microsoft Go toolchain. The module also accepts -go for testing a selected toolchain when the harness itself is compiled by a bootstrap Go installation.
Remove the two tests and their fixtures from 0002-Add-crypto-backends.patch, reducing the Go patch by 354 source lines. The updated 12-patch set replays exactly to the original patch tree with only those four files removed; the vendor patch is unchanged.
Validation: all seven toolchaintest tests and 37 subtests pass with the built Microsoft Go toolchain, including the 15-platform no-cgo cross-build matrix, enabled and disabled system crypto build metadata, legacy build tags, FIPS command behavior, and public go/build AllTags behavior. The bootstrap Go 1.26 harness also passes the CLI build-tag matrix while selecting the Microsoft toolchain through -go. The build and run-builder commands compile, and the run-builder dry run invokes toolchaintest before the upstream dist suite.
The full upstream dist/E2E suite was not run.