Skip to content

Flaky test: LinkAll.LinkAllRegressionTest.Pasteboard_ImagesTest fails intermittently on shared UIPasteboard state #26619

Description

@mmitche

Summary

LinkAll.LinkAllRegressionTest.Pasteboard_ImagesTest (in tests/linker/link all/LinkAllTest.cs) intermittently fails with:

Assert.That (UIPasteboard.General.Images.Length, Is.EqualTo (2), "b - length")
  Expected: 2
  But was:  1

Evidence

  • Confirmed occurrence: build 15214743 (PR [msbuild] Add diagnostic logging for native reference resource resolution (#24564) #26563, MacCatalyst linker suite, T: linker_maccatalyst job), first attempt, 2026-09-04T14:50:02.638Z. Automatically recovered on stage retry (attempt 2 passed).
  • 30-day AzDO Analytics query (test name Pasteboard_ImagesTest, 2026-08-15–2026-09-14): 22 failures out of 5,616 executions (~0.39% failure rate), recurring on multiple dates (08-29, 08-30, 09-01, 09-02, 09-03, 09-04, and 09-09).

Root cause hypothesis

UIPasteboard.General is a shared/global system resource. Parallel or back-to-back test execution can race on its contents, causing Images.Length to read a stale or partial value.

Related prior art

This is the same failure signature previously seen on the sibling test MonoTouchFixtures.UIKit.PasteboardTest.ImagesTest in tests/monotouch-test/UIKit/PasteboardTest.cs:

LinkAll.LinkAllRegressionTest.Pasteboard_ImagesTest does not currently have a [Retry] or [Ignore] attribute, so this mitigation was not applied to this test copy.

Suggested next step

Apply the same mitigation used for the sibling test ([Retry] and/or [Ignore] with a tracking comment), or investigate making pasteboard clear/set operations deterministic per test, such as serializing tests that use the shared pasteboard.


Filed from automated flakiness triage issue 32097719cadb4f4ca8a940ff91c6d6b9, revision 1, after human-review handoff and investigation. No code changes were made.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    testsAnything related to tests

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions