Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 22f2831

Browse files
author
Lakshmi Priya Sekar
committed
Fix Process failing tests on OSX.
1 parent 9f89acb commit 22f2831

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

src/Common/src/Interop/OSX/Interop.libproc.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -546,13 +546,11 @@ internal static unsafe rusage_info_v3 proc_pid_rusage(int pid)
546546

547547
// Get the PIDs rusage info
548548
int result = proc_pid_rusage(pid, RUSAGE_SELF, &info);
549-
if (result <= 0)
549+
if (result < 0)
550550
{
551551
throw new Win32Exception(SR.RUsageFailure);
552552
}
553553

554-
Debug.Assert(result == Marshal.SizeOf<rusage_info_v3>());
555-
556554
return info;
557555
}
558556
}

src/System.Diagnostics.Process/tests/System.Diagnostics.Process.Tests/ProcessTest.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,6 @@ public void Process_PrivateMemorySize64()
401401
}
402402

403403
[Fact]
404-
[ActiveIssue(2184, PlatformID.OSX)]
405404
public void Process_ProcessorTime()
406405
{
407406
Assert.True(_process.UserProcessorTime.TotalSeconds >= 0);

0 commit comments

Comments
 (0)