diff options
author | Eryu Guan <eguan@redhat.com> | 2015-12-21 18:07:47 +1100 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-12-21 18:07:47 +1100 |
commit | ed5d3c7166ee1efbcfe445ea6598f85d9ab1f1be (patch) | |
tree | 313c4628618ab9cc25e184a0c3acd2fd4d88a891 /check | |
parent | 27d077ec0bdaaffd69e436236ec580bfb9f53385 (diff) |
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>
Diffstat (limited to 'check')
-rwxr-xr-x | check | 22 |
1 files changed, 12 insertions, 10 deletions
@@ -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 |