cloud-hypervisor / fuse-backend-rs

Rust crate for implementing FUSE backends
Apache License 2.0
130 stars 66 forks source link

XFSTests to Validate Functionality #111

Open Champ-Goblem opened 1 year ago

Champ-Goblem commented 1 year ago

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:

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.

jiangliu commented 1 year ago

Thanks for your great work, we will investigate more about the compatibility:)