Skip to content

fix: Windows ARM64 test compatibility#6644

Merged
tonistiigi merged 1 commit intomoby:masterfrom
rzlink:fix/windows-arm64-test-compat
Apr 2, 2026
Merged

fix: Windows ARM64 test compatibility#6644
tonistiigi merged 1 commit intomoby:masterfrom
rzlink:fix/windows-arm64-test-compat

Conversation

@rzlink
Copy link
Copy Markdown
Collaborator

@rzlink rzlink commented Apr 1, 2026

Fix three test functions to support Windows ARM64 (nanoserver) environments:

TestRunCacheWithMounts

  • On Windows ARM64, whoami.exe is unavailable in nanoserver. Replace the
    whoami.exe existence check with a marker file approach (Windows-only).
  • Use forward slashes (C:/m1/marker) instead of backslashes for Shlex
    compatibility.
  • Linux code path is preserved unchanged.

TestDockerfileDirs

  • fc /b (File Compare) is unavailable in nanoserver ARM64. Replace with
    findstr /M to verify file content instead.

TestExportLocalForcePlatformSplit

  • Call platforms.Normalize() before comparison. On ARM64,
    platforms.Normalize adds the v8 variant, causing a mismatch
    without normalization.

ARM64 test compatibility fixes:
- TestRunCacheWithMounts: create marker file (Windows-only) instead of
  checking whoami.exe (unavailable in nanoserver ARM64), use forward
  slashes for Shlex compat, preserve Linux code path unchanged
- TestDockerfileDirs: use findstr instead of fc /b (unavailable in nanoserver)
- TestExportLocalForcePlatformSplit: normalize platform before comparison
  (platforms.Normalize adds v8 variant on ARM64)

Signed-off-by: Dawei Wei <davwei@microsoft.com>
@rzlink rzlink force-pushed the fix/windows-arm64-test-compat branch from a99c58b to 0c11cbc Compare April 1, 2026 18:49
@rzlink rzlink marked this pull request as ready for review April 1, 2026 19:25
@rzlink rzlink requested review from crazy-max and tonistiigi April 1, 2026 19:26
@tonistiigi tonistiigi merged commit 5fd357b into moby:master Apr 2, 2026
191 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants