Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
[Linux] Use backing root and check min version in dehydrate commands/tests #1535
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.
|
/azp run GitHub VFSForGit Mac Functional Tests |
|
No pipelines are associated with this pull request. |
b39ce70
into
microsoft:master
|
Thanks for these reviews, @wilbaker!! Much appreciated! |
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.