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

[9.0] Process test expecting sleep but shows .NET long running process #111431

Open
carlossanlop opened this issue Jan 14, 2025 · 2 comments
Open
Labels
arch-x64 area-System.Diagnostics.Process Known Build Error Use this to report build issues in the .NET Helix tab os-linux Linux OS (any supported distro) runtime-coreclr specific to the CoreCLR runtime
Milestone

Comments

@carlossanlop
Copy link
Member

carlossanlop commented Jan 14, 2025

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=916912
Build error leg or test failing: net9.0-linux-Release-x64-coreclr_checked-Ubuntu.2204.Amd64.Open

Error Message

{
  "ErrorMessage" : ["Expected:", "sleep", ".NET Long Runni"],
  "BuildRetry" : true,
  "ExcludeConsoleLog" : false
}
    System.Diagnostics.Tests.ProcessTests.ProcessStart_OnLinux_UsesSpecifiedProgram [FAIL]
      Assert.Equal() Failure: Strings differ
                 ↓ (pos 0)
      Expected: "sleep"
      Actual:   ".NET Long Runni"
                 ↑ (pos 0)
      Stack Trace:
        /_/src/libraries/System.Diagnostics.Process/tests/ProcessTests.Unix.cs(354,0): at System.Diagnostics.Tests.ProcessTests.ProcessStart_OnLinux_UsesSpecifiedProgram()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodBaseInvoker.cs(57,0): at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=916912
Error message validated: [Expected: sleep .NET Long Runni]
Result validation: ❌ Known issue did not match with the provided build.
Validation performed at: 1/14/2025 6:55:20 PM UTC

Report

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 0 0
@carlossanlop carlossanlop added arch-x64 area-System.Diagnostics.Process Known Build Error Use this to report build issues in the .NET Helix tab os-linux Linux OS (any supported distro) runtime-coreclr specific to the CoreCLR runtime labels Jan 14, 2025
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jan 14, 2025
Copy link
Contributor

Tagging subscribers to this area: @dotnet/area-system-diagnostics-process
See info in area-owners.md if you want to be subscribed.

@adamsitnik
Copy link
Member

I've taken a look at the test implementation and I can't see any reason why it would fail like this (sleep is a native Linux utility, not a .NET command line tool).

[Fact]
[PlatformSpecific(TestPlatforms.Linux)]
public void ProcessStart_OnLinux_UsesSpecifiedProgram()
{
const string Program = "sleep";
using (var px = Process.Start(Program, "60"))
{
try
{
Assert.Equal(Program, px.ProcessName);
}
finally
{
px.Kill();
px.WaitForExit();
}
Assert.True(px.HasExited);
}
}

For now I am going to move it to Future. If it starts failing more often we can invest more time into that.

@adamsitnik adamsitnik added this to the Future milestone Jan 15, 2025
@adamsitnik adamsitnik removed the untriaged New issue has not been triaged by the area owner label Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch-x64 area-System.Diagnostics.Process Known Build Error Use this to report build issues in the .NET Helix tab os-linux Linux OS (any supported distro) runtime-coreclr specific to the CoreCLR runtime
Projects
None yet
Development

No branches or pull requests

2 participants