Skip to content

test: move system crypto tests outside patches - #2557

Merged
Quim Muntal (qmuntal) merged 1 commit into
microsoft/mainfrom
dev/qmuntal/toolchaintest
Oct 8, 2026
Merged

Quim Muntal (qmuntal) merged 1 commit into
microsoft/mainfrom
dev/qmuntal/toolchaintest

Conversation

@qmuntal

Copy link
Copy Markdown
Member

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.

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.
@qmuntal
Quim Muntal (qmuntal) requested a review from a team as a code owner October 8, 2026 13:34
Copilot AI balanced review requested due to automatic review settings October 8, 2026 13:34
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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 toolchaintest module 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.

@qmuntal
Quim Muntal (qmuntal) merged commit 9616199 into microsoft/main Oct 8, 2026
60 checks passed
@qmuntal
Quim Muntal (qmuntal) deleted the dev/qmuntal/toolchaintest branch October 8, 2026 14:23
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.

3 participants