Skip to content

[Bug]: FileMatcherTest.Unc test fails on macOS #10716

Open

Description

@jrdodds

Issue Description

When I build locally and run tests on macOS 14 on ARM and macOS 13 on Intel, the Microsoft.Build.UnitTests.FileMatcherTest.Unc test fails.

Steps to Reproduce

After confirming local repo is up to date:

  1. Run ./build.sh
  2. Run ./build.sh --test

Expected Behavior

All tests should pass.

Actual Behavior

The Microsoft.Build.UnitTests.FileMatcherTest.Unc test fails:

Failed tests
Microsoft.Build.UnitTests.FileMatcherTest.Unc
Assert.Equal() Failure: Values differ\nExpected: 1\nActual:   0
   at Microsoft.Build.UnitTests.FileMatcherTest.MatchDriver(String filespec, String[] excludeFilespecs, String[] matchingFiles, String[] nonmatchingFiles, String[] untouchableFiles, Boolean normalizeAllPaths, Boolean normalizeExpectedMatchingFiles) in /Users/jrdodds/Projects/jrdodds/msbuild/src/Shared/UnitTests/FileMatcher_Tests.cs:line 2426
   at Microsoft.Build.UnitTests.FileMatcherTest.MatchDriver(String filespec, String[] matchingFiles, String[] nonmatchingFiles, String[] untouchableFiles) in /Users/jrdodds/Projects/jrdodds/msbuild/src/Shared/UnitTests/FileMatcher_Tests.cs:line 2362
   at Microsoft.Build.UnitTests.FileMatcherTest.ValidateFileMatch(String filespec, String fileToMatch, Boolean shouldBeRecursive, Boolean fileSystemSimulation) in /Users/jrdodds/Projects/jrdodds/msbuild/src/Shared/UnitTests/FileMatcher_Tests.cs:line 2533
   at Microsoft.Build.UnitTests.FileMatcherTest.ValidateFileMatch(String filespec, String fileToMatch, Boolean shouldBeRecursive) in /Users/jrdodds/Projects/jrdodds/msbuild/src/Shared/UnitTests/FileMatcher_Tests.cs:line 2512
   at Microsoft.Build.UnitTests.FileMatcherTest.Unc() in /Users/jrdodds/Projects/jrdodds/msbuild/src/Shared/UnitTests/FileMatcher_Tests.cs:line 1114
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

The following files are attached in a .zip file.

  • Microsoft.Build.Engine.UnitTests_net9.0_x64.html
  • Microsoft.Build.Engine.UnitTests_net9.0_x64.xml

Build.Engine.UnitTests_net9.0_x64.zip

Analysis

I successfully ran the tests on August 5, 2024 so it would seem that something changed after that point.

Versions & Configurations

macOS Sonoma 14.6.1
Apple M1 Pro (ARM)

macOS Ventura 13.6.9
Intel Core i7

Activity

  1. JanProvaznik commented on Apr 28, 2025

    @JanProvaznik
    Member

    there is also a possibility that macos started behaving differently during this time, in our ADO ci this works, but locally we repro that it doesn't, nor does it in a testing CI on github.

    GPT suggested that it could be due to the apple filesystem config (low confidence on my side)

  2. surayya-MS commented on Apr 28, 2025

    @surayya-MS
    Member

    I tried to run this test on Apple M2 Pro macOs 15.4.1 and it fails. Stating the investigation.

  3. surayya-MS commented on May 2, 2025

    @surayya-MS
    Member

    The test passes in Test Explorer in Visual Studio Code. But it fails when I run dotnet test --filter "FullyQualifiedName=Microsoft.Build.UnitTests.FileMatcherTest.Unc". I will investigate further

  4. jrdodds commented on May 4, 2025

    @jrdodds
    ContributorAuthor

    there is also a possibility that [macOS] started behaving differently during this time

    If it's true that macOS behavior changed, then both macOS 13 and macOS 14 changed. That would suggest something in the August 7, 2024 security updates macOS Ventura 13.6.9 and macOS Sonoma 14.6.1 and/or the September 16, 2024 security updates macOS Ventura 13.7 and macOS Sonoma 14.7.

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

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions