Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Microsoft.DotNet.RemoteExecutor;
using Microsoft.DotNet.XUnitExtensions;
using Microsoft.Win32.SafeHandles;
using Xunit;

namespace System.Diagnostics.Tests
{
public partial class ProcessHandlesTests
{
[Fact]
[ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))]
public void ProcessStartedWithInvalidHandles_ConsoleReportsInvalidHandles()
{
using Process process = CreateProcess(() =>
Expand All @@ -30,7 +31,7 @@ public void ProcessStartedWithInvalidHandles_ConsoleReportsInvalidHandles()
Assert.Equal(RemoteExecutor.SuccessExitCode, RunWithInvalidHandles(process.StartInfo));
}

[Theory]
[ConditionalTheory(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))]
[InlineData(false)]
[InlineData(true)]
public void ProcessStartedWithInvalidHandles_CanStartChildProcessWithDerivedInvalidHandles(bool restrictHandles)
Expand Down Expand Up @@ -64,7 +65,7 @@ public void ProcessStartedWithInvalidHandles_CanStartChildProcessWithDerivedInva
Assert.Equal(RemoteExecutor.SuccessExitCode, RunWithInvalidHandles(process.StartInfo));
}

[Theory]
[ConditionalTheory(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))]
[InlineData(false)]
[InlineData(true)]
public void ProcessStartedWithInvalidHandles_CanRedirectOutput(bool restrictHandles)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1445,7 +1445,7 @@ public void StartInfo_LoadUserProfile_And_UseCredentialsForNetworkingOnly_AreInc
});
}

[Fact]
[ConditionalFact(typeof(RemoteExecutor), nameof(RemoteExecutor.IsSupported))]
public void UserNameCantBeCombinedWithInheritedHandles()
{
using Process longRunning = CreateProcessLong();
Expand Down
Loading