[Linux] Use backing root and check min version in dehydrate commands/tests#1535
Merged
chrisd8088 merged 3 commits intomicrosoft:masterfrom Oct 2, 2019
Merged
[Linux] Use backing root and check min version in dehydrate commands/tests#1535chrisd8088 merged 3 commits intomicrosoft:masterfrom
chrisd8088 merged 3 commits intomicrosoft:masterfrom
Conversation
The DehydrateVerb TryBackupFiles() method currently fails on Linux due to the inadvertent use of the WorkingDirectoryRoot as the source location for the backup. This is because on Linux the src/ working directory is fully unavailable when the provider is unmounted. Instead, by using the WorkingDirectoryBackingRoot, which is always available on all platforms (and is equivalent to the WorkingDirectoryRoot on Windows and Mac), we can allow most dehydrate tests to succeed on Linux.
This change will permit other functional test classes besides the DiskLayoutVersionTests to access and use the platform-specific disk layout major version numbers and minimum version numbers.
The DehydrateShouldFailOnWrongDiskLayoutVersion() functional test currently fails and leaves the test suite in a broken state if it attempts to set the disk layout major version number below a platform's minimum supported version. By checking whether the existing version is higher than the minimum version first, we can proceed with this test only when safe to do so.
Contributor
Author
|
/azp run GitHub VFSForGit Mac Functional Tests |
|
No pipelines are associated with this pull request. |
wilbaker
approved these changes
Oct 2, 2019
Contributor
Author
|
Thanks for these reviews, @wilbaker!! Much appreciated! |
This was referenced Oct 2, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
DehydrateVerbTryBackupFiles()method currently fails on Linux due to the inadvertent use of theWorkingDirectoryRootas the source location for the backup. This is because on Linux thesrc/working directory is fully unavailable when the provider is unmounted.Instead, by using the
WorkingDirectoryBackingRoot, which is always available on all platforms (and is equivalent to theWorkingDirectoryRooton Windows and Mac), we can allow most dehydrate tests to succeed on Linux.Also, the
DehydrateShouldFailOnWrongDiskLayoutVersion()functional test currently fails and leaves the test suite in a broken state if it attempts to set the disk layout major version number below a platform's minimum supported version.By checking whether the existing version is higher than the minimum version first, we can proceed with this test only when safe to do so. To accommodate this check, we move the platform-specific disk layout major version numbers and minimum version numbers into
GVFSHelpersfromDiskLayoutVersionTests.