Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
30c3091
Brand release/6.0-maui branch appropriately (#61792)
directhex Nov 24, 2021
af20fce
[mono][interp] Remove hack for nint/nfloat (#62053)
BrzVlad Nov 30, 2021
5e7fb16
Shrink version name due to nuget maximum (#62190)
directhex Dec 1, 2021
6c8d2b0
[release/6.0-maui] Exclude the managed code around libproc on iOS/tvO…
MaximLipnin Dec 2, 2021
3992fc3
Update timeout for sourcebuild (#61436) (#62300)
directhex Dec 2, 2021
2ab2de4
[MonoAOTCompiler] more properties & custom WorkingDirectory (#62849)
github-actions[bot] Dec 16, 2021
6523aa4
Merge branch 'release/6.0-maui' into merge/release/6.0-to-release/6.0…
akoeplinger Dec 20, 2021
d63fcb9
Disable package generation
akoeplinger Dec 20, 2021
37e3ee4
Merge pull request #62850 from dotnet-maestro-bot/merge/release/6.0-t…
jkotas Dec 22, 2021
7636d44
transform sgen_get_descriptor to parallel safe version in job_major_m…
github-actions[bot] Jan 4, 2022
b96f560
Bump SdkBandVersion prop to 6.0.200 (#62787)
steveisok Jan 4, 2022
a66e67b
Bump SdkVersionForWorkloadTesting to use a 200 band SDK (#63450)
steveisok Jan 7, 2022
a9d5ccd
[release/6.0-maui] Add back HAVE_SYS_ZLIB support (#63359)
lambdageek Jan 10, 2022
f36afb1
[release/6.0-maui] Backport MacCatalyst process start support (#62520)
simonrozsival Jan 11, 2022
936a1c1
[automated] Merge branch 'release/6.0' => 'release/6.0-maui' (#63112)
dotnet-maestro-bot Jan 14, 2022
e08fc29
Merge branch 'release/6.0-maui' into merge/release/6.0-to-release/6.0…
akoeplinger Jan 17, 2022
1ea69f9
Merge pull request #63807 from dotnet-maestro-bot/merge/release/6.0-t…
akoeplinger Jan 17, 2022
a54012e
[release/6.0-maui] Serialize SendPacketsAsync tests (#63896)
github-actions[bot] Jan 18, 2022
ffa6594
[release/6.0-maui] [Android] Prevent potential out of bounds write on…
github-actions[bot] Jan 18, 2022
994a341
[release/6.0-maui] [debugger] Fix reading a byte without checking the…
thaystg Jan 18, 2022
063054b
[release/6.0-maui] [mono][debugger] Fix step on ios when using interp…
github-actions[bot] Jan 18, 2022
fd2cdbb
[iOS/tvOS] Remove P/Invokes to libproc from System.Private.CoreLib (#…
akoeplinger Jan 18, 2022
49d6db3
[release/6.0-maui] [Android] Fix accessing network interfaces informa…
simonrozsival Jan 18, 2022
4f567e5
Take MacCatalyst into account in EnvironmentTests.WorkingSet_Valid te…
github-actions[bot] Jan 19, 2022
6371525
[release/6.0-maui] Android remove backward timezones (#64228)
github-actions[bot] Jan 24, 2022
059caa2
Merge pull request #64056 from dotnet-maestro-bot/merge/release/6.0-t…
akoeplinger Jan 25, 2022
9e82981
[release/6.0-maui][mono] Recognize new names for Xamarin.iOS etc asse…
akoeplinger Jan 26, 2022
2405c8e
Revert branch specific changes
safern Jan 26, 2022
e7920eb
Merge branch 'release/6.0' into merge-maui-branch-to-6.0
akoeplinger Feb 3, 2022
7ba7eae
Merge remote-tracking branch 'upstream/release/6.0' into merge-maui-b…
akoeplinger Feb 7, 2022
0f45149
Add the ability to generate Mono toolchain manifests per sdk band. 1…
Feb 8, 2022
bdc58e1
Merge remote-tracking branch 'upstream/release/6.0' into merge-maui-b…
Feb 8, 2022
da2f120
Remove unnecessary SdkBandVersion prop
Feb 8, 2022
0dead8c
Revert removing SdkBandVersion change. Wasm tests still need it
Feb 8, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[release/6.0-maui] Exclude the managed code around libproc on iOS/tvOS (
#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
  • Loading branch information
MaximLipnin authored Dec 2, 2021
commit 6c8d2b0496ff2287e2dfee16db8f590dd4435c9f
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ public Process() { }
public System.DateTime StartTime { get { throw null; } }
public System.ComponentModel.ISynchronizeInvoke? SynchronizingObject { get { throw null; } set { } }
public System.Diagnostics.ProcessThreadCollection Threads { get { throw null; } }
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
public System.TimeSpan TotalProcessorTime { get { throw null; } }
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
public System.TimeSpan UserProcessorTime { get { throw null; } }
[System.ObsoleteAttribute("Process.VirtualMemorySize has been deprecated because the type of the property can't represent all valid results. Use System.Diagnostics.Process.VirtualMemorySize64 instead.")]
public int VirtualMemorySize { get { throw null; } }
Expand All @@ -106,9 +110,17 @@ public static void EnterDebugMode() { }
public static System.Diagnostics.Process GetCurrentProcess() { throw null; }
public static System.Diagnostics.Process GetProcessById(int processId) { throw null; }
public static System.Diagnostics.Process GetProcessById(int processId, string machineName) { throw null; }
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
public static System.Diagnostics.Process[] GetProcesses() { throw null; }
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
public static System.Diagnostics.Process[] GetProcesses(string machineName) { throw null; }
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
public static System.Diagnostics.Process[] GetProcessesByName(string? processName) { throw null; }
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
public static System.Diagnostics.Process[] GetProcessesByName(string? processName, string machineName) { throw null; }
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
Expand Down Expand Up @@ -233,6 +245,8 @@ internal ProcessThread() { }
public int IdealProcessor { set { } }
public bool PriorityBoostEnabled { get { throw null; } set { } }
public System.Diagnostics.ThreadPriorityLevel PriorityLevel { [System.Runtime.Versioning.SupportedOSPlatform("windows")] [System.Runtime.Versioning.SupportedOSPlatform("linux")] [System.Runtime.Versioning.SupportedOSPlatform("freebsd")] get { throw null; } [System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")] set { } }
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
public System.TimeSpan PrivilegedProcessorTime { get { throw null; } }
[System.Runtime.Versioning.SupportedOSPlatformAttribute("windows")]
public System.IntPtr ProcessorAffinity { set { } }
Expand All @@ -241,7 +255,11 @@ public System.IntPtr ProcessorAffinity { set { } }
[System.Runtime.Versioning.SupportedOSPlatform("linux")]
public System.DateTime StartTime { get { throw null; } }
public System.Diagnostics.ThreadState ThreadState { get { throw null; } }
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
public System.TimeSpan TotalProcessorTime { get { throw null; } }
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("ios")]
[System.Runtime.Versioning.UnsupportedOSPlatformAttribute("tvos")]
public System.TimeSpan UserProcessorTime { get { throw null; } }
public System.Diagnostics.ThreadWaitReason WaitReason { get { throw null; } }
public void ResetIdealProcessor() { }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@
<Compile Include="$(CommonPath)Interop\Unix\System.Native\Interop.SchedGetSetAffinity.cs"
Link="Common\Interop\Linux\Interop.SchedGetSetAffinity.cs" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetsOSX)' == 'true' or '$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">
<ItemGroup Condition=" '$(TargetsOSX)' == 'true'">
<Compile Include="System\Diagnostics\Process.BSD.cs" />
<Compile Include="System\Diagnostics\Process.OSX.cs" />
<Compile Include="System\Diagnostics\ProcessManager.BSD.cs" />
Expand All @@ -329,7 +329,7 @@
<Compile Include="System\Diagnostics\ProcessManager.Win32.cs" />
<Compile Include="System\Diagnostics\ProcessStartInfo.Win32.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsAnyOS)' != 'true'">
<ItemGroup Condition="'$(TargetsAnyOS)' != 'true' and '$(TargetsiOS)' != 'true' and '$(TargetstvOS)' != 'true'">
<Compile Include="System\Diagnostics\Process.NonUap.cs" />
</ItemGroup>
<ItemGroup Condition=" '$(TargetsFreeBSD)' == 'true'">
Expand All @@ -345,6 +345,11 @@
<Compile Include="$(CommonPath)Interop\FreeBSD\Interop.Process.GetProcInfo.cs"
Link="Common\Interop\FreeBSD\Interop.Process.GetProcInfo.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsiOS)' == 'true' or '$(TargetstvOS)' == 'true'">
<Compile Include="System\Diagnostics\Process.iOS.cs" />
<Compile Include="System\Diagnostics\ProcessManager.iOS.cs" />
<Compile Include="System\Diagnostics\ProcessThread.iOS.cs" />
</ItemGroup>
<ItemGroup Condition="'$(TargetsUnknownUnix)' == 'true'">
<Compile Include="System\Diagnostics\Process.UnknownUnix.cs" />
<Compile Include="System\Diagnostics\ProcessManager.UnknownUnix.cs" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.Versioning;

namespace System.Diagnostics
{
Expand All @@ -12,6 +13,8 @@ public partial class Process
/// Creates an array of <see cref="Process"/> components that are associated with process resources on a
/// remote computer. These process resources share the specified process name.
/// </summary>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public static Process[] GetProcessesByName(string? processName, string machineName)
{
if (processName == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.ComponentModel;
using System.Globalization;
using System.IO;
using System.Runtime.Versioning;
using System.Text;

namespace System.Diagnostics
Expand All @@ -17,6 +18,8 @@ public partial class Process : IDisposable
/// Creates an array of <see cref="Process"/> components that are associated with process resources on a
/// remote computer. These process resources share the specified process name.
/// </summary>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public static Process[] GetProcessesByName(string? processName, string machineName)
{
ProcessManager.ThrowIfRemoteMachine(machineName);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public partial class Process : IDisposable
/// Creates an array of <see cref="Process"/> components that are associated with process resources on a
/// remote computer. These process resources share the specified process name.
/// </summary>
public static Process[] GetProcessesByName(string processName, string machineName)
public static Process[] GetProcessesByName(string? processName, string machineName)
{
throw new PlatformNotSupportedException();
}
Expand Down Expand Up @@ -82,5 +82,6 @@ private string GetPathToOpenFile()
throw new PlatformNotSupportedException();
}

private int ParentProcessId => throw new PlatformNotSupportedException();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public partial class Process : IDisposable
/// Creates an array of <see cref="Process"/> components that are associated with process resources on a
/// remote computer. These process resources share the specified process name.
/// </summary>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public static Process[] GetProcessesByName(string? processName, string machineName)
{
if (processName == null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ public bool HasExited
}

/// <summary>Gets the time the associated process was started.</summary>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public DateTime StartTime
{
get
Expand Down Expand Up @@ -1039,6 +1041,8 @@ public static Process GetProcessById(int processId)
/// local computer. These process resources share the specified process name.
/// </para>
/// </devdoc>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public static Process[] GetProcessesByName(string? processName)
{
return GetProcessesByName(processName, ".");
Expand All @@ -1050,6 +1054,8 @@ public static Process[] GetProcessesByName(string? processName)
/// component for each process resource on the local computer.
/// </para>
/// </devdoc>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public static Process[] GetProcesses()
{
return GetProcesses(".");
Expand All @@ -1062,6 +1068,8 @@ public static Process[] GetProcesses()
/// process resource on the specified computer.
/// </para>
/// </devdoc>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public static Process[] GetProcesses(string machineName)
{
bool isRemoteMachine = ProcessManager.IsRemoteMachine(machineName);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,122 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Collections.Generic;
using System.ComponentModel;
using System.Runtime.Versioning;

namespace System.Diagnostics
{
public partial class Process : IDisposable
{
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public void Kill(bool entireProcessTree)
{
throw new PlatformNotSupportedException();
}

/// <summary>
/// Creates an array of <see cref="Process"/> components that are associated with process resources on a
/// remote computer. These process resources share the specified process name.
/// </summary>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public static Process[] GetProcessesByName(string? processName, string machineName)
{
throw new PlatformNotSupportedException();
}

/// <summary>Gets the amount of time the process has spent running code inside the operating system core.</summary>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public TimeSpan PrivilegedProcessorTime
{
get { throw new PlatformNotSupportedException(); }
}

/// <summary>Gets the time the associated process was started.</summary>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
internal DateTime StartTimeCore
{
get { throw new PlatformNotSupportedException(); }
}

/// <summary>
/// Gets the amount of time the associated process has spent utilizing the CPU.
/// It is the sum of the <see cref='System.Diagnostics.Process.UserProcessorTime'/> and
/// <see cref='System.Diagnostics.Process.PrivilegedProcessorTime'/>.
/// </summary>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public TimeSpan TotalProcessorTime
{
get { throw new PlatformNotSupportedException(); }
}

/// <summary>
/// Gets the amount of time the associated process has spent running code
/// inside the application portion of the process (not the operating system core).
/// </summary>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public TimeSpan UserProcessorTime
{
get { throw new PlatformNotSupportedException(); }
}

/// <summary>
/// Returns all immediate child processes.
/// </summary>
private IReadOnlyList<Process> GetChildProcesses(Process[]? processes = null)
{
throw new PlatformNotSupportedException();
}

/// <summary>Gets parent process ID</summary>
private int GetParentProcessId =>
throw new PlatformNotSupportedException();

/// <summary>
/// Gets or sets which processors the threads in this process can be scheduled to run on.
/// </summary>
private IntPtr ProcessorAffinityCore
{
get { throw new PlatformNotSupportedException(); }
set { throw new PlatformNotSupportedException(); }
}

/// <summary>
/// Make sure we have obtained the min and max working set limits.
/// </summary>
private void GetWorkingSetLimits(out IntPtr minWorkingSet, out IntPtr maxWorkingSet)
{
throw new PlatformNotSupportedException();
}

/// <summary>Sets one or both of the minimum and maximum working set limits.</summary>
/// <param name="newMin">The new minimum working set limit, or null not to change it.</param>
/// <param name="newMax">The new maximum working set limit, or null not to change it.</param>
/// <param name="resultingMin">The resulting minimum working set limit after any changes applied.</param>
/// <param name="resultingMax">The resulting maximum working set limit after any changes applied.</param>
private void SetWorkingSetLimitsCore(IntPtr? newMin, IntPtr? newMax, out IntPtr resultingMin, out IntPtr resultingMax)
{
throw new PlatformNotSupportedException();
}

/// <summary>Gets execution path</summary>
private string GetPathToOpenFile()
{
throw new PlatformNotSupportedException();
}

private int ParentProcessId => throw new PlatformNotSupportedException();

private static bool IsProcessInvalidException(Exception e) =>
// InvalidOperationException signifies conditions such as the process already being dead.
// Win32Exception signifies issues such as insufficient permissions to get details on the process.
// In either case, the predicate couldn't be applied so return the fallback result.
e is InvalidOperationException || e is Win32Exception;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using Microsoft.Win32.SafeHandles;
using System.Collections.Generic;
using System.Runtime.Versioning;
using System.Text;

namespace System.Diagnostics
Expand Down Expand Up @@ -44,6 +45,8 @@ public static bool IsProcessRunning(int processId)
/// <summary>Gets the IDs of all processes on the specified machine.</summary>
/// <param name="machineName">The machine to examine.</param>
/// <returns>An array of process IDs from the specified machine.</returns>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public static int[] GetProcessIds(string machineName)
{
ThrowIfRemoteMachine(machineName);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.

using System.Runtime.Versioning;

namespace System.Diagnostics
{
internal static partial class ProcessManager
{
/// <summary>Gets the IDs of all processes on the current machine.</summary>
public static int[] GetProcessIds()
{
throw new PlatformNotSupportedException();
}

/// <summary>Gets process infos for each process on the specified machine.</summary>
/// <param name="machineName">The target machine.</param>
/// <returns>An array of process infos, one per found process.</returns>
[UnsupportedOSPlatform("ios")]
[UnsupportedOSPlatform("tvos")]
public static ProcessInfo[] GetProcessInfos(string machineName)
{
throw new PlatformNotSupportedException();
}

/// <summary>Gets an array of module infos for the specified process.</summary>
/// <param name="processId">The ID of the process whose modules should be enumerated.</param>
/// <returns>The array of modules.</returns>
internal static ProcessModuleCollection GetModules(int processId)
{
return new ProcessModuleCollection(0);
}

private static ProcessInfo CreateProcessInfo(int pid)
{
throw new PlatformNotSupportedException();
}
}
}
Loading