diff --git a/src/libraries/System.Diagnostics.Process/tests/ProcessTests.Unix.cs b/src/libraries/System.Diagnostics.Process/tests/ProcessTests.Unix.cs index 99272c05f0c2e3..59a24f55a0fd39 100644 --- a/src/libraries/System.Diagnostics.Process/tests/ProcessTests.Unix.cs +++ b/src/libraries/System.Diagnostics.Process/tests/ProcessTests.Unix.cs @@ -541,8 +541,7 @@ private static int CheckUserAndGroupIds(string userId, string groupId, string gr } [ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))] - [ActiveIssue("https://github.com/dotnet/runtime/issues/28922", TestPlatforms.AnyUnix)] - public unsafe void TestCheckChildProcessUserAndGroupIds() + public void TestCheckChildProcessUserAndGroupIds() { string userName = GetCurrentRealUserName(); string userId = GetUserId(userName); @@ -923,7 +922,11 @@ private static unsafe HashSet GetGroups() } // Return this as a HashSet to filter out duplicates. - return new HashSet(groups.Slice(0, rv).ToArray()); + var result = new HashSet(groups.Slice(0, rv).ToArray()); + // according to https://man7.org/linux/man-pages/man2/getgroups.2.html it's not specified + // if this group is included in the list returned by getgroups + result.Add(getegid()); + return result; } }