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

Annotate System.Diagnostics.Process.MaxWorkingSet/MinWorkingSet props as unsupported on iOS/tvOS #52395

Conversation

MaximLipnin
Copy link
Contributor

Part of #47910

System.Diagnostics.Process.MaxWorkingSet/MinWorkingSet properties throw PNSE on iOS/tvOS.
As an example, the test failure below:

      <test name="System.Diagnostics.Tests.ProcessTests.MaxWorkingSet_GetNotStarted_ThrowsInvalidOperationException" type="System.Diagnostics.Tests.ProcessTests" method="MaxWorkingSet_GetNotStarted_ThrowsInvalidOperationException" time="0.0027397" result="Fail">
        <failure exception-type="Xunit.Sdk.ThrowsException">
          <message><![CDATA[Assert.Throws() Failure\nExpected: typeof(System.InvalidOperationException)\nActual:   typeof(System.PlatformNotSupportedException): Getting or setting the working set limits on other processes is not supported on this platform.\n---- System.PlatformNotSupportedException : Getting or setting the working set limits on other processes is not supported on this platform.]]></message>
          <stack-trace><![CDATA[   at System.Diagnostics.Process.GetWorkingSetLimits(IntPtr& minWorkingSet, IntPtr& maxWorkingSet) in System.Diagnostics.Process.dll:token 0x600011f+0x12
   at System.Diagnostics.Process.EnsureWorkingSetLimits() in System.Diagnostics.Process.dll:token 0x60000cf+0x8
   at System.Diagnostics.Process.get_MaxWorkingSet() in System.Diagnostics.Process.dll:token 0x600009b+0x0
   at System.Diagnostics.Tests.ProcessTests.<>c__DisplayClass30_0.<MaxWorkingSet_GetNotStarted_ThrowsInvalidOperationException>b__0() in System.Diagnostics.Process.Tests.dll:token 0x60002f8+0x0
----- Inner Stack Trace -----
   at System.Diagnostics.Process.GetWorkingSetLimits(IntPtr& minWorkingSet, IntPtr& maxWorkingSet) in System.Diagnostics.Process.dll:token 0x600011f+0x12
   at System.Diagnostics.Process.EnsureWorkingSetLimits() in System.Diagnostics.Process.dll:token 0x60000cf+0x8
   at System.Diagnostics.Process.get_MaxWorkingSet() in System.Diagnostics.Process.dll:token 0x600009b+0x0
   at System.Diagnostics.Tests.ProcessTests.<>c__DisplayClass30_0.<MaxWorkingSet_GetNotStarted_ThrowsInvalidOperationException>b__0() in System.Diagnostics.Process.Tests.dll:token 0x60002f8+0x0]]></stack-trace>
        </failure>
      </test>

@dotnet-issue-labeler
Copy link

Note regarding the new-api-needs-documentation label:

This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change.

@ghost
Copy link

ghost commented May 6, 2021

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

Issue Details

Part of #47910

System.Diagnostics.Process.MaxWorkingSet/MinWorkingSet properties throw PNSE on iOS/tvOS.
As an example, the test failure below:

      <test name="System.Diagnostics.Tests.ProcessTests.MaxWorkingSet_GetNotStarted_ThrowsInvalidOperationException" type="System.Diagnostics.Tests.ProcessTests" method="MaxWorkingSet_GetNotStarted_ThrowsInvalidOperationException" time="0.0027397" result="Fail">
        <failure exception-type="Xunit.Sdk.ThrowsException">
          <message><![CDATA[Assert.Throws() Failure\nExpected: typeof(System.InvalidOperationException)\nActual:   typeof(System.PlatformNotSupportedException): Getting or setting the working set limits on other processes is not supported on this platform.\n---- System.PlatformNotSupportedException : Getting or setting the working set limits on other processes is not supported on this platform.]]></message>
          <stack-trace><![CDATA[   at System.Diagnostics.Process.GetWorkingSetLimits(IntPtr& minWorkingSet, IntPtr& maxWorkingSet) in System.Diagnostics.Process.dll:token 0x600011f+0x12
   at System.Diagnostics.Process.EnsureWorkingSetLimits() in System.Diagnostics.Process.dll:token 0x60000cf+0x8
   at System.Diagnostics.Process.get_MaxWorkingSet() in System.Diagnostics.Process.dll:token 0x600009b+0x0
   at System.Diagnostics.Tests.ProcessTests.<>c__DisplayClass30_0.<MaxWorkingSet_GetNotStarted_ThrowsInvalidOperationException>b__0() in System.Diagnostics.Process.Tests.dll:token 0x60002f8+0x0
----- Inner Stack Trace -----
   at System.Diagnostics.Process.GetWorkingSetLimits(IntPtr& minWorkingSet, IntPtr& maxWorkingSet) in System.Diagnostics.Process.dll:token 0x600011f+0x12
   at System.Diagnostics.Process.EnsureWorkingSetLimits() in System.Diagnostics.Process.dll:token 0x60000cf+0x8
   at System.Diagnostics.Process.get_MaxWorkingSet() in System.Diagnostics.Process.dll:token 0x600009b+0x0
   at System.Diagnostics.Tests.ProcessTests.<>c__DisplayClass30_0.<MaxWorkingSet_GetNotStarted_ThrowsInvalidOperationException>b__0() in System.Diagnostics.Process.Tests.dll:token 0x60002f8+0x0]]></stack-trace>
        </failure>
      </test>
Author: MaximLipnin
Assignees: -
Labels:

area-System.Diagnostics.Process, new-api-needs-documentation

Milestone: -

@marek-safar marek-safar merged commit 835f7c9 into dotnet:main May 10, 2021
@MaximLipnin MaximLipnin deleted the annotate_System.Diagnostics.Process_as_unsupported branch May 11, 2021 06:55
@karelz karelz added this to the 6.0.0 milestone May 20, 2021
@ghost ghost locked as resolved and limited conversation to collaborators Jun 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants