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

System.Diagnostics.Tests.ProcessTests.GetProcessesByName_ProcessName_ReturnsExpected [FAIL] #75329

Closed
MichalStrehovsky opened this issue Sep 9, 2022 · 3 comments · Fixed by #75334
Labels
area-System.Diagnostics.Process blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'

Comments

@MichalStrehovsky
Copy link
Member

Seen in https://github.com/dotnet/runtime/pull/75055/checks?check_run_id=8264228552

C:\h\w\AE220963\w\ADE10980\e>"C:\h\w\AE220963\p\dotnet.exe" exec --runtimeconfig System.Diagnostics.Process.Tests.runtimeconfig.json --depsfile System.Diagnostics.Process.Tests.deps.json xunit.console.dll System.Diagnostics.Process.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing  
  Discovering: System.Diagnostics.Process.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Diagnostics.Process.Tests (found 260 of 283 test cases)
  Starting:    System.Diagnostics.Process.Tests (parallel test collections = on, max threads = 2)
    System.Diagnostics.Tests.ProcessStartInfoTests.ShellExecute_Nano_Fails_Start [SKIP]
      Condition(s) not met: "IsWindowsNanoServer"
    System.Diagnostics.Tests.ProcessTests.NonElevatedUser_QueryProcessNameOfSystemProcess [SKIP]
      Condition(s) not met: "IsWindowsAndNotElevated"
    System.Diagnostics.Tests.ProcessTests.GetProcessesByName_ProcessName_ReturnsExpected [FAIL]
      Assert.All() Failure: 1 out of 2 items in the collection did not pass.
      [1]: Item: System.Diagnostics.Process (dotnet)
           Xunit.Sdk.EqualException: Assert.Equal() Failure
           Expected: 2022-09-09T05:51:41.0956069+00:00
           Actual:   2022-09-09T05:51:54.8911051+00:00
              at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) in /_/src/xunit.assert/Asserts/EqualityAsserts.cs:line 96
              at Xunit.Assert.Equal[T](T expected, T actual) in /_/src/xunit.assert/Asserts/EqualityAsserts.cs:line 63
              at System.Diagnostics.Tests.ProcessTests.<>c__DisplayClass90_0.<GetProcessesByName_ProcessName_ReturnsExpected>b__3(Process process) in /_/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs:line 1251
              at Xunit.Assert.All[T](IEnumerable`1 collection, Action`2 action) in /_/src/xunit.assert/Asserts/CollectionAsserts.cs:line 77
      Stack Trace:
        /_/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs(1251,0): at System.Diagnostics.Tests.ProcessTests.GetProcessesByName_ProcessName_ReturnsExpected()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs(69,0): at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
Invalid number of parameters

There were recent changes around it in #67589.

@MichalStrehovsky MichalStrehovsky added area-System.Diagnostics blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' labels Sep 9, 2022
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Sep 9, 2022
@ghost
Copy link

ghost commented Sep 9, 2022

Tagging subscribers to this area: @tommcdon
See info in area-owners.md if you want to be subscribed.

Issue Details

Seen in https://github.com/dotnet/runtime/pull/75055/checks?check_run_id=8264228552

C:\h\w\AE220963\w\ADE10980\e>"C:\h\w\AE220963\p\dotnet.exe" exec --runtimeconfig System.Diagnostics.Process.Tests.runtimeconfig.json --depsfile System.Diagnostics.Process.Tests.deps.json xunit.console.dll System.Diagnostics.Process.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing  
  Discovering: System.Diagnostics.Process.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Diagnostics.Process.Tests (found 260 of 283 test cases)
  Starting:    System.Diagnostics.Process.Tests (parallel test collections = on, max threads = 2)
    System.Diagnostics.Tests.ProcessStartInfoTests.ShellExecute_Nano_Fails_Start [SKIP]
      Condition(s) not met: "IsWindowsNanoServer"
    System.Diagnostics.Tests.ProcessTests.NonElevatedUser_QueryProcessNameOfSystemProcess [SKIP]
      Condition(s) not met: "IsWindowsAndNotElevated"
    System.Diagnostics.Tests.ProcessTests.GetProcessesByName_ProcessName_ReturnsExpected [FAIL]
      Assert.All() Failure: 1 out of 2 items in the collection did not pass.
      [1]: Item: System.Diagnostics.Process (dotnet)
           Xunit.Sdk.EqualException: Assert.Equal() Failure
           Expected: 2022-09-09T05:51:41.0956069+00:00
           Actual:   2022-09-09T05:51:54.8911051+00:00
              at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) in /_/src/xunit.assert/Asserts/EqualityAsserts.cs:line 96
              at Xunit.Assert.Equal[T](T expected, T actual) in /_/src/xunit.assert/Asserts/EqualityAsserts.cs:line 63
              at System.Diagnostics.Tests.ProcessTests.<>c__DisplayClass90_0.<GetProcessesByName_ProcessName_ReturnsExpected>b__3(Process process) in /_/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs:line 1251
              at Xunit.Assert.All[T](IEnumerable`1 collection, Action`2 action) in /_/src/xunit.assert/Asserts/CollectionAsserts.cs:line 77
      Stack Trace:
        /_/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs(1251,0): at System.Diagnostics.Tests.ProcessTests.GetProcessesByName_ProcessName_ReturnsExpected()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs(69,0): at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
Invalid number of parameters

There were recent changes around it in #67589.

Author: MichalStrehovsky
Assignees: -
Labels:

area-System.Diagnostics, blocking-clean-ci

Milestone: -

@ghost
Copy link

ghost commented Sep 9, 2022

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

Issue Details

Seen in https://github.com/dotnet/runtime/pull/75055/checks?check_run_id=8264228552

C:\h\w\AE220963\w\ADE10980\e>"C:\h\w\AE220963\p\dotnet.exe" exec --runtimeconfig System.Diagnostics.Process.Tests.runtimeconfig.json --depsfile System.Diagnostics.Process.Tests.deps.json xunit.console.dll System.Diagnostics.Process.Tests.dll -xml testResults.xml -nologo -nocolor -notrait category=IgnoreForCI -notrait category=OuterLoop -notrait category=failing  
  Discovering: System.Diagnostics.Process.Tests (method display = ClassAndMethod, method display options = None)
  Discovered:  System.Diagnostics.Process.Tests (found 260 of 283 test cases)
  Starting:    System.Diagnostics.Process.Tests (parallel test collections = on, max threads = 2)
    System.Diagnostics.Tests.ProcessStartInfoTests.ShellExecute_Nano_Fails_Start [SKIP]
      Condition(s) not met: "IsWindowsNanoServer"
    System.Diagnostics.Tests.ProcessTests.NonElevatedUser_QueryProcessNameOfSystemProcess [SKIP]
      Condition(s) not met: "IsWindowsAndNotElevated"
    System.Diagnostics.Tests.ProcessTests.GetProcessesByName_ProcessName_ReturnsExpected [FAIL]
      Assert.All() Failure: 1 out of 2 items in the collection did not pass.
      [1]: Item: System.Diagnostics.Process (dotnet)
           Xunit.Sdk.EqualException: Assert.Equal() Failure
           Expected: 2022-09-09T05:51:41.0956069+00:00
           Actual:   2022-09-09T05:51:54.8911051+00:00
              at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer`1 comparer) in /_/src/xunit.assert/Asserts/EqualityAsserts.cs:line 96
              at Xunit.Assert.Equal[T](T expected, T actual) in /_/src/xunit.assert/Asserts/EqualityAsserts.cs:line 63
              at System.Diagnostics.Tests.ProcessTests.<>c__DisplayClass90_0.<GetProcessesByName_ProcessName_ReturnsExpected>b__3(Process process) in /_/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs:line 1251
              at Xunit.Assert.All[T](IEnumerable`1 collection, Action`2 action) in /_/src/xunit.assert/Asserts/CollectionAsserts.cs:line 77
      Stack Trace:
        /_/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs(1251,0): at System.Diagnostics.Tests.ProcessTests.GetProcessesByName_ProcessName_ReturnsExpected()
           at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
        /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs(69,0): at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
Invalid number of parameters

There were recent changes around it in #67589.

Author: MichalStrehovsky
Assignees: -
Labels:

area-System.Diagnostics, area-System.Diagnostics.Process, blocking-clean-ci, untriaged

Milestone: -

@uweigand
Copy link
Contributor

uweigand commented Sep 9, 2022

I just saw similar errors in a run on s390x-linux:

    System.Diagnostics.Tests.ProcessTests.GetProcessesByName_ProcessName_ReturnsExpected [FAIL]
      Assert.All() Failure: 7 out of 8 items in the collection did not pass.
      [6]: Item: System.Diagnostics.Process (dotnet)
           Xunit.Sdk.EqualException: Assert.Equal() Failure
           Expected: 2022-09-09T12:25:31.3816815+02:00
           Actual:   2022-09-09T11:16:54.3316815+02:00
              at Xunit.Assert.Equal[DateTime](DateTime expected, DateTime actual, IEqualityComparer`1 comparer) in /_/src/xunit.assert/Asserts/EqualityAsserts.cs:line 101
              at Xunit.Assert.Equal[DateTime](DateTime expected, DateTime actual) in /_/src/xunit.assert/Asserts/EqualityAsserts.cs:line 63
              at System.Diagnostics.Tests.ProcessTests.<>c__DisplayClass90_0.<GetProcessesByName_ProcessName_ReturnsExpected>b__3(Process process) in /home/uweigand/runtime/src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs:line 1251
              at Xunit.Assert.<>c__DisplayClass11_0`1[[System.Diagnostics.Process, System.Diagnostics.Process, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a]].<All>b__0(Process item, Int32 index) in /_/src/xunit.assert/Asserts/CollectionAsserts.cs:line 34
              at Xunit.Assert.All[Process](IEnumerable`1 collection, Action`2 action) in /_/src/xunit.assert/Asserts/CollectionAsserts.cs:line 61

What seems to have happened here is that I had some older dotnet processes running on my system (some msbuild compile server jobs that were still around), and it seems to have picked up the start time of those?

After killing those processes and re-running the test, the errors are gone.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Sep 9, 2022
@am11 am11 removed the untriaged New issue has not been triaged by the area owner label Sep 9, 2022
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Sep 9, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Oct 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Diagnostics.Process blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants