From b985ae07d3615bd8f115cb363a8550d6cc6a9dca Mon Sep 17 00:00:00 2001 From: Tomas Weinfurt Date: Mon, 16 Oct 2017 22:25:43 -0700 Subject: [PATCH] revert part of #24098. do not use shell to find KDestroyCmd. --- .../NegotiateStreamTestForUnix.cs | 33 +++++-------------- 1 file changed, 8 insertions(+), 25 deletions(-) diff --git a/src/System.Net.Security/tests/FunctionalTests/NegotiateStreamTestForUnix.cs b/src/System.Net.Security/tests/FunctionalTests/NegotiateStreamTestForUnix.cs index 8522a20c56aa..c97cc821933a 100644 --- a/src/System.Net.Security/tests/FunctionalTests/NegotiateStreamTestForUnix.cs +++ b/src/System.Net.Security/tests/FunctionalTests/NegotiateStreamTestForUnix.cs @@ -73,31 +73,14 @@ public bool CheckAndClearCredentials(ITestOutputHelper output) } // Clear the credentials - try - { - var startInfo = new ProcessStartInfo(KDestroyCmd); - startInfo.UseShellExecute = true; - startInfo.CreateNoWindow = true; - startInfo.Arguments = "-A"; - using (Process clearCreds = Process.Start(startInfo)) - { - clearCreds.WaitForExit(); - output.WriteLine("kdestroy returned {0}", clearCreds.ExitCode); - return (clearCreds.ExitCode == 0); - } - } - catch (Win32Exception) - { - // https://github.com/dotnet/corefx/issues/24000 - // on these distros right now - Assert.True(PlatformDetection.IsUbuntu1704 || - PlatformDetection.IsUbuntu1710 || - PlatformDetection.IsOpenSUSE || - PlatformDetection.IsFedora || - PlatformDetection.IsDebian || - PlatformDetection.IsCentos7); - - return false; + var startInfo = new ProcessStartInfo(KDestroyCmd); + startInfo.CreateNoWindow = true; + startInfo.Arguments = "-A"; + using (Process clearCreds = Process.Start(startInfo)) + { + clearCreds.WaitForExit(); + output.WriteLine("kdestroy returned {0}", clearCreds.ExitCode); + return (clearCreds.ExitCode == 0); } }