Skip to content

refactor ReadLink into MirrorProvider.POSIX#1177

Merged
chrisd8088 merged 4 commits intomicrosoft:features/linuxprototypefrom
github:mirrorprovider-posix
May 21, 2019
Merged

refactor ReadLink into MirrorProvider.POSIX#1177
chrisd8088 merged 4 commits intomicrosoft:features/linuxprototypefrom
github:mirrorprovider-posix

Conversation

@kivikakk
Copy link
Contributor

Refactor our uses of libc's readlink in the MirrorProvider for Mac and Linux.

From @chrisd8088's suggestion at github#21 (comment).

/cc @derrickstolee @wilbaker

@chrisd8088
Copy link
Contributor

This looks great to me, @kivikakk ... thank you!

@chrisd8088 chrisd8088 requested a review from derrickstolee May 20, 2019 03:13
Copy link
Contributor

@derrickstolee derrickstolee left a comment

Choose a reason for hiding this comment

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

A small suggestion around a case that probably will never happen. But never say never, right?

I do like dropping code clones, though.

@kivikakk
Copy link
Contributor Author

kivikakk commented May 20, 2019

Thanks for the review! I've made changes accordingly.

(edit: looks like CI failure is flakey -- GVFS.FunctionalTests.Tests.EnlistmentPerTestCase.LooseObjectStepTests.PutLooseObjectsInPackFiles again.)

@derrickstolee
Copy link
Contributor

@kivikakk Sorry about the test noise. The test is fixed in master with #1162. How often do you update this prototype branch with changes from master?

@chrisd8088
Copy link
Contributor

@derrickstolee -- I've been rebasing from master relatively often of late, but good to know there's a fix for one of the flaky CI tests; I'll pull that in soon.

@chrisd8088 chrisd8088 merged commit 9f017e7 into microsoft:features/linuxprototype May 21, 2019
@chrisd8088 chrisd8088 deleted the mirrorprovider-posix branch May 21, 2019 18:53
chrisd8088 added a commit that referenced this pull request May 21, 2019
refactor ReadLink into MirrorProvider.POSIX

Refactor our uses of libc's readlink(2) in the MirrorProvider
for Mac and Linux into a common POSIX base, and also handle
an unterminated buffer condition (and possible read past the end
of the buffer) in the existing code by returning ENAMETOOLONG
in this case.
chrisd8088 added a commit that referenced this pull request May 21, 2019
refactor ReadLink into MirrorProvider.POSIX

Refactor our uses of libc's readlink(2) in the MirrorProvider
for Mac and Linux into a common POSIX base, and also handle
an unterminated buffer condition (and possible read past the end
of the buffer) in the existing code by returning ENAMETOOLONG
in this case.
kivikakk pushed a commit to github/VFSForGit that referenced this pull request May 24, 2019
refactor ReadLink into MirrorProvider.POSIX

Refactor our uses of libc's readlink(2) in the MirrorProvider
for Mac and Linux into a common POSIX base, and also handle
an unterminated buffer condition (and possible read past the end
of the buffer) in the existing code by returning ENAMETOOLONG
in this case.
chrisd8088 added a commit that referenced this pull request May 24, 2019
refactor ReadLink into MirrorProvider.POSIX

Refactor our uses of libc's readlink(2) in the MirrorProvider
for Mac and Linux into a common POSIX base, and also handle
an unterminated buffer condition (and possible read past the end
of the buffer) in the existing code by returning ENAMETOOLONG
in this case.
chrisd8088 added a commit that referenced this pull request Jul 20, 2019
refactor ReadLink into MirrorProvider.POSIX

Refactor our uses of libc's readlink(2) in the MirrorProvider
for Mac and Linux into a common POSIX base, and also handle
an unterminated buffer condition (and possible read past the end
of the buffer) in the existing code by returning ENAMETOOLONG
in this case.
chrisd8088 added a commit that referenced this pull request Jul 26, 2019
refactor ReadLink into MirrorProvider.POSIX

Refactor our uses of libc's readlink(2) in the MirrorProvider
for Mac and Linux into a common POSIX base, and also handle
an unterminated buffer condition (and possible read past the end
of the buffer) in the existing code by returning ENAMETOOLONG
in this case.
chrisd8088 added a commit that referenced this pull request Jul 28, 2019
refactor ReadLink into MirrorProvider.POSIX

Refactor our uses of libc's readlink(2) in the MirrorProvider
for Mac and Linux into a common POSIX base, and also handle
an unterminated buffer condition (and possible read past the end
of the buffer) in the existing code by returning ENAMETOOLONG
in this case.
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.

3 participants