-
Notifications
You must be signed in to change notification settings - Fork 83
Description
We recently came across the xfstest suite used by the Linux kernel to test and verify filesystem patches.
https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/tree/
This suite supports various filesystem types including fuse and virtiofs, and supports a wide range of tests to validate a number of conditions. We think it would be beneficial for this crate to integrate it as part of the testing regime, as another step to try and avoid regressions and bugs that could make it into releases.
For example, we have run this set of tests in a containerised environment making use of nydus 2.2.0 (which is using fuse-backend-rs version 1.10.0) provisioned with Kata 3.0.2. In total 18 out of 589 tests failed:
Failures: generic/007 generic/013 generic/088 generic/245 generic/257 generic/258 generic/263 generic/430 generic/431 generic/432 generic/433 generic/434 generic/504 generic/564 generic/571 generic/632 generic/637 generic/639
Failed 18 of 589 tests
Nydus 2.1.0 (fuse-backend-rs 0.9) fails 21 out of 589 tests:
Failures: generic/007 generic/013 generic/088 generic/131 generic/245 generic/247 generic/257 generic/258 generic/263 generic/430 generic/431 generic/432 generic/433 generic/434 generic/478 generic/504 generic/564 generic/571 generic/632 generic/637 generic/639
Failed 21 of 589 tests
Provisioning this is fairly straightforward and can be repeated with the following steps:
- Start a new VM with a virtiofs device attached, one which uses this crate for its functionality
- Log in to the VM and clone the above repo and build it
- Mount the virtiofs device into the VM
- fe
mount -t virtiofs sharedFS /mnt
- fe
- In the source directory start the tests against the virtiofs device
TEST_DIR=/mnt TEST_DEV=sharedFS ./check -virtiofs
- The tests should run and output the failure results, you can check the test contents and expected output by checking the files under
./tests/**- The results after running the tests can be found under
./results/**
- The results after running the tests can be found under
For context we found that the golang fuse library has run these tests in order to verify its functionality:
https://github.com/hanwen/go-fuse/issues?q=is%3Aissue+xfstest
On a side note, we have noticed with more recent versions of nydus that there have been some problems with stateful workloads, for example, MySQL and Minio have issues starting which look to be filesystem related. We are hoping that these tests will pick up any potential edges cases as understandably filesystems are very complex.