Skip to content

Avoid long path issues for pipes#6536

Merged
Evangelink merged 2 commits intomainfrom
dev/ygerges/pipe-long-path
Sep 9, 2025
Merged

Avoid long path issues for pipes#6536
Evangelink merged 2 commits intomainfrom
dev/ygerges/pipe-long-path

Conversation

@Youssef1313
Copy link
Copy Markdown
Member

@Youssef1313 Youssef1313 commented Sep 8, 2025

Fixes #6535

@Youssef1313
Copy link
Copy Markdown
Member Author

/backport to rel/3.10

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Sep 8, 2025

Started backporting to rel/3.10: https://github.com/microsoft/testfx/actions/runs/17557666260

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Sep 8, 2025

@Youssef1313 backporting to rel/3.10 failed, the patch most likely resulted in conflicts:

$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Avoid long path issues for pipes
Using index info to reconstruct a base tree...
M	src/Platform/Microsoft.Testing.Platform/IPC/NamedPipeServer.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Platform/Microsoft.Testing.Platform/IPC/NamedPipeServer.cs
CONFLICT (content): Merge conflict in src/Platform/Microsoft.Testing.Platform/IPC/NamedPipeServer.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0001 Avoid long path issues for pipes
Error: The process '/usr/bin/git' failed with exit code 128

NOTE: A PR will be created, but needs to be revised manually!

@Youssef1313
Copy link
Copy Markdown
Member Author

/backport to rel/3.10

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Sep 8, 2025

Started backporting to rel/3.10: https://github.com/microsoft/testfx/actions/runs/17562662157

@Evangelink Evangelink merged commit 2d358c3 into main Sep 9, 2025
8 checks passed
@Evangelink Evangelink deleted the dev/ygerges/pipe-long-path branch September 9, 2025 09:17
;
#pragma warning restore CA1416 // Validate platform compatibility

private static bool IsUnix => Path.DirectorySeparatorChar == '/';
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.

why have we moved to a simple separator check, rather than RuntimeInformation.IsOSPlatform?

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 preferred to follow what Roslyn does which we know works very well for them.
But it's probably equivalent.

DirectorySeparatorChar on dotnet/runtime is hard coded on Windows to \ and on Unix to /.

Youssef1313 added a commit that referenced this pull request Sep 9, 2025
…o rel/3.10) (#6538)

Co-authored-by: Youssef1313 <youssefvictor00@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Potential long pipe name issues

4 participants