mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
d5e3d5dd63
Summary: This adds a FakeFuse class to simulate a FUSE connection to the kernel, but that is actually communicating with our userspace test harness code. This also adds a FakePrivHelper class which implements the PrivHelper interface but returns FakeFuse connections rather than real FUSE connections to the kernel. This will enable us to write unit tests that exercise more of the FUSE and EdenMount logic, and will also enable us to test error conditions and ordering behaviors that are difficult to reliably reproduce with a real FUSE mount. This also includes some very basic tests using this new code. The code in fuse/test/FuseChannelTest.cpp creates a FuseChannel using a FakeFuse object, and the code in inodes/test/FuseTest.cpp creates a full EdenMount object using FakePrivHelper and FakeFuse. The tests are pretty similar for now, and only exercise the FUSE initialization code. I will expand these tests in subsequent diffs. Reviewed By: wez Differential Revision: D7050826 fbshipit-source-id: 4f82375d65664ca3a5a228a577caa4d1d47454fe |
||
---|---|---|
.. | ||
BufVecTest.cpp | ||
FuseChannelTest.cpp | ||
main.cpp |