SkillAgentSearch skills...

Xfstests

(x)fstests is a filesystem testing suite (mirror of kernel.org repository, synced daily)

Install / Use

/learn @kdave/Xfstests
About this skill

Quality Score

0/100

Supported Platforms

Universal

README


SUPPORTED FS LIST


History

Firstly, xfstests is the old name of this project, due to it was originally developed for testing the XFS file system on the SGI's Irix operating system. When xfs was ported to Linux, so was xfstests, now it only supports Linux.

As xfstests has many test cases that can be run on some other filesystems, we call them "generic" (and "shared", but it has been removed) cases, you can find them in tests/generic/ directory. Then more and more filesystems started to use xfstests, and contribute patches. Today xfstests is used as a file system regression test suite for lots of Linux's major file systems. So it's not "xfs"tests only, we tend to call it "fstests" now.

Supported fs

Firstly, there's not hard restriction about which filesystem can use fstests. Any filesystem can give fstests a try.

Although fstests supports many filesystems, they have different support level by fstests. So mark it with 4 levels as below:

L1: Fstests can be run on the specified fs basically. L2: Rare support from the specified fs list to fix some generic test failures. L3: Normal support from the specified fs list, has some own cases. L4: Active support from the fs list, has lots of own cases.

("+" means a slightly higher than the current level, but not reach to the next. "-" is opposite, means a little bit lower than the current level.)

+------------+-------+---------------------------------------------------------+ | Filesystem | Level | Comment | +------------+-------+---------------------------------------------------------+ | XFS | L4+ | N/A | +------------+-------+---------------------------------------------------------+ | Btrfs | L4 | https://btrfs.readthedocs.io/en/latest/dev/\ | | | | Development-notes.html#fstests-setup | +------------+-------+---------------------------------------------------------+ | Ext4 | L4 | N/A | +------------+-------+---------------------------------------------------------+ | Ext2 | L3 | N/A | +------------+-------+---------------------------------------------------------+ | Ext3 | L3 | N/A | +------------+-------+---------------------------------------------------------+ | overlay | L3 | N/A | +------------+-------+---------------------------------------------------------+ | f2fs | L3- | N/A | +------------+-------+---------------------------------------------------------+ | tmpfs | L3- | N/A | +------------+-------+---------------------------------------------------------+ | NFS | L2+ | https://linux-nfs.org/wiki/index.php/Xfstests | +------------+-------+---------------------------------------------------------+ | Ceph | L2 | N/A | +------------+-------+---------------------------------------------------------+ | CIFS | L2- | https://wiki.samba.org/index.php/Xfstesting-cifs | +------------+-------+---------------------------------------------------------+ | ocfs2 | L2- | N/A | +------------+-------+---------------------------------------------------------+ | Bcachefs | L2 | N/A | +------------+-------+---------------------------------------------------------+ | Exfat | L1+ | N/A | +------------+-------+---------------------------------------------------------+ | AFS | L1 | N/A | +------------+-------+---------------------------------------------------------+ | FUSE | L1 | N/A | +------------+-------+---------------------------------------------------------+ | GFS2 | L1 | N/A | +------------+-------+---------------------------------------------------------+ | Glusterfs | L1 | N/A | +------------+-------+---------------------------------------------------------+ | JFS | L1 | N/A | +------------+-------+---------------------------------------------------------+ | pvfs2 | L1 | N/A | +------------+-------+---------------------------------------------------------+ | Reiser4 | L1 | Reiserfs has been removed, only left reiser4 | +------------+-------+---------------------------------------------------------+ | ubifs | L1 | N/A | +------------+-------+---------------------------------------------------------+ | udf | L1 | N/A | +------------+-------+---------------------------------------------------------+ | Virtiofs | L1 | N/A | +------------+-------+---------------------------------------------------------+ | 9p | L1 | N/A | +------------+-------+---------------------------------------------------------+ | HFS/HFS+ | L1 | N/A | +------------+-------+---------------------------------------------------------+ | NILFS2 | L1 | N/A | +------------+-------+---------------------------------------------------------+


