mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
overlay: configure TEST/SCRATCH vars to base fs
Instead of setting the vars TEST/SCRATCH_DEV to overlay base dirs, allow setting them to block devices to configure the base fs partition, where overlay dirs will be created. For example, the following config file can be used to run tests on xfs test/scratch partitions: TEST_DEV=/dev/sda5 TEST_DIR=/mnt/test SCRATCH_DEV=/dev/sda6 SCRATCH_MNT=/mnt/scratch FSTYP=xfs Using the same config file, but executing './check -overlay' will use the same partitions as base fs for overlayfs directories and set TEST_DIR/SCRATCH_MNT values to overlay mount points, i.e.: /mnt/test/ovl-mnt and /mnt/scratch/ovl-mnt. The base fs should be pre-formatted and mounted when starting the test. An upcoming change is going to support mount/umount of base fs. The new vars OVL_BASE_SCRATCH_MNT/TEST_DIR are set to point at the overlayfs base dirs in either legacy or new config method. Tests should always use these vars and not the legacy SCRATCH/TEST_DEV vars when referring to overlay base dir. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Reviewed-by: Eryu Guan <eguan@redhat.com> Signed-off-by: Eryu Guan <eguan@redhat.com>
This commit is contained in:
committed by
Eryu Guan
parent
6f5ba68b7b
commit
bcba40e3df
@@ -0,0 +1,18 @@
|
||||
|
||||
To run xfstest on overlayfs, configure the variables of TEST and SCRATCH
|
||||
partitions to be used as the "base fs" and run './check -overlay'.
|
||||
|
||||
For example, the following config file can be used to run tests on
|
||||
xfs test/scratch partitions:
|
||||
|
||||
TEST_DEV=/dev/sda5
|
||||
TEST_DIR=/mnt/test
|
||||
SCRATCH_DEV=/dev/sda6
|
||||
SCRATCH_MNT=/mnt/scratch
|
||||
FSTYP=xfs
|
||||
|
||||
Using the same config file, but executing './check -overlay' will
|
||||
use the same partitions as base fs for overlayfs directories
|
||||
and set TEST_DIR/SCRATCH_MNT values to overlay mount points, i.e.:
|
||||
/mnt/test/ovl-mnt and /mnt/scratch/ovl-mnt, for the context of
|
||||
individual tests.
|
||||
Reference in New Issue
Block a user