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

[iOS/tvOS] System.Diagnostics.Tests.ProcessTests.TestGetProcesses fails on devices #60588

Closed
steveisok opened this issue Oct 18, 2021 · 3 comments

Comments

@steveisok
Copy link
Member

This test fails with:

System.ComponentModel.Win32Exception : Could not get all running Process IDs.

Stack trace
   at Interop.libproc.proc_listallpids()
   at System.Diagnostics.ProcessManager.GetProcessInfos(String machineName)
   at System.Diagnostics.Process.GetProcesses(String machineName)
   at System.Diagnostics.Process.GetProcesses()
   at System.Diagnostics.Tests.ProcessTests.TestGetProcesses()
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)

I suspect we'll need to bring in the headers for proc_listallpids

@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.Diagnostics.Process untriaged New issue has not been triaged by the area owner labels Oct 18, 2021
@steveisok steveisok added os-ios Apple iOS os-tvos Apple tvOS labels Oct 18, 2021
@MaximLipnin
Copy link
Contributor

It might be addressed when #61265 (comment) is done.

@akoeplinger
Copy link
Member

This and the other tests disabled against #60588 on iOS/tvOS can be skipped with SkipOnPlatform since these APIs throw PNSE now.

@akoeplinger akoeplinger added this to the 7.0.0 milestone Nov 16, 2021
@akoeplinger akoeplinger removed the untriaged New issue has not been triaged by the area owner label Nov 16, 2021
MaximLipnin added a commit that referenced this issue Nov 18, 2021
This is a follow up PR for #61590.

It includes:

 - additional UnsupportedOSPlatform annotations for some System.Diagnostics.Process APIs throwing PNSE on iOS/tvOS (they started doing so after excluding some managed logic around librpoc )

 - fixing a bit ugly workaround for CS0649 (see https://github.com/dotnet/runtime/pull/61590/files#r749525127) - used a local pragma in the ThreadInfo class.

 - skipping the respective S.D.P. tests ( it will address [iOS/tvOS] System.Diagnostics.Tests.ProcessTests.TestGetProcesses fails on devices #60588 as well)
@MaximLipnin
Copy link
Contributor

This and the other tests disabled against #60588 on iOS/tvOS can be skipped with SkipOnPlatform since these APIs throw PNSE now.

Addressed in #61670

MaximLipnin added a commit to MaximLipnin/runtime that referenced this issue Dec 1, 2021
This is a follow up PR for dotnet#61590.

It includes:

- additional UnsupportedOSPlatform annotations for some System.Diagnostics.Process APIs throwing PNSE on iOS/tvOS (they started doing so after excluding some managed logic around librpoc )

- fixing a bit ugly workaround for CS0649 (see https://github.com/dotnet/runtime/pull/61590/files#r749525127) - used a local pragma in the ThreadInfo class.

- skipping the respective S.D.P. tests ( it will address [iOS/tvOS] System.Diagnostics.Tests.ProcessTests.TestGetProcesses fails on devices dotnet#60588 as well)
steveisok pushed a commit that referenced this issue Dec 2, 2021
#62235)

* Exclude the managed code around libproc on iOS/tvOS (#61590)

Since libproc is a private Apple API, it is not available on iOS/tvOS and should be excluded (see #61265 (comment) and above for more details).  
This PR excludes $(CommonPath)Interop\OSX\Interop.libproc.cs on the iOS/tvOS as well as makes some methods in Process, ProcessManager, and ProcessThread classes calling that API throw PNSE so that for iOS/tvOS it's possible to re-use the respective *.UnknownUnix.cs parts.

* [iOS] Follow up changes for 61590 (#61670)

This is a follow up PR for #61590.

It includes:

- additional UnsupportedOSPlatform annotations for some System.Diagnostics.Process APIs throwing PNSE on iOS/tvOS (they started doing so after excluding some managed logic around librpoc )

- fixing a bit ugly workaround for CS0649 (see https://github.com/dotnet/runtime/pull/61590/files#r749525127) - used a local pragma in the ThreadInfo class.

- skipping the respective S.D.P. tests ( it will address [iOS/tvOS] System.Diagnostics.Tests.ProcessTests.TestGetProcesses fails on devices #60588 as well)

* Skip System.Diagnostics.TextWriterTraceListenerTests.XmlWriterTraceListenerTests on iOS/tvOS (#61807)

This marks System.Diagnostics.TextWriterTraceListenerTests.XmlWriterTraceListenerTests withSkipOnPlatform attribute for iOS/tvOS as those tests try to create a process info, which throws PNSE after S.D.Process API's around libproc have been excluded in #61590.

* Disable several failing tests on iOSSimulator arm64 #61826

A few tests popped up as failures on the rolling build due to parts of System.Diagnostics.Process throwing PNSE. Disabled the functional tests from running on arm64 as mlaunch can't detect the return code.

* Use separate partials for iOS&tvOS instead of UnknowUnix in System.Diagnostics.Process (#61871)

* Remove NoWarn removal
@ghost ghost locked as resolved and limited conversation to collaborators Dec 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants