Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XFSTests to Validate Functionality #111

Open
Champ-Goblem opened this issue Mar 22, 2023 · 1 comment
Open

XFSTests to Validate Functionality #111

Champ-Goblem opened this issue Mar 22, 2023 · 1 comment

Comments

@Champ-Goblem
Copy link
Contributor

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
  • 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/**

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

jiangliu commented Apr 9, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants