Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
Merged
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 @@ -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);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no longer necessary?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure @stephentoub I was hoping that dotnet-bot would tell me. Since all this was introduced at the same time, I'm assuming that root cause is same e.g. we broke process.Start with shell flag.


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);
}
}

Expand Down