Disable failing Mark-of-the-Web test and fix parallel test failures#54945
Open
dsplaisted wants to merge 4 commits into
Open
Disable failing Mark-of-the-Web test and fix parallel test failures#54945dsplaisted wants to merge 4 commits into
dsplaisted wants to merge 4 commits into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the Windows Mark-of-the-Web (MOTW) unit test to be resilient on newer/locked-down Windows images where the urlmon InternetSecurityManager COM class may exist but no longer maps Zone.Identifier to an Internet-zone classification.
Changes:
- Replace the “COM class exists” gate with a functional probe that independently calls
MapUrlToZoneon the test file. - Add minimal COM interop for
IInternetSecurityManagerto support the probe and conditionally assert the detector result based on actual zone mapping behavior.
nagilson
approved these changes
Jun 23, 2026
joeloff
approved these changes
Jun 23, 2026
DangerousFileDetectorTests.ItShouldDetectFileWithMarkOfTheWeb relies on the legacy IE/urlmon InternetSecurityManager to detect a file's Mark-of-the-Web zone. On the new windows.amd64.vs2026.pre.scout image (IE removed), MapUrlToZone no longer reliably honors the Zone.Identifier stream, and the behavior even diverges between an independent probe and the product's IsDangerous, so the positive assertion cannot be reliably gated. Disable the test on this image pending a robust approach, tracked by dotnet#54951. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
56ca1fd to
8489e73
Compare
…odLevel parallelism ItCanAddDependents, ItCanFindVisualStudioDependents, and ItWillNotRemoveTheProviderIfOtherDependentsExist all create and mutate the same hardcoded registry key (.NET_SDK_TEST_PROVIDER_KEY). xUnit ran methods within a class serially, but the migration to MSTest MethodLevel parallelism (dotnet#54766) runs them concurrently, causing intermittent 'expected 1, actual 2 dependents' and missing-subkey failures. Add class-level [DoNotParallelize] to restore serial execution, matching the existing pattern used elsewhere in the repo. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The 'full' and 'partial' DataRows of ILLink_TrimMode_new_options run concurrently under MSTest MethodLevel parallelism. Both passed a bare '-bl' to the publish command, which writes msbuild.binlog to the process current directory. Since PublishCommand did not set a working directory, that resolved to the shared Helix work-item directory, so the two DataRows raced on the same msbuild.binlog and the publish failed with MSB4104 (file used by another process). Set the command's working directory to the per-DataRow project directory (which is unique because the test asset identifier includes targetFramework + trimMode), so the binary log is written there instead of the shared current directory. This matches the pattern already used by DotnetBuildCommand. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Jun 24, 2026
Member
Author
|
/azp run dotnet-sdk-public-ci |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Member
Author
|
/azp run |
|
Azure Pipelines successfully started running 2 pipeline(s), but failed to run 1 pipeline(s). |
This was referenced Jun 24, 2026
Contributor
That description does not match what the pull request currently does.
The summary doesn't match it either, as the test gets disabled even if the Windows instance includes IE. |
Member
Author
|
@KalleOlaviNiemitalo Thanks, I've updated the title and description to match the current PR changes |
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.
Three independent test-stabilization fixes found while triaging #54871's CI failures:
DangerousFileDetectorTests.ItShouldDetectFileWithMarkOfTheWebcan't pass on IE-less Windows images — urlmonMapUrlToZoneignores the MOTW stream, and the productIsDangerousand a capability probe diverge — so it's[Ignore]d against DangerousFileDetectorTests.ItShouldDetectFileWithMarkOfTheWeb fails on IE-less vs2026.pre.scout image #54951.DependencyProviderTests: its methods share a hardcoded registry key and race under MSTestMethodLevelparallelism (Set MSTest.Sdk-wide defaults: UseMSTestSdk, method-level parallelization, Recommended analyzers #54766). Added class-level[DoNotParallelize].ILLink_TrimMode_new_optionsbinlog collision: the parallelfull/partialDataRows both wrotemsbuild.binlogto the shared work-item directory (MSB4104). Set a per-DataRow working directory.