Skip to content

[Linux] Use backing root and check min version in dehydrate commands/tests#1535

Merged
chrisd8088 merged 3 commits intomicrosoft:masterfrom
github:dehydrate-linux-fixes
Oct 2, 2019
Merged

[Linux] Use backing root and check min version in dehydrate commands/tests#1535
chrisd8088 merged 3 commits intomicrosoft:masterfrom
github:dehydrate-linux-fixes

Conversation

@chrisd8088
Copy link
Contributor

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.

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 GVFSHelpers from DiskLayoutVersionTests.

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.
@chrisd8088
Copy link
Contributor Author

/azp run GitHub VFSForGit Mac Functional Tests

@azure-pipelines
Copy link

No pipelines are associated with this pull request.

@chrisd8088 chrisd8088 merged commit b39ce70 into microsoft:master Oct 2, 2019
@chrisd8088 chrisd8088 deleted the dehydrate-linux-fixes branch October 2, 2019 21:01
@chrisd8088
Copy link
Contributor Author

Thanks for these reviews, @wilbaker!! Much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants