mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
overlayfs: rudimentary test support
Adding basic overlayfs support to fstests, it doesn't test anything overlayfs specific, but runs existing tests on top of overlayfs. It's following the path from Eric's patchset and Zab's review back in Mar. A new fstype "overlay" is added, and TEST_DEV/SCRATCH_DEV are required to be fs paths, and overlayfs is mounted at TEST_DIR/SCRATCH_MNT, so tests can be run there. To test overlayfs, setup config as something like the following TEST_DEV=/mnt/ovl/test TEST_DIR=/mnt/testarea/test SCRATCH_DEV=/mnt/ovl/scratch SCRATCH_MNT=/mnt/testarea/scratch then run ./check -overlay -g auto Signed-off-by: Eryu Guan <eguan@redhat.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Filipe Manana <fdmanana@suse.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
@@ -53,13 +53,6 @@ timestamp=${TIMESTAMP:=false}
|
||||
|
||||
rm -f $tmp.list $tmp.tmp $tmp.grep $here/$iam.out $tmp.xlist
|
||||
|
||||
# we need common/config
|
||||
if ! . ./common/config
|
||||
then
|
||||
echo "$iam: failed to source common/config"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
SRC_GROUPS="generic shared"
|
||||
export SRC_DIR="tests"
|
||||
|
||||
@@ -70,6 +63,7 @@ usage()
|
||||
check options
|
||||
-nfs test NFS
|
||||
-cifs test CIFS
|
||||
-overlay test overlay
|
||||
-tmpfs test TMPFS
|
||||
-l line mode diff
|
||||
-udiff show unified diff (default)
|
||||
@@ -207,9 +201,10 @@ while [ $# -gt 0 ]; do
|
||||
case "$1" in
|
||||
-\? | -h | --help) usage ;;
|
||||
|
||||
-nfs) FSTYP=nfs ;;
|
||||
-cifs) FSTYP=cifs ;;
|
||||
-tmpfs) FSTYP=tmpfs ;;
|
||||
-nfs) FSTYP=nfs ;;
|
||||
-cifs) FSTYP=cifs ;;
|
||||
-overlay) FSTYP=overlay ;;
|
||||
-tmpfs) FSTYP=tmpfs ;;
|
||||
|
||||
-g) group=$2 ; shift ;
|
||||
GROUP_LIST="$GROUP_LIST ${group//,/ }"
|
||||
@@ -260,6 +255,13 @@ while [ $# -gt 0 ]; do
|
||||
shift
|
||||
done
|
||||
|
||||
# we need common/config, source it after processing args, overlay needs FSTYP
|
||||
# set before sourcing common/config
|
||||
if ! . ./common/config; then
|
||||
echo "$iam: failed to source common/config"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Process tests from command line now.
|
||||
if $have_test_arg; then
|
||||
while [ $# -gt 0 ]; do
|
||||
|
||||
Reference in New Issue
Block a user