[Linux] enable most functional tests on Linux#1432
Merged
chrisd8088 merged 10 commits intomicrosoft:features/linuxprototypefrom Aug 8, 2019
Merged
[Linux] enable most functional tests on Linux#1432chrisd8088 merged 10 commits intomicrosoft:features/linuxprototypefrom
chrisd8088 merged 10 commits intomicrosoft:features/linuxprototypefrom
Conversation
Until the GVFS.Service process is implemented on Linux, the "WARNING: ..." message printed when it cannot be contacted at mount time has the side-effect of confusing the some functional tests, as the output from the GVFS process is scanned for any string matching "warning" case-insensitively. To avoid this, we force the GVFS_UNATTENDED environment variable to be set on Linux for all functional tests, which in turn causes the GVFS process to skip checking for a running GVFS.Service process.
Stub out the call to PlaceHolderHasVersionInfo() on Linux, akin to what is currently done for the Mac. Also enable the same code on Linux as is used on Mac for the EnumerateAndReadDoesNotChangeEnumerationOrder() functional test.
These three tests currently fail due to contention with libprojfs for an exclusive flock(2); the C# file locking implementation on Linux conflicts with the locks taken by libprojfs before testing the projection status of a file. We can remove this TODO category once libprojfs uses an internal locking mechanism instead of flock(2).
Where appropriate, rename the categories of functional tests which have known failures on both Mac and Linux as NonWindowsTODO instead.
Several tests currently fail due to apparently delayed file writes on Linux when using the FUSE passthrough filesystem implemented in libprojfs. We should remove this TODO category once libprojfs and FUSE file write buffering is investigated and remediated.
On Linux, when using libprojfs (which for the time being internally calls flock(2) to acquire its per-inode virtualization state), EAGAIN/EWOULDBLOCK may be returned while writing to files in MultithreadedReadWriteTests.
On Linux, the TruncatedObjectRedownloaded() functional test requires that we trigger hydration by actually reading the contents of the file whose GVFS cached object file we've artifically truncated, rather that just checking that the file exists, which is sufficient on macOS for the test to succeed (but not sufficient on Linux).
This was referenced Aug 8, 2019
Contributor
derrickstolee
left a comment
There was a problem hiding this comment.
In general, I'm happy this day has finally arrived! Congratulations!
I just have one question about a test change that seems confusing.
GVFS/GVFS.FunctionalTests/Tests/EnlistmentPerFixture/MultithreadedReadWriteTests.cs
Show resolved
Hide resolved
Ensure we exit our loop when File.Open() fails with something other than EAGAIN in the CanReadWriteAFileInParallel() functional test. Thanks to derrickstolee for catching this on PR review!
derrickstolee
approved these changes
Aug 8, 2019
Contributor
Author
|
/azp run PR - Windows - Extra |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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.
This is an initial set of changes to enable most functional tests to run -- if not succeed -- on Linux.
We build the
GVFS.FunctionalTestsprojects on Linux, change a number ofMacTODOcategories intoNonWindowsTODOequivalents, and deal with some Linux-specific failures caused by the present lack of aGVFS.Servicedaemon and the temporary use offlock(2)in libprojfs (see github/libprojfs#79 for details).Enabling additional functional tests on Linux depends on the work in #1411, #1413, and especially #1412.
/cc @kivikakk, @wilbaker