TEST_DEV=192.168.14.1:6789:/
TEST_FS_MOUNT_OPTS="-o name=admin,secret=AQDuEBtYKEYRINGSECRETriSC8YJGDZsQHcr7g=="
FSTYP="ceph"
+
+[glusterfs]
+FSTYP=glusterfs
+TEST_DIR=/mnt/gluster/test
+TEST_DEV=192.168.1.1:testvol
+SCRATCH_MNT=/mnt/gluster/scratch
+SCRATCH_DEV=192.168.1.1:scratchvol
;;
ceph)
;;
+ glusterfs)
+ ;;
overlay)
;;
reiser4)
ceph)
# do nothing for ceph
;;
+ glusterfs)
+ # do nothing for glusterfs
+ ;;
overlay)
# do nothing for overlay
;;
local mkfs_status
case $FSTYP in
- nfs*|cifs|ceph|overlay)
+ nfs*|cifs|ceph|overlay|glusterfs)
# unable to re-create this fstyp, just remove all files in
# $SCRATCH_MNT to avoid EEXIST caused by the leftover files
# created in previous runs
# Fix the filesystem type up here so that the callers don't
# have to bother with this quirk.
#
- _df_device $1 | $AWK_PROG '{ print $2 }' | sed -e 's/nfs4/nfs/'
+ _df_device $1 | $AWK_PROG '{ print $2 }' | \
+ sed -e 's/nfs4/nfs/' -e 's/fuse.glusterfs/glusterfs/'
}
# return the FS mount options of a mounted device
_require_scratch_nocheck()
{
case "$FSTYP" in
+ glusterfs)
+ echo $SCRATCH_DEV | grep -q "\w:\w" > /dev/null 2>&1
+ if [ -z "$SCRATCH_DEV" -o "$?" != "0" ]; then
+ _notrun "this test requires a valid \$SCRATCH_DEV"
+ fi
+ if [ ! -d "$SCRATCH_MNT" ]; then
+ _notrun "this test requires a valid \$SCRATCH_MNT"
+ fi
+ ;;
nfs*|ceph)
echo $SCRATCH_DEV | grep -q ":/" > /dev/null 2>&1
if [ -z "$SCRATCH_DEV" -o "$?" != "0" ]; then
_require_test()
{
case "$FSTYP" in
+ glusterfs)
+ echo $TEST_DEV | grep -q "\w:\w" > /dev/null 2>&1
+ if [ -z "$TEST_DEV" -o "$?" != "0" ]; then
+ _notrun "this test requires a valid \$TEST_DEV"
+ fi
+ if [ ! -d "$TEST_DIR" ]; then
+ _notrun "this test requires a valid \$TEST_DIR"
+ fi
+ ;;
nfs*|ceph)
echo $TEST_DEV | grep -q ":/" > /dev/null 2>&1
if [ -z "$TEST_DEV" -o "$?" != "0" ]; then
ceph)
# no way to check consistency for CephFS
;;
+ glusterfs)
+ # no way to check consistency for GlusterFS
+ ;;
overlay)
# no way to check consistency for overlay
;;
ceph)
# no way to check consistency for CephFS
;;
+ glusterfs)
+ # no way to check consistency for GlusterFS
+ ;;
overlay)
# no way to check consistency for overlay
;;