Overview

xfstests is the regression test suite Linux file systems are tested with. It started at Silicon Graphics as a test suite for XFS, was ported to Linux, and now covers ext2, ext4, btrfs, CIFS, F2FS and others. There are well over a thousand test cases in it, from basic sanity checks up to stress runs and ioctl-heavy corner cases. Maintainers run it before merging changes and distributions run it before shipping them.

62 commits · 4,783 insertions(+) · 940 deletions(-)

Contributions

Tests for ext4 and for new interfaces

Nearly everything I did in the kernel arrived with tests here, which is the part that keeps a feature working after everyone involved has moved on to something else. FITRIM argument handling, the case where the requested trim length is smaller than a file system block, fallocate() zero range and collapse range added to both fsx and fsstress, and a number of ext4 corner cases that only turn up under specific block sizes or mount options.

Fixes to the suite itself

A test suite that fails for its own reasons is worse than no test suite, because people learn to ignore the failures. A good share of my commits fix the tests rather than the file systems: assumptions a test made that were never actually guaranteed, failures that only appear on certain configurations, and tests that broke because the kernel changed underneath them.

Harness and configuration

The rest is infrastructure. The largest piece is config sections: a single configuration file can describe several setups, different file systems, block sizes and mount options, and check runs the whole set in one pass, re-creating and remounting the test devices between sections as the options require. Running one kernel against six configurations becomes one command instead of six runs that somebody has to remember to do.

Around that came the smaller things that make a suite usable day to day: being able to re-read the configuration, specifying RESULT_BASE, selecting sections with -s, running everything when no test is named, and unmounting the test devices properly after a run.

xfstests continues to be an essential part of filesystem development and kernel QA, with maintainers and distributions relying on its coverage before changes are merged or shipped.