Skip to content
Closed
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
22 changes: 5 additions & 17 deletions src/libraries/System.Diagnostics.Process/tests/ProcessTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2269,23 +2269,11 @@ public void TestLongProcessIsWorking()
[ActiveIssue("https://github.com/dotnet/runtime/issues/53095", TestPlatforms.Android)]
public void LongProcessNamesAreSupported()
{
string sleepPath;
if (OperatingSystem.IsLinux())
{
// On some distros sleep is implemented using a script/symlink, which causes this test to fail.
// Instead of using sleep directly, we wrap it with a script.
sleepPath = GetTestFilePath();
File.WriteAllText(sleepPath, $"#!/bin/sh\nsleep 600\n"); // sleep 10 min.
File.SetUnixFileMode(sleepPath, ExecutablePermissions);
}
else
{
sleepPath = GetProgramPath("sleep");
if (sleepPath == null)
{
return;
}
}
// On some distros sleep is implemented using a script/symlink.
// Instead of using sleep binary directly, we wrap it with a script.
string sleepPath = GetTestFilePath();
File.WriteAllText(sleepPath, $"#!/bin/sh\nsleep 600\n"); // sleep 10 min.
File.SetUnixFileMode(sleepPath, ExecutablePermissions);

const string LongProcessName = "123456789012345678901234567890";
string sleepCommandPathFileName = Path.Combine(TestDirectory, LongProcessName);
Expand Down
Loading