Skip to content

Conversation

@jkotas
Copy link
Member

@jkotas jkotas commented Aug 21, 2022

Replace hardcoded list of platforms with symlinked temp directory with a relaxed condition that allows the test to pass even when the temp directory is symlinked.

Replace hardcoded list of platforms with symlinked temp directory with a relaxed condition that allows the test to pass even when the temp directory is symlinked.
@ghost ghost added the area-System.IO label Aug 21, 2022
@ghost ghost assigned jkotas Aug 21, 2022
@ghost
Copy link

ghost commented Aug 21, 2022

Tagging subscribers to this area: @dotnet/area-system-io
See info in area-owners.md if you want to be subscribed.

Issue Details

Replace hardcoded list of platforms with symlinked temp directory with a relaxed condition that allows the test to pass even when the temp directory is symlinked.

Author: jkotas
Assignees: -
Labels:

area-System.IO

Milestone: -

@jkotas
Copy link
Member Author

jkotas commented Aug 21, 2022

Context #74070 (comment)

// path that followed the symlink.
if (!OperatingSystem.IsMacOS())

if ((File.GetAttributes(Path.GetDirectoryName(TestDirectory)) & FileAttributes.ReparsePoint) != 0)
Copy link
Member Author

Choose a reason for hiding this comment

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

This file has the comprehensive current directory tests, so it gets more complicated checks unlike the other places.


// We would ideally use realpath to do this, but it resolves symlinks, requires that the file actually exist,
// and turns it into a full path, which we only want if fullCheck is true.
// We would ideally use realpath to do this, but it resolves symlinks and requires that the file actually exist.
Copy link
Member Author

Choose a reason for hiding this comment

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

Somewhat related comment fix

/tmp does not seem to be an ordinary symlink
@adamsitnik
Copy link
Member

/azp run runtime-extra-platforms

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@jkotas jkotas merged commit 35536d1 into dotnet:main Aug 22, 2022
@jkotas jkotas deleted the cur-dir-tests branch August 30, 2022 21:21
@ghost ghost locked as resolved and limited conversation to collaborators Sep 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants