Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EndToEndMinimumMessageImportance test is not parallel-safe #11576

Open
rainersigwald opened this issue Mar 11, 2025 · 0 comments
Open

EndToEndMinimumMessageImportance test is not parallel-safe #11576

rainersigwald opened this issue Mar 11, 2025 · 0 comments
Labels
Area: Our Own Build Problems affecting the build or build infrastructure of the MSBuild repo itself. Area: Tests flaky-test Tests that have failed but passed on rerun. triaged

Comments

@rainersigwald
Copy link
Member

Just got this running locally:

 Microsoft.Build.UnitTests.XMakeAppTests.EndToEndMinimumMessageImportance(arguments: \"/v:minimal /bl\", expectedMinimumMessageImportance: Low)
Shouldly.ShouldAssertException : success\r\n    should be\r\nTrue\r\n    but was\r\nFalse
   at Microsoft.Build.UnitTests.XMakeAppTests.EndToEndMinimumMessageImportance(String arguments, MessageImportance expectedMinimumMessageImportance) in S:\work\msb2\src\MSBuild.UnitTests\XMake_Tests.cs:line 2716
   at InvokeStub_XMakeAppTests.EndToEndMinimumMessageImportance(Object, Span`1)
   at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
Output:
Executing [S:\work\msb2\.dotnet\dotnet.exe "S:\work\msb2\artifacts\bin\Microsoft.Build.CommandLine.UnitTests\Debug\net9.0\MSBuild.dll" /v:minimal /bl "C:\Users\raines\AppData\Local\Temp\btgp5ego.d4g\MSBuildTemp\Temporarya7239f161e43492e9ba72f00f64c9656\build.proj"]
==== OUTPUT ====
MSBuild version 17.14.0-dev-25161-01+0427e8589 for .NET
MSBUILD : Logger error MSB4104: Failed to write to log file "S:\work\msb2\artifacts\bin\Microsoft.Build.CommandLine.UnitTests\Debug\net9.0\msbuild.binlog". The process cannot access the file 'S:\work\msb2\artifacts\bin\Microsoft.Build.CommandLine.UnitTests\Debug\net9.0\msbuild.binlog' because it is being used by another process.
System.IO.IOException: The process cannot access the file 'S:\work\msb2\artifacts\bin\Microsoft.Build.CommandLine.UnitTests\Debug\net9.0\msbuild.binlog' because it is being used by another process.
   at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
   at Microsoft.Win32.SafeHandles.SafeFileHandle.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.OSFileStreamStrategy..ctor(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.Strategies.FileStreamHelpers.ChooseStrategyCore(String path, FileMode mode, FileAccess access, FileShare share, FileOptions options, Int64 preallocationSize, Nullable`1 unixCreateMode)
   at System.IO.FileStream..ctor(String path, FileMode mode)
   at Microsoft.Build.Logging.BinaryLogger.Initialize(IEventSource eventSource) in S:\work\msb2\src\Build\Logging\BinaryLogger\BinaryLogger.cs:line 198
Process ID is 96764

==============

Looks like we sometimes run different commands that have -bl in them from the same working directory. We should specify a path for the binlog that is defined by the test environment so it doesn't conflict.

@rainersigwald rainersigwald added Area: Our Own Build Problems affecting the build or build infrastructure of the MSBuild repo itself. Area: Tests flaky-test Tests that have failed but passed on rerun. triaged labels Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Our Own Build Problems affecting the build or build infrastructure of the MSBuild repo itself. Area: Tests flaky-test Tests that have failed but passed on rerun. triaged
Projects
None yet
Development

No branches or pull requests

1 participant