Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 3 commits into from Oct 2, 2019

Conversation

@chrisd8088
Copy link
Collaborator

@chrisd8088 chrisd8088 commented Oct 1, 2019

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.

chrisd8088 added 3 commits Oct 1, 2019
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
Collaborator Author

@chrisd8088 chrisd8088 commented Oct 1, 2019

/azp run GitHub VFSForGit Mac Functional Tests

@azure-pipelines
Copy link

@azure-pipelines azure-pipelines bot commented Oct 1, 2019

No pipelines are associated with this pull request.
@chrisd8088 chrisd8088 merged commit b39ce70 into microsoft:master Oct 2, 2019
10 checks passed
10 checks passed
GitHub VFSForGit Mac Functional Tests #19274.5 succeeded
Details
PR - Mac - Build and Unit Test Build #16842 succeeded
Details
PR - Windows - Build and Unit Test Build #19274.1 succeeded
Details
PR - Windows - Build and Unit Test (Build and test debug) Build and test debug succeeded
Details
PR - Windows - Build and Unit Test (Build and test release) Build and test release succeeded
Details
PR - Windows - Build and Unit Test (Check for additional tests) Check for additional tests succeeded
Details
PR - Windows - Extra Build #19274.1 succeeded
Details
PR - Windows - Functional Tests Build #19274.1 succeeded
Details
PR - Windows - Functional Tests (Sparse Mode) Build #19274.1 succeeded
Details
license/cla All CLA requirements met.
Details
@chrisd8088 chrisd8088 deleted the github:dehydrate-linux-fixes branch Oct 2, 2019
@chrisd8088
Copy link
Collaborator Author

@chrisd8088 chrisd8088 commented Oct 2, 2019

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
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.