btrfs/079: fix failure to umount scratch fs due to running filefrag process
[xfstests-dev.git] / README.overlay
1
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'.
4
5 For example, the following config file can be used to run tests on
6 xfs test/scratch partitions:
7
8  TEST_DEV=/dev/sda5
9  TEST_DIR=/mnt/test
10  SCRATCH_DEV=/dev/sda6
11  SCRATCH_MNT=/mnt/scratch
12  FSTYP=xfs
13
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
18 individual tests.
19
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'.
24
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.
28
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.
32
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:
35
36  [xfs]
37  TEST_DEV=/dev/sda5
38  TEST_DIR=/mnt/test
39  SCRATCH_DEV=/dev/sda6
40  SCRATCH_MNT=/mnt/scratch
41  FSTYP=xfs
42
43  [xfs_pquota]
44  MOUNT_OPTIONS="-o pquota"
45  TEST_FS_MOUNT_OPTS="-o noatime"
46  OVERLAY_MOUNT_OPTIONS="-o redirect_dir=off"
47  OVERLAY_FSCK_OPTIONS="-n -o redirect_dir=off"
48
49 In the example above, MOUNT_OPTIONS will be used to mount the base scratch fs,
50 TEST_FS_MOUNT_OPTS will be used to mount the base test fs,
51 OVERLAY_MOUNT_OPTIONS will be used to mount both test and scratch overlay and
52 OVERLAY_FSCK_OPTIONS will be used to check both test and scratch overlay.