From 21d0334e7f4a98ec49e7f46cacf2d51258eaec33 Mon Sep 17 00:00:00 2001 From: Craig Chi Date: Tue, 4 Aug 2020 12:27:55 -0700 Subject: Add FUSE integration test This commit adds an integration test framework for FUSE support. Please refer to the test example and test/fuse/README.md for further details. Fixes #3098 --- test/fuse/README.md | 102 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 test/fuse/README.md (limited to 'test/fuse/README.md') diff --git a/test/fuse/README.md b/test/fuse/README.md new file mode 100644 index 000000000..a899f2826 --- /dev/null +++ b/test/fuse/README.md @@ -0,0 +1,102 @@ +# gVisor FUSE Test Suite + +This is an integration test suite for fuse(4) filesystem. It runs under both +gVisor and Linux, and ensures compatibility between the two. This test suite is +based on system calls test. + +This document describes the framework of fuse integration test and the +guidelines that should be followed when adding new fuse tests. + +## Integration Test Framework + +Please refer to the figure below. `>` is entering the function, `<` is leaving +the function, and `=` indicates sequentially entering and leaving. + +``` + | Client (Test Main Process) | Server (FUSE Daemon) + | | + | >TEST_F() | + | >SetUp() | + | =MountFuse() | + | >SetUpFuseServer() | + | [create communication pipes] | + | =fork() | =fork() + | >WaitCompleted() | + | [wait for MarkDone()] | + | | =ConsumeFuseInit() + | | =MarkDone() + | SetExpected() | + | [construct expected reaction] | + | | >FuseLoop() + | | >ReceiveExpected() + | | [wait data from pipe] + | [write data to pipe] | + | [wait for MarkDone()] | + | | [save data to memory] + | | =MarkDone() + | read() + | | [wait for fs operation] + | >[Do fs operation] | + | [wait for fs response] | + | | TearDown() | + | =UnmountFuse() | + |