BUILDING THE FSQA SUITE


Ubuntu or Debian

  1. Make sure that package list is up-to-date and install all necessary packages:

    $ sudo apt-get update $ sudo apt-get install acl attr automake bc dbench dump e2fsprogs fio gawk
    gcc git indent libacl1-dev libaio-dev libcap-dev libgdbm-dev libtool
    libtool-bin liburing-dev libuuid1 lvm2 make psmisc python3 quota sed
    uuid-dev uuid-runtime xfsprogs linux-headers-$(uname -r) sqlite3
    libgdbm-compat-dev

  2. Install packages for the filesystem(s) being tested:

    $ sudo apt-get install exfatprogs f2fs-tools ocfs2-tools udftools xfsdump
    xfslibs-dev

  3. Install packages for optional features:

    systemd coredump capture: $ sudo apt install systemd-coredump systemd jq

Fedora

  1. Install all necessary packages from standard repository:

    $ sudo yum install acl attr automake bc dbench dump e2fsprogs fio gawk gcc
    gdbm-devel git indent kernel-devel libacl-devel libaio-devel
    libcap-devel libtool liburing-devel libuuid-devel lvm2 make psmisc
    python3 quota sed sqlite udftools xfsprogs

  2. Install packages for the filesystem(s) being tested:

    $ sudo yum install btrfs-progs exfatprogs f2fs-tools ocfs2-tools xfsdump
    xfsprogs-devel

  3. Install packages for optional features:

    systemd coredump capture: $ sudo yum install systemd systemd-udev jq

RHEL or CentOS

  1. Enable EPEL repository:

    • see https://docs.fedoraproject.org/en-US/epel/#How_can_I_use_these_extra_packages.3F
  2. Install all necessary packages which are available from standard repository and EPEL:

    $ sudo yum install acl attr automake bc dbench dump e2fsprogs fio gawk gcc
    gdbm-devel git indent kernel-devel libacl-devel libaio-devel
    libcap-devel libtool libuuid-devel lvm2 make psmisc python3 quota sed
    sqlite udftools xfsprogs

    Or, EPEL packages could be compiled from sources, see:

    • https://dbench.samba.org/web/download.html
    • https://www.gnu.org/software/indent/
  3. Build and install 'liburing':

    • see https://github.com/axboe/liburing.
  4. Install packages for the filesystem(s) being tested:

    For XFS install: $ sudo yum install xfsdump xfsprogs-devel

    For exfat install: $ sudo yum install exfatprogs

    For f2fs build and install:

    • see https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/about/

    For ocfs2 build and install:

    • see https://github.com/markfasheh/ocfs2-tools
  5. Install packages for optional features:

    systemd coredump capture: $ sudo yum install systemd systemd-udev jq

SUSE Linux Enterprise or openSUSE

  1. Install all necessary packages from standard repositories:

    $ sudo zypper install acct automake bc dbench duperemove dump fio gcc git
    indent libacl-devel libaio-devel libattr-devel libcap libcap-devel
    libtool liburing-devel libuuid-devel lvm2 make quota sqlite3 xfsprogs

  2. Install packages for the filesystem(s) being tested:

    For btrfs install: $ sudo zypper install btrfsprogs libbtrfs-devel

    For XFS install: $ sudo zypper install xfsdump xfsprogs-devel

  3. Install packages for optional features:

    systemd coredump capture: $ sudo yum install systemd systemd-coredump jq

Build and install test, libs and utils

$ git clone git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git $ cd xfstests-dev $ make $ sudo make install

Setup Environment

  1. Compile XFS/EXT4/BTRFS/etc. into your kernel or load as module. For example, for XFS, enable XFS_FS in your kernel configuration, or compile it as a module and load it with 'sudo modprobe xfs'. Most of
View on GitHub
GitHub Stars152
CategoryDevelopment
Updated10d ago
Forks84

Languages

Shell

Security Score

80/100

Audited on Mar 21, 2026

No findings