Skip to content

Commit

Permalink
dotnet#51371 removed from Pipestream the change and edited path in Fi…
Browse files Browse the repository at this point in the history
…leCleanupTestBase.cs
  • Loading branch information
mkhamoyan committed Jan 26, 2022
1 parent eddd2ca commit 2501ef2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,16 @@ protected static string GetNamedPipeServerStreamName()
return @"LOCAL\" + Guid.NewGuid().ToString("N");
}

if (PlatformDetection.IsWindows || !PlatformDetection.IsCaseSensitiveOS)
if (PlatformDetection.IsWindows)
{
return Guid.NewGuid().ToString("N");
}

if (!PlatformDetection.IsCaseSensitiveOS)
{
return $"/tmp/{Guid.NewGuid().ToString("N")}";
}

const int MinUdsPathLength = 104; // required min is 92, but every platform we currently target is at least 104
const int MinAvailableForSufficientRandomness = 5; // we want enough randomness in the name to avoid conflicts between concurrent tests
string prefix = Path.Combine(Path.GetTempPath(), "CoreFxPipe_");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -196,12 +196,6 @@ internal static string GetPipePath(string serverName, string pipeName)
throw new ArgumentOutOfRangeException(nameof(pipeName), SR.ArgumentOutOfRange_AnonymousReserved);
}

if (RuntimeInformation.RuntimeIdentifier.StartsWith("iossimulator")
|| RuntimeInformation.RuntimeIdentifier.StartsWith("tvossimulator"))
{
return $"/tmp/{pipeName}";
}

// Since pipes are stored as files in the system we support either an absolute path to a file name
// or a file name. The support of absolute path was added to allow working around the limited
// length available for the pipe name when concatenated with the temp path, while being
Expand Down

0 comments on commit 2501ef2

Please sign in to comment.