Skip to content

[Linux] enable most functional tests on Linux#1432

Merged
chrisd8088 merged 10 commits intomicrosoft:features/linuxprototypefrom
github:linux-functional-tests
Aug 8, 2019
Merged

[Linux] enable most functional tests on Linux#1432
chrisd8088 merged 10 commits intomicrosoft:features/linuxprototypefrom
github:linux-functional-tests

Conversation

@chrisd8088
Copy link
Contributor

@chrisd8088 chrisd8088 commented Aug 8, 2019

This is an initial set of changes to enable most functional tests to run -- if not succeed -- on Linux.

We build the GVFS.FunctionalTests projects on Linux, change a number of MacTODO categories into NonWindowsTODO equivalents, and deal with some Linux-specific failures caused by the present lack of a GVFS.Service daemon and the temporary use of flock(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

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).
Copy link
Contributor

@derrickstolee derrickstolee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In general, I'm happy this day has finally arrived! Congratulations!

I just have one question about a test change that seems confusing.

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

/azp run PR - Windows - Extra

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@chrisd8088 chrisd8088 merged commit 7d102af into microsoft:features/linuxprototype Aug 8, 2019
@chrisd8088 chrisd8088 deleted the linux-functional-tests branch August 8, 2019 22:03
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