Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit 60b3376

Browse files
Paulo Janottidanmoseley
Paulo Janotti
authored andcommitted
Do not rely on $HOME since it can be too long, use /tmp (#27853)
1 parent ce285a7 commit 60b3376

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/System.IO.Pipes/tests/NamedPipeTests/NamedPipeTest.UnixDomainSockets.cs

+2-4
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ public class NamedPipeTest_UnixDomainSockets : NamedPipeTestBase
1414
[PlatformSpecific(TestPlatforms.AnyUnix)]
1515
public void NamedPipeServer_Connects_With_UnixDomainSocketEndPointClient()
1616
{
17-
string absoluteHomePath = Path.GetFullPath(Environment.GetEnvironmentVariable("HOME"));
18-
string pipeName = Path.Combine(absoluteHomePath, "pipe-tests-corefx-" + Path.GetRandomFileName());
17+
string pipeName = Path.Combine("/tmp", "pipe-tests-corefx-" + Path.GetRandomFileName());
1918
var endPoint = new UnixDomainSocketEndPoint(pipeName);
2019

2120
using (var pipeServer = new NamedPipeServerStream(pipeName, PipeDirection.InOut, 1, PipeTransmissionMode.Byte, PipeOptions.CurrentUserOnly))
@@ -32,8 +31,7 @@ public void NamedPipeServer_Connects_With_UnixDomainSocketEndPointClient()
3231
[PlatformSpecific(TestPlatforms.AnyUnix)]
3332
public async Task NamedPipeClient_Connects_With_UnixDomainSocketEndPointServer()
3433
{
35-
string absoluteHomePath = Path.GetFullPath(Environment.GetEnvironmentVariable("HOME"));
36-
string pipeName = Path.Combine(absoluteHomePath, "pipe-tests-corefx-" + Path.GetRandomFileName());
34+
string pipeName = Path.Combine("/tmp", "pipe-tests-corefx-" + Path.GetRandomFileName());
3735
var endPoint = new UnixDomainSocketEndPoint(pipeName);
3836

3937
using (var socketServer = new Socket(AddressFamily.Unix, SocketType.Stream, ProtocolType.Unspecified))

0 commit comments

Comments
 (0)