diff options
Diffstat (limited to 'xfstests')
-rw-r--r-- | xfstests/README.md | 18 | ||||
-rw-r--r-- | xfstests/local.config | 12 | ||||
-rwxr-xr-x | xfstests/mount.fuse.passthrough | 17 |
3 files changed, 47 insertions, 0 deletions
diff --git a/xfstests/README.md b/xfstests/README.md new file mode 100644 index 0000000..deda553 --- /dev/null +++ b/xfstests/README.md @@ -0,0 +1,18 @@ +To test FUSE with xfstests¹: + +1. copy the `mount.fuse.passthrough` file into + `/sbin` and edit the `PASSTHROUGH_PATH`, `SCRATCH_SOURCE` and `TEST_SOURCE` variables as needed. + +2. Make sure that the `SCRATCH_SOURCE` and `TEST_SOURCE` directories +exist. + +3. Copy `local.config` into your xfstests directory + +Tests can then be run with e.g.: + +```sh +# make +# sudo ./check -fuse -b +``` + +¹https://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git/about/ diff --git a/xfstests/local.config b/xfstests/local.config new file mode 100644 index 0000000..f20cec0 --- /dev/null +++ b/xfstests/local.config @@ -0,0 +1,12 @@ +export TEST_DEV=non1 +export TEST_DIR=/mnt/test +export SCRATCH_DEV=non2 +export SCRATCH_MNT=/mnt/scratch +export FSTYP=fuse +export FUSE_SUBTYP=.passthrough +export MOUNT_OPTIONS="" +export TEST_FS_MOUNT_OPTS="" + +PASSTHROUGH_PATH=/home/nikratio/libfuse/build/example/passthrough_hp +SCRATCH_SOURCE=/mnt/src/scratch +TEST_SOURCE=/mnt/src/test diff --git a/xfstests/mount.fuse.passthrough b/xfstests/mount.fuse.passthrough new file mode 100755 index 0000000..47208f8 --- /dev/null +++ b/xfstests/mount.fuse.passthrough @@ -0,0 +1,17 @@ +#!/bin/bash + +ulimit -n 1048576 + +# It would be easier if we could just set SCRATCH_DEV and TEST_DEV to the source directory +# path in local.options. Unfortunately, setting these variables to a path seems get +# xfstests all worked up (even though it should treat these as opaque values), and it +# refuses to even start running any tests). +dev="$1" +shift +if [ "$dev" = "${SCRATCH_DEV}" ]; then + source="${SCRATCH_SOURCE}" +else + source="${TEST_SOURCE}" +fi + +exec "$PASSTHROUGH_PATH" -o fsname=$dev,allow_other "${source}" "$@" |