2 To run xfstest on overlayfs, configure the variables of TEST and SCRATCH
3 partitions to be used as the "base fs" and run './check -overlay'.
5 For example, the following config file can be used to run tests on
6 xfs test/scratch partitions:
11 SCRATCH_MNT=/mnt/scratch
14 Using the same config file, but executing './check -overlay' will
15 use the same partitions as base fs for overlayfs directories
16 and set TEST_DIR/SCRATCH_MNT values to overlay mount points, i.e.:
17 /mnt/test/ovl-mnt and /mnt/scratch/ovl-mnt, for the context of
20 './check -overlay' does not support mkfs and fsck on the base fs, so
21 the base fs should be pre-formatted before starting the -overlay run.
22 An easy way to accomplish this is by running './check <some test>' once,
23 before running './check -overlay'.
25 './check -overlay' support check overlay test and scratch dirs,
26 OVERLAY_FSCK_OPTIONS should be set instead of FSCK_OPTIONS if fsck
27 options need to given directly.
29 Because of the lack of mkfs support, multi-section config files are only
30 partly supported with './check -overlay'. Only multi-section files that
31 do not change FSTYP and MKFS_OPTIONS can be safely used with -overlay.
33 For example, the following multi-section config file can be used to
34 run overlay tests on the same base fs, but with different mount options, and on
35 top of idmapped mounts:
41 SCRATCH_MNT=/mnt/scratch
45 MOUNT_OPTIONS="-o pquota"
46 TEST_FS_MOUNT_OPTS="-o noatime"
47 OVERLAY_MOUNT_OPTIONS="-o redirect_dir=off"
48 OVERLAY_FSCK_OPTIONS="-n -o redirect_dir=off"
53 In the example above, MOUNT_OPTIONS will be used to mount the base scratch fs,
54 TEST_FS_MOUNT_OPTS will be used to mount the base test fs,
55 OVERLAY_MOUNT_OPTIONS will be used to mount both test and scratch overlay and
56 OVERLAY_FSCK_OPTIONS will be used to check both test and scratch overlay.
62 xfstests can be used as a test harness to run unionmount testsuite test cases
63 and provide extended test coverage for overlayfs.
65 To enable running unionmount testsuite, clone the git repository from:
66 https://github.com/amir73il/unionmount-testsuite.git
67 under the xfstests src directory, or set the environment variable
68 UNIONMOUNT_TESTSUITE to the local path where the repository was cloned.
70 Run './check -overlay -g overlay/union' to execute all the unionmount testsuite