Skip to content

Disable failing Mark-of-the-Web test and fix parallel test failures#54945

Open
dsplaisted wants to merge 4 commits into
dotnet:mainfrom
dsplaisted:10124-versionless-packagereference
Open

Disable failing Mark-of-the-Web test and fix parallel test failures#54945
dsplaisted wants to merge 4 commits into
dotnet:mainfrom
dsplaisted:10124-versionless-packagereference

Conversation

@dsplaisted

@dsplaisted dsplaisted commented Jun 23, 2026

Copy link
Copy Markdown
Member

Three independent test-stabilization fixes found while triaging #54871's CI failures:

Copilot AI review requested due to automatic review settings June 23, 2026 16:56
@dsplaisted dsplaisted requested a review from a team June 23, 2026 16:57

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.

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 MapUrlToZone on the test file.
  • Add minimal COM interop for IInternetSecurityManager to support the probe and conditionally assert the detector result based on actual zone mapping behavior.

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>
@dsplaisted dsplaisted force-pushed the 10124-versionless-packagereference branch from 56ca1fd to 8489e73 Compare June 23, 2026 20:35
@dsplaisted dsplaisted changed the title Make Mark-of-the-Web test robust to IE-stripped Windows images Disable Mark-of-the-Web test on IE-less Windows images (#54951) Jun 23, 2026
dsplaisted and others added 2 commits June 23, 2026 17:21
…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>
@dsplaisted

Copy link
Copy Markdown
Member Author

/azp run dotnet-sdk-public-ci

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).

@dsplaisted dsplaisted closed this Jun 24, 2026
@dsplaisted dsplaisted reopened this Jun 24, 2026
@dsplaisted

Copy link
Copy Markdown
Member Author

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 2 pipeline(s), but failed to run 1 pipeline(s).

@KalleOlaviNiemitalo

KalleOlaviNiemitalo commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Replace the instantiation-only gate with a functional probe

That description does not match what the pull request currently does.

Disable Mark-of-the-Web test on IE-less Windows images

The summary doesn't match it either, as the test gets disabled even if the Windows instance includes IE.

@dsplaisted dsplaisted changed the title Disable Mark-of-the-Web test on IE-less Windows images (#54951) Disable failing Mark-of-the-Web test and fix parallel test failures Jun 24, 2026
@dsplaisted

Copy link
Copy Markdown
Member Author

@KalleOlaviNiemitalo Thanks, I've updated the title and description to match the current PR changes

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.

5 participants