Skip to contentSkip to conversation

fstests: add GlusterFS support

PATCH In review Zorro Lang 3 participants 6 messages Mar 16, 2017 – Mar 21, 2017

lore
Share & tools
lore

Zorro Lang

author
#0 lore raw

PATCH v2 1/1 fstests: add GlusterFS support

Add basic GlusterFS support. Neither new GlusterFS specific tests nor related patches are included. Only support FSTYP=glusterfs or check -glusterfs XXX.

To test on glusterfs, two gluster volumes and two mountpoint directories are needed.

---

Hi glusterfs developers,

Recently some people cares about testing kernel FUSE by running xfstests. We can't test FUSE independently, we must depend upon someone real FS base on FUSE, e.g. GlusterFS.

This patch only want to run xfstests on glusterfs, but I haven't made sure if there's no case bugs for glusterfs. I think that's another problem which I will fix in later patches.

At first I prepare two gluster volumes and two directories, then set into xfstests/local.config.

[root@ibm-x3650m4-10 xfstests-dev]# cat local.config TEST_DIR=/mnt/gluster/test TEST_DEV=ibm-xxxx-xx.redhat.com:testvol SCRATCH_MNT=/mnt/gluster/scratch SCRATCH_DEV=ibm-xxxx-xx.redhat.com:scratchvol

(feel free to set MOUNT_OPTIONS, or GLUSTERFS_MOUNT_OPTIONS)

Then I ran some generic cases, e.g. g/001 and g/117, one test on TEST_DEV, and the other run on SCRATCH_DEV:

[root@ibm-x3650m4-10 xfstests-dev]# ./check -glusterfs generic/001

FSTYP         -- glusterfs
PLATFORM      -- Linux/x86_64 ibm-x3650m4-10 3.10.0-581.el7.x86_64
MKFS_OPTIONS  -- ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol

MOUNT_OPTIONS -- -o context=system_u:object_r:nfs_t:s0 ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol /mnt/gluster/scratch

generic/001 9s ... 8s
Ran: generic/001
Passed all 1 tests

[root@ibm-x3650m4-10 xfstests-dev]# ./check -glusterfs generic/117

FSTYP         -- glusterfs
PLATFORM      -- Linux/x86_64 ibm-x3650m4-10 3.10.0-581.el7.x86_64
MKFS_OPTIONS  -- ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol

MOUNT_OPTIONS -- -o context=system_u:object_r:nfs_t:s0 ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol /mnt/gluster/scratch

generic/117 24s ... 24s
Ran: generic/117
Passed all 1 tests

The results look good. But there're some cases fails on glusterfs, I think that's case problem or glusterfs problems. I'll look into them in the future.

I only know how to use "mount -t glusterfs XXXX:vol /mnt", if you have any other requirements or suggestions, please tell me. Welcome send more patches to fstests@ mail list:)

Thanks,
Zorro

 README.config-sections |  7 +++++++
 check                  |  2 ++
 common/config          |  6 ++++++
 common/rc              | 34 ++++++++++++++++++++++++++++++++--
 4 files changed, 47 insertions(+), 2 deletions(-)
README.config-sections +7 -0
index df7c929..9133997 100644
@@ -121,3 +121,10 @@ TEST_DIR=/mnt/test
 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_DIR=/mnt/gluster/scratch
+SCRATCH_DEV=192.168.1.1:scratchvol
check +2 -0
index c2c22e2..2fcf385 100755
@@ -65,6 +65,7 @@ usage()
 
 check options
     -nfs                test NFS
+    -glusterfs                test GlusterFS
     -cifs               test CIFS
     -overlay		test overlay
     -tmpfs              test TMPFS
@@ -260,6 +261,7 @@ while [ $# -gt 0 ]; do
 	-\? | -h | --help) usage ;;
 
 	-nfs)		FSTYP=nfs ;;
+	-glusterfs)	FSTYP=glusterfs ;;
 	-cifs)		FSTYP=cifs ;;
 	-overlay)	FSTYP=overlay; export OVERLAY=true ;;
 	-tmpfs)		FSTYP=tmpfs ;;
common/config +6 -0
index 0c7335a..1ee16f7 100644
@@ -301,6 +301,9 @@ _mount_opts()
 	ceph)
 		export MOUNT_OPTIONS=$CEPHFS_MOUNT_OPTIONS
 		;;
+	glusterfs)
+		export MOUNT_OPTIONS=$GLUSTERFS_MOUNT_OPTIONS
+		;;
 	overlay)
 		export MOUNT_OPTIONS=$OVERLAY_MOUNT_OPTIONS
 		;;
@@ -341,6 +344,9 @@ _test_mount_opts()
 	ceph)
 		export TEST_FS_MOUNT_OPTS=$CEPHFS_MOUNT_OPTIONS
 		;;
+	glusterfs)
+		export TEST_FS_MOUNT_OPTS=$GLUSTERFS_MOUNT_OPTIONS
+		;;
 	*)
 		;;
 	esac
common/rc +32 -2
index d53f679..7185c3f 100644
@@ -167,6 +167,8 @@ case "$FSTYP" in
 	 ;;
     ceph)
 	 ;;
+    glusterfs)
+	 ;;
     overlay)
 	 ;;
     reiser4)
@@ -706,6 +708,9 @@ _test_mkfs()
     ceph)
 	# do nothing for ceph
 	;;
+    glusterfs)
+	# do nothing for glusterfs
+	;;
     overlay)
 	# do nothing for overlay
 	;;
@@ -788,7 +793,7 @@ _scratch_mkfs()
 	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
@@ -1307,7 +1312,8 @@ _fs_type()
     # 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
@@ -1489,6 +1495,15 @@ _check_mounted_on()
 _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
@@ -1568,6 +1583,15 @@ _require_scratch()
 _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
@@ -2421,6 +2445,9 @@ _check_test_fs()
     ceph)
 	# no way to check consistency for CephFS
 	;;
+    glusterfs)
+	# no way to check consistency for GlusterFS
+	;;
     overlay)
 	# no way to check consistency for overlay
 	;;
@@ -2468,6 +2495,9 @@ _check_scratch_fs()
     ceph)
 	# no way to check consistency for CephFS
 	;;
+    glusterfs)
+	# no way to check consistency for GlusterFS
+	;;
     overlay)
 	# no way to check consistency for overlay
 	;;
Signature · 1 line
2.7.4
author
#1 lore raw
Quoted 76 lines · Zorro Lang

Add basic GlusterFS support. Neither new GlusterFS specific tests nor related patches are included. Only support FSTYP=glusterfs or check -glusterfs XXX.

To test on glusterfs, two gluster volumes and two mountpoint directories are needed.

---

Hi glusterfs developers,

Recently some people cares about testing kernel FUSE by running xfstests. We can't test FUSE independently, we must depend upon someone real FS base on FUSE, e.g. GlusterFS.

This patch only want to run xfstests on glusterfs, but I haven't made sure if there's no case bugs for glusterfs. I think that's another problem which I will fix in later patches.

At first I prepare two gluster volumes and two directories, then set into xfstests/local.config.

[root@ibm-x3650m4-10 xfstests-dev]# cat local.config TEST_DIR=/mnt/gluster/test TEST_DEV=ibm-xxxx-xx.redhat.com:testvol SCRATCH_MNT=/mnt/gluster/scratch SCRATCH_DEV=ibm-xxxx-xx.redhat.com:scratchvol

(feel free to set MOUNT_OPTIONS, or GLUSTERFS_MOUNT_OPTIONS)

Then I ran some generic cases, e.g. g/001 and g/117, one test on TEST_DEV, and the other run on SCRATCH_DEV:

[root@ibm-x3650m4-10 xfstests-dev]# ./check -glusterfs generic/001

FSTYP         -- glusterfs
PLATFORM      -- Linux/x86_64 ibm-x3650m4-10 3.10.0-581.el7.x86_64
MKFS_OPTIONS  -- ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol

MOUNT_OPTIONS -- -o context=system_u:object_r:nfs_t:s0 ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol /mnt/gluster/scratch

generic/001 9s ... 8s
Ran: generic/001
Passed all 1 tests

[root@ibm-x3650m4-10 xfstests-dev]# ./check -glusterfs generic/117

FSTYP         -- glusterfs
PLATFORM      -- Linux/x86_64 ibm-x3650m4-10 3.10.0-581.el7.x86_64
MKFS_OPTIONS  -- ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol

MOUNT_OPTIONS -- -o context=system_u:object_r:nfs_t:s0 ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol /mnt/gluster/scratch

generic/117 24s ... 24s
Ran: generic/117
Passed all 1 tests

The results look good. But there're some cases fails on glusterfs, I think that's case problem or glusterfs problems. I'll look into them in the future.

I only know how to use "mount -t glusterfs XXXX:vol /mnt", if you have any other requirements or suggestions, please tell me. Welcome send more patches to fstests@ mail list:)

Thanks,
Zorro

 README.config-sections |  7 +++++++
 check                  |  2 ++
 common/config          |  6 ++++++
 common/rc              | 34 ++++++++++++++++++++++++++++++++--
 4 files changed, 47 insertions(+), 2 deletions(-)
README.config-sections +0 -0
index df7c929..9133997 100644

README.config-sections TEST_DIR=/mnt/test · line 129

Quoted 9 lines
README.config-sections +6 -0
@@ -121,3 +121,10 @@ TEST_DIR=/mnt/test
 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_DIR=/mnt/gluster/scratch

Sorry, there's a mistake, SCRATCH_DIR should be SCRATCH_MNT. I'll fix it if glusterfs team has more suggestions after review.

Thanks,
Zorro

Quoted 146 lines
README.config-sections +1 -0
+SCRATCH_DEV=192.168.1.1:scratchvol
check +2 -0
index c2c22e2..2fcf385 100755
@@ -65,6 +65,7 @@ usage()
 
 check options
     -nfs                test NFS
+    -glusterfs                test GlusterFS
     -cifs               test CIFS
     -overlay		test overlay
     -tmpfs              test TMPFS
@@ -260,6 +261,7 @@ while [ $# -gt 0 ]; do
 	-\? | -h | --help) usage ;;
 
 	-nfs)		FSTYP=nfs ;;
+	-glusterfs)	FSTYP=glusterfs ;;
 	-cifs)		FSTYP=cifs ;;
 	-overlay)	FSTYP=overlay; export OVERLAY=true ;;
 	-tmpfs)		FSTYP=tmpfs ;;
common/config +6 -0
index 0c7335a..1ee16f7 100644
@@ -301,6 +301,9 @@ _mount_opts()
 	ceph)
 		export MOUNT_OPTIONS=$CEPHFS_MOUNT_OPTIONS
 		;;
+	glusterfs)
+		export MOUNT_OPTIONS=$GLUSTERFS_MOUNT_OPTIONS
+		;;
 	overlay)
 		export MOUNT_OPTIONS=$OVERLAY_MOUNT_OPTIONS
 		;;
@@ -341,6 +344,9 @@ _test_mount_opts()
 	ceph)
 		export TEST_FS_MOUNT_OPTS=$CEPHFS_MOUNT_OPTIONS
 		;;
+	glusterfs)
+		export TEST_FS_MOUNT_OPTS=$GLUSTERFS_MOUNT_OPTIONS
+		;;
 	*)
 		;;
 	esac
common/rc +32 -2
index d53f679..7185c3f 100644
@@ -167,6 +167,8 @@ case "$FSTYP" in
 	 ;;
     ceph)
 	 ;;
+    glusterfs)
+	 ;;
     overlay)
 	 ;;
     reiser4)
@@ -706,6 +708,9 @@ _test_mkfs()
     ceph)
 	# do nothing for ceph
 	;;
+    glusterfs)
+	# do nothing for glusterfs
+	;;
     overlay)
 	# do nothing for overlay
 	;;
@@ -788,7 +793,7 @@ _scratch_mkfs()
 	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
@@ -1307,7 +1312,8 @@ _fs_type()
     # 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
@@ -1489,6 +1495,15 @@ _check_mounted_on()
 _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
@@ -1568,6 +1583,15 @@ _require_scratch()
 _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
@@ -2421,6 +2445,9 @@ _check_test_fs()
     ceph)
 	# no way to check consistency for CephFS
 	;;
+    glusterfs)
+	# no way to check consistency for GlusterFS
+	;;
     overlay)
 	# no way to check consistency for overlay
 	;;
@@ -2468,6 +2495,9 @@ _check_scratch_fs()
     ceph)
 	# no way to check consistency for CephFS
 	;;
+    glusterfs)
+	# no way to check consistency for GlusterFS
+	;;
     overlay)
 	# no way to check consistency for overlay
 	;;
Signature · 6 lines
2.7.4

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#2 lore raw
In reply to Zorro Lang
Quoted 50 lines · Zorro Lang

Add basic GlusterFS support. Neither new GlusterFS specific tests nor related patches are included. Only support FSTYP=glusterfs or check -glusterfs XXX.

To test on glusterfs, two gluster volumes and two mountpoint directories are needed.

---

Hi glusterfs developers,

Recently some people cares about testing kernel FUSE by running xfstests. We can't test FUSE independently, we must depend upon someone real FS base on FUSE, e.g. GlusterFS.

This patch only want to run xfstests on glusterfs, but I haven't made sure if there's no case bugs for glusterfs. I think that's another problem which I will fix in later patches.

At first I prepare two gluster volumes and two directories, then set into xfstests/local.config.

[root@ibm-x3650m4-10 xfstests-dev]# cat local.config TEST_DIR=/mnt/gluster/test TEST_DEV=ibm-xxxx-xx.redhat.com:testvol SCRATCH_MNT=/mnt/gluster/scratch SCRATCH_DEV=ibm-xxxx-xx.redhat.com:scratchvol

(feel free to set MOUNT_OPTIONS, or GLUSTERFS_MOUNT_OPTIONS)

Then I ran some generic cases, e.g. g/001 and g/117, one test on TEST_DEV, and the other run on SCRATCH_DEV:

[root@ibm-x3650m4-10 xfstests-dev]# ./check -glusterfs generic/001

FSTYP         -- glusterfs
PLATFORM      -- Linux/x86_64 ibm-x3650m4-10 3.10.0-581.el7.x86_64
MKFS_OPTIONS  -- ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol

MOUNT_OPTIONS -- -o context=system_u:object_r:nfs_t:s0 ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol /mnt/gluster/scratch

generic/001 9s ... 8s
Ran: generic/001
Passed all 1 tests

[root@ibm-x3650m4-10 xfstests-dev]# ./check -glusterfs generic/117

FSTYP         -- glusterfs
PLATFORM      -- Linux/x86_64 ibm-x3650m4-10 3.10.0-581.el7.x86_64
MKFS_OPTIONS  -- ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol

MOUNT_OPTIONS -- -o context=system_u:object_r:nfs_t:s0 ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol /mnt/gluster/scratch

Quoted 7 lines

generic/117 24s ... 24s
Ran: generic/117
Passed all 1 tests

The results look good. But there're some cases fails on glusterfs, I think that's case problem or glusterfs problems. I'll look into them in the future.

Looks fine to me. I tested with quick group and noticed some failures too, but I agreed we can fix them later if they're fstests bugs.

I tend to merge this patch in this week's update, unless there're more comments from glusterfs community.

Quoted 19 lines

I only know how to use "mount -t glusterfs XXXX:vol /mnt", if you have any other requirements or suggestions, please tell me. Welcome send more patches to fstests@ mail list:)

Thanks,
Zorro

 README.config-sections |  7 +++++++
 check                  |  2 ++
 common/config          |  6 ++++++
 common/rc              | 34 ++++++++++++++++++++++++++++++++--
 4 files changed, 47 insertions(+), 2 deletions(-)
README.config-sections +0 -0
index df7c929..9133997 100644

README.config-sections TEST_DIR=/mnt/test · line 129

Quoted 9 lines
README.config-sections +6 -0
@@ -121,3 +121,10 @@ TEST_DIR=/mnt/test
 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_DIR=/mnt/gluster/scratch

s/SCRATCH_DIR/SCRATCH_MNT/ , I can fix it at commit time.

Thanks,
Eryu

Reviewed-by on v2 1/1
#3 lore raw
In reply to Zorro Lang
Quoted 76 lines · Zorro Lang

Add basic GlusterFS support. Neither new GlusterFS specific tests nor related patches are included. Only support FSTYP=glusterfs or check -glusterfs XXX.

To test on glusterfs, two gluster volumes and two mountpoint directories are needed.

---

Hi glusterfs developers,

Recently some people cares about testing kernel FUSE by running xfstests. We can't test FUSE independently, we must depend upon someone real FS base on FUSE, e.g. GlusterFS.

This patch only want to run xfstests on glusterfs, but I haven't made sure if there's no case bugs for glusterfs. I think that's another problem which I will fix in later patches.

At first I prepare two gluster volumes and two directories, then set into xfstests/local.config.

[root@ibm-x3650m4-10 xfstests-dev]# cat local.config TEST_DIR=/mnt/gluster/test TEST_DEV=ibm-xxxx-xx.redhat.com:testvol SCRATCH_MNT=/mnt/gluster/scratch SCRATCH_DEV=ibm-xxxx-xx.redhat.com:scratchvol

(feel free to set MOUNT_OPTIONS, or GLUSTERFS_MOUNT_OPTIONS)

Then I ran some generic cases, e.g. g/001 and g/117, one test on TEST_DEV, and the other run on SCRATCH_DEV:

[root@ibm-x3650m4-10 xfstests-dev]# ./check -glusterfs generic/001

FSTYP         -- glusterfs
PLATFORM      -- Linux/x86_64 ibm-x3650m4-10 3.10.0-581.el7.x86_64
MKFS_OPTIONS  -- ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol

MOUNT_OPTIONS -- -o context=system_u:object_r:nfs_t:s0 ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol /mnt/gluster/scratch

generic/001 9s ... 8s
Ran: generic/001
Passed all 1 tests

[root@ibm-x3650m4-10 xfstests-dev]# ./check -glusterfs generic/117

FSTYP         -- glusterfs
PLATFORM      -- Linux/x86_64 ibm-x3650m4-10 3.10.0-581.el7.x86_64
MKFS_OPTIONS  -- ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol

MOUNT_OPTIONS -- -o context=system_u:object_r:nfs_t:s0 ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol /mnt/gluster/scratch

generic/117 24s ... 24s
Ran: generic/117
Passed all 1 tests

The results look good. But there're some cases fails on glusterfs, I think that's case problem or glusterfs problems. I'll look into them in the future.

I only know how to use "mount -t glusterfs XXXX:vol /mnt", if you have any other requirements or suggestions, please tell me. Welcome send more patches to fstests@ mail list:)

Thanks,
Zorro

 README.config-sections |  7 +++++++
 check                  |  2 ++
 common/config          |  6 ++++++
 common/rc              | 34 ++++++++++++++++++++++++++++++++--
 4 files changed, 47 insertions(+), 2 deletions(-)
README.config-sections +0 -0
index df7c929..9133997 100644

README.config-sections TEST_DIR=/mnt/test · line 130

Quoted 10 lines
README.config-sections +7 -0
@@ -121,3 +121,10 @@ TEST_DIR=/mnt/test
 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_DIR=/mnt/gluster/scratch
+SCRATCH_DEV=192.168.1.1:scratchvol

We mostly use the format of 192.168.1.1:/testvol, matching the way NFS mounts an export. That is not required though, and the notation used here is valid as well.

Looks good to me - once the SCRATCH_DIR/MNT error has been corrected.

Quoted 145 lines
check +2 -0
index c2c22e2..2fcf385 100755
@@ -65,6 +65,7 @@ usage()
 
 check options
     -nfs                test NFS
+    -glusterfs                test GlusterFS
     -cifs               test CIFS
     -overlay		test overlay
     -tmpfs              test TMPFS
@@ -260,6 +261,7 @@ while [ $# -gt 0 ]; do
 	-\? | -h | --help) usage ;;
 
 	-nfs)		FSTYP=nfs ;;
+	-glusterfs)	FSTYP=glusterfs ;;
 	-cifs)		FSTYP=cifs ;;
 	-overlay)	FSTYP=overlay; export OVERLAY=true ;;
 	-tmpfs)		FSTYP=tmpfs ;;
common/config +6 -0
index 0c7335a..1ee16f7 100644
@@ -301,6 +301,9 @@ _mount_opts()
 	ceph)
 		export MOUNT_OPTIONS=$CEPHFS_MOUNT_OPTIONS
 		;;
+	glusterfs)
+		export MOUNT_OPTIONS=$GLUSTERFS_MOUNT_OPTIONS
+		;;
 	overlay)
 		export MOUNT_OPTIONS=$OVERLAY_MOUNT_OPTIONS
 		;;
@@ -341,6 +344,9 @@ _test_mount_opts()
 	ceph)
 		export TEST_FS_MOUNT_OPTS=$CEPHFS_MOUNT_OPTIONS
 		;;
+	glusterfs)
+		export TEST_FS_MOUNT_OPTS=$GLUSTERFS_MOUNT_OPTIONS
+		;;
 	*)
 		;;
 	esac
common/rc +32 -2
index d53f679..7185c3f 100644
@@ -167,6 +167,8 @@ case "$FSTYP" in
 	 ;;
     ceph)
 	 ;;
+    glusterfs)
+	 ;;
     overlay)
 	 ;;
     reiser4)
@@ -706,6 +708,9 @@ _test_mkfs()
     ceph)
 	# do nothing for ceph
 	;;
+    glusterfs)
+	# do nothing for glusterfs
+	;;
     overlay)
 	# do nothing for overlay
 	;;
@@ -788,7 +793,7 @@ _scratch_mkfs()
 	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
@@ -1307,7 +1312,8 @@ _fs_type()
     # 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
@@ -1489,6 +1495,15 @@ _check_mounted_on()
 _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
@@ -1568,6 +1583,15 @@ _require_scratch()
 _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
@@ -2421,6 +2445,9 @@ _check_test_fs()
     ceph)
 	# no way to check consistency for CephFS
 	;;
+    glusterfs)
+	# no way to check consistency for GlusterFS
+	;;
     overlay)
 	# no way to check consistency for overlay
 	;;
@@ -2468,6 +2495,9 @@ _check_scratch_fs()
     ceph)
 	# no way to check consistency for CephFS
 	;;
+    glusterfs)
+	# no way to check consistency for GlusterFS
+	;;
     overlay)
 	# no way to check consistency for overlay
 	;;
Signature · 6 lines
2.7.4

_______________________________________________
Gluster-devel mailing list
[email protected]
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.gluster.org_mailman_listinfo_gluster-2Ddevel&d=DwIBAg&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=-yMrTV4jriXR7ieyzzjV-QgHBD0UDw8ixoR77aMeAHE&m=-BW_Hqz8Ac8ilrKJdRLWDZUvO7_ellC3xhZZJIUHyDE&s=C1WbwwLebHGlTep8ILPn1S5yrtuME2zwAg3pE7Yyb5Y&e= 

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at https://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=DwIBAg&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=-yMrTV4jriXR7ieyzzjV-QgHBD0UDw8ixoR77aMeAHE&m=-BW_Hqz8Ac8ilrKJdRLWDZUvO7_ellC3xhZZJIUHyDE&s=yqti27StP5ujY4--danDqRL5eayU_7MEuIW8L0SKxMI&e=

author
#4 lore raw
Quoted 81 lines · Niels de Vos
Quoted 80 lines · Zorro Lang

Add basic GlusterFS support. Neither new GlusterFS specific tests nor related patches are included. Only support FSTYP=glusterfs or check -glusterfs XXX.

To test on glusterfs, two gluster volumes and two mountpoint directories are needed.

---

Hi glusterfs developers,

Recently some people cares about testing kernel FUSE by running xfstests. We can't test FUSE independently, we must depend upon someone real FS base on FUSE, e.g. GlusterFS.

This patch only want to run xfstests on glusterfs, but I haven't made sure if there's no case bugs for glusterfs. I think that's another problem which I will fix in later patches.

At first I prepare two gluster volumes and two directories, then set into xfstests/local.config.

[root@ibm-x3650m4-10 xfstests-dev]# cat local.config TEST_DIR=/mnt/gluster/test TEST_DEV=ibm-xxxx-xx.redhat.com:testvol SCRATCH_MNT=/mnt/gluster/scratch SCRATCH_DEV=ibm-xxxx-xx.redhat.com:scratchvol

(feel free to set MOUNT_OPTIONS, or GLUSTERFS_MOUNT_OPTIONS)

Then I ran some generic cases, e.g. g/001 and g/117, one test on TEST_DEV, and the other run on SCRATCH_DEV:

[root@ibm-x3650m4-10 xfstests-dev]# ./check -glusterfs generic/001

FSTYP         -- glusterfs
PLATFORM      -- Linux/x86_64 ibm-x3650m4-10 3.10.0-581.el7.x86_64
MKFS_OPTIONS  -- ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol

MOUNT_OPTIONS -- -o context=system_u:object_r:nfs_t:s0 ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol /mnt/gluster/scratch

generic/001 9s ... 8s
Ran: generic/001
Passed all 1 tests

[root@ibm-x3650m4-10 xfstests-dev]# ./check -glusterfs generic/117

FSTYP         -- glusterfs
PLATFORM      -- Linux/x86_64 ibm-x3650m4-10 3.10.0-581.el7.x86_64
MKFS_OPTIONS  -- ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol

MOUNT_OPTIONS -- -o context=system_u:object_r:nfs_t:s0 ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol /mnt/gluster/scratch

generic/117 24s ... 24s
Ran: generic/117
Passed all 1 tests

The results look good. But there're some cases fails on glusterfs, I think that's case problem or glusterfs problems. I'll look into them in the future.

I only know how to use "mount -t glusterfs XXXX:vol /mnt", if you have any other requirements or suggestions, please tell me. Welcome send more patches to fstests@ mail list:)

Thanks,
Zorro

 README.config-sections |  7 +++++++
 check                  |  2 ++
 common/config          |  6 ++++++
 common/rc              | 34 ++++++++++++++++++++++++++++++++--
 4 files changed, 47 insertions(+), 2 deletions(-)
README.config-sections +1 -0
index df7c929..9133997 100644
@@ -121,3 +121,10 @@ TEST_DIR=/mnt/test
 TEST_DEV=192.168.14.1:6789:/
 TEST_FS_MOUNT_OPTS="-o name=admin,secret=AQDuEBtYKEYRINGSECRETriSC8YJGDZsQHcr7g=="
 FSTYP="ceph"
+
Quoted 8 lines

README.config-sections TEST_DIR=/mnt/test · line 130

Quoted 6 lines
README.config-sections +6 -0
+[glusterfs]
+FSTYP=glusterfs
+TEST_DIR=/mnt/gluster/test
+TEST_DEV=192.168.1.1:testvol
+SCRATCH_DIR=/mnt/gluster/scratch
+SCRATCH_DEV=192.168.1.1:scratchvol

We mostly use the format of 192.168.1.1:/testvol, matching the way NFS

Hi Niels,

I limit the DEVICE name format should match "\w:\w", when mount -t glusterfs. That means there's not "/" beside the ":". Do you think I should change this regular expression?

I think you only use "192.168.1.1:/testvol", when you do mount -t nfs, right?

Thanks,
Zorro

Quoted 149 lines

mounts an export. That is not required though, and the notation used here is valid as well.

Looks good to me - once the SCRATCH_DIR/MNT error has been corrected.

Quoted 141 lines
check +2 -0
index c2c22e2..2fcf385 100755
@@ -65,6 +65,7 @@ usage()
 
 check options
     -nfs                test NFS
+    -glusterfs                test GlusterFS
     -cifs               test CIFS
     -overlay		test overlay
     -tmpfs              test TMPFS
@@ -260,6 +261,7 @@ while [ $# -gt 0 ]; do
 	-\? | -h | --help) usage ;;
 
 	-nfs)		FSTYP=nfs ;;
+	-glusterfs)	FSTYP=glusterfs ;;
 	-cifs)		FSTYP=cifs ;;
 	-overlay)	FSTYP=overlay; export OVERLAY=true ;;
 	-tmpfs)		FSTYP=tmpfs ;;
common/config +6 -0
index 0c7335a..1ee16f7 100644
@@ -301,6 +301,9 @@ _mount_opts()
 	ceph)
 		export MOUNT_OPTIONS=$CEPHFS_MOUNT_OPTIONS
 		;;
+	glusterfs)
+		export MOUNT_OPTIONS=$GLUSTERFS_MOUNT_OPTIONS
+		;;
 	overlay)
 		export MOUNT_OPTIONS=$OVERLAY_MOUNT_OPTIONS
 		;;
@@ -341,6 +344,9 @@ _test_mount_opts()
 	ceph)
 		export TEST_FS_MOUNT_OPTS=$CEPHFS_MOUNT_OPTIONS
 		;;
+	glusterfs)
+		export TEST_FS_MOUNT_OPTS=$GLUSTERFS_MOUNT_OPTIONS
+		;;
 	*)
 		;;
 	esac
common/rc +32 -2
index d53f679..7185c3f 100644
@@ -167,6 +167,8 @@ case "$FSTYP" in
 	 ;;
     ceph)
 	 ;;
+    glusterfs)
+	 ;;
     overlay)
 	 ;;
     reiser4)
@@ -706,6 +708,9 @@ _test_mkfs()
     ceph)
 	# do nothing for ceph
 	;;
+    glusterfs)
+	# do nothing for glusterfs
+	;;
     overlay)
 	# do nothing for overlay
 	;;
@@ -788,7 +793,7 @@ _scratch_mkfs()
 	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
@@ -1307,7 +1312,8 @@ _fs_type()
     # 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
@@ -1489,6 +1495,15 @@ _check_mounted_on()
 _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
@@ -1568,6 +1583,15 @@ _require_scratch()
 _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
@@ -2421,6 +2445,9 @@ _check_test_fs()
     ceph)
 	# no way to check consistency for CephFS
 	;;
+    glusterfs)
+	# no way to check consistency for GlusterFS
+	;;
     overlay)
 	# no way to check consistency for overlay
 	;;
@@ -2468,6 +2495,9 @@ _check_scratch_fs()
     ceph)
 	# no way to check consistency for CephFS
 	;;
+    glusterfs)
+	# no way to check consistency for GlusterFS
+	;;
     overlay)
 	# no way to check consistency for overlay
 	;;
Signature · 1 line
2.7.4
Quoted 4 lines
Quoted 4 lines

_______________________________________________
Gluster-devel mailing list
[email protected]
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.gluster.org_mailman_listinfo_gluster-2Ddevel&d=DwIBAg&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=-yMrTV4jriXR7ieyzzjV-QgHBD0UDw8ixoR77aMeAHE&m=hGC8uUdZnuP7H5-v6feM94LqEG3jZkJfO5JJl-FQ6dI&s=lJ-Facq1IjOkcHdBrgbCnEvAzghUc3KLatT8RvX-ylk&e=

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at https://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=DwIBAg&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=-yMrTV4jriXR7ieyzzjV-QgHBD0UDw8ixoR77aMeAHE&m=hGC8uUdZnuP7H5-v6feM94LqEG3jZkJfO5JJl-FQ6dI&s=t7CW2y9_t2Ixno8R4Zvjt1hEnrglAYaWlXdeWiZoiqE&e=

#5 lore raw
Quoted 91 lines · Zorro Lang
Quoted 81 lines · Niels de Vos
Quoted 80 lines · Zorro Lang

Add basic GlusterFS support. Neither new GlusterFS specific tests nor related patches are included. Only support FSTYP=glusterfs or check -glusterfs XXX.

To test on glusterfs, two gluster volumes and two mountpoint directories are needed.

---

Hi glusterfs developers,

Recently some people cares about testing kernel FUSE by running xfstests. We can't test FUSE independently, we must depend upon someone real FS base on FUSE, e.g. GlusterFS.

This patch only want to run xfstests on glusterfs, but I haven't made sure if there's no case bugs for glusterfs. I think that's another problem which I will fix in later patches.

At first I prepare two gluster volumes and two directories, then set into xfstests/local.config.

[root@ibm-x3650m4-10 xfstests-dev]# cat local.config TEST_DIR=/mnt/gluster/test TEST_DEV=ibm-xxxx-xx.redhat.com:testvol SCRATCH_MNT=/mnt/gluster/scratch SCRATCH_DEV=ibm-xxxx-xx.redhat.com:scratchvol

(feel free to set MOUNT_OPTIONS, or GLUSTERFS_MOUNT_OPTIONS)

Then I ran some generic cases, e.g. g/001 and g/117, one test on TEST_DEV, and the other run on SCRATCH_DEV:

[root@ibm-x3650m4-10 xfstests-dev]# ./check -glusterfs generic/001

FSTYP         -- glusterfs
PLATFORM      -- Linux/x86_64 ibm-x3650m4-10 3.10.0-581.el7.x86_64
MKFS_OPTIONS  -- ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol

MOUNT_OPTIONS -- -o context=system_u:object_r:nfs_t:s0 ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol /mnt/gluster/scratch

generic/001 9s ... 8s
Ran: generic/001
Passed all 1 tests

[root@ibm-x3650m4-10 xfstests-dev]# ./check -glusterfs generic/117

FSTYP         -- glusterfs
PLATFORM      -- Linux/x86_64 ibm-x3650m4-10 3.10.0-581.el7.x86_64
MKFS_OPTIONS  -- ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol

MOUNT_OPTIONS -- -o context=system_u:object_r:nfs_t:s0 ibm-x3650m4-10.rhts.eng.pek2.redhat.com:scratchvol /mnt/gluster/scratch

generic/117 24s ... 24s
Ran: generic/117
Passed all 1 tests

The results look good. But there're some cases fails on glusterfs, I think that's case problem or glusterfs problems. I'll look into them in the future.

I only know how to use "mount -t glusterfs XXXX:vol /mnt", if you have any other requirements or suggestions, please tell me. Welcome send more patches to fstests@ mail list:)

Thanks,
Zorro

 README.config-sections |  7 +++++++
 check                  |  2 ++
 common/config          |  6 ++++++
 common/rc              | 34 ++++++++++++++++++++++++++++++++--
 4 files changed, 47 insertions(+), 2 deletions(-)
README.config-sections +1 -0
index df7c929..9133997 100644
@@ -121,3 +121,10 @@ TEST_DIR=/mnt/test
 TEST_DEV=192.168.14.1:6789:/
 TEST_FS_MOUNT_OPTS="-o name=admin,secret=AQDuEBtYKEYRINGSECRETriSC8YJGDZsQHcr7g=="
 FSTYP="ceph"
+
Quoted 8 lines

README.config-sections TEST_DIR=/mnt/test · line 130

Quoted 6 lines
README.config-sections +6 -0
+[glusterfs]
+FSTYP=glusterfs
+TEST_DIR=/mnt/gluster/test
+TEST_DEV=192.168.1.1:testvol
+SCRATCH_DIR=/mnt/gluster/scratch
+SCRATCH_DEV=192.168.1.1:scratchvol

We mostly use the format of 192.168.1.1:/testvol, matching the way NFS

Quoted 5 lines

Hi Niels,

I limit the DEVICE name format should match "\w:\w", when mount -t glusterfs. That means there's not "/" beside the ":". Do you think I should change this regular expression?

Yes, it would be good to have an optional "/" after the ":". It is not required, but would probably help when someone runs the tests with the "hostname:/volume" device format.

Quoted 2 lines

I think you only use "192.168.1.1:/testvol", when you do mount -t nfs, right?

Yes, I am pretty sure NFS expects the "/" after the ":". This counts for any NFS servers that use Gluster on the backend as well.

Thanks,
Niels

Quoted 152 lines

Thanks,
Zorro

Quoted 149 lines

mounts an export. That is not required though, and the notation used here is valid as well.

Looks good to me - once the SCRATCH_DIR/MNT error has been corrected.

Quoted 141 lines
check +2 -0
index c2c22e2..2fcf385 100755
@@ -65,6 +65,7 @@ usage()
 
 check options
     -nfs                test NFS
+    -glusterfs                test GlusterFS
     -cifs               test CIFS
     -overlay		test overlay
     -tmpfs              test TMPFS
@@ -260,6 +261,7 @@ while [ $# -gt 0 ]; do
 	-\? | -h | --help) usage ;;
 
 	-nfs)		FSTYP=nfs ;;
+	-glusterfs)	FSTYP=glusterfs ;;
 	-cifs)		FSTYP=cifs ;;
 	-overlay)	FSTYP=overlay; export OVERLAY=true ;;
 	-tmpfs)		FSTYP=tmpfs ;;
common/config +6 -0
index 0c7335a..1ee16f7 100644
@@ -301,6 +301,9 @@ _mount_opts()
 	ceph)
 		export MOUNT_OPTIONS=$CEPHFS_MOUNT_OPTIONS
 		;;
+	glusterfs)
+		export MOUNT_OPTIONS=$GLUSTERFS_MOUNT_OPTIONS
+		;;
 	overlay)
 		export MOUNT_OPTIONS=$OVERLAY_MOUNT_OPTIONS
 		;;
@@ -341,6 +344,9 @@ _test_mount_opts()
 	ceph)
 		export TEST_FS_MOUNT_OPTS=$CEPHFS_MOUNT_OPTIONS
 		;;
+	glusterfs)
+		export TEST_FS_MOUNT_OPTS=$GLUSTERFS_MOUNT_OPTIONS
+		;;
 	*)
 		;;
 	esac
common/rc +32 -2
index d53f679..7185c3f 100644
@@ -167,6 +167,8 @@ case "$FSTYP" in
 	 ;;
     ceph)
 	 ;;
+    glusterfs)
+	 ;;
     overlay)
 	 ;;
     reiser4)
@@ -706,6 +708,9 @@ _test_mkfs()
     ceph)
 	# do nothing for ceph
 	;;
+    glusterfs)
+	# do nothing for glusterfs
+	;;
     overlay)
 	# do nothing for overlay
 	;;
@@ -788,7 +793,7 @@ _scratch_mkfs()
 	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
@@ -1307,7 +1312,8 @@ _fs_type()
     # 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
@@ -1489,6 +1495,15 @@ _check_mounted_on()
 _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
@@ -1568,6 +1583,15 @@ _require_scratch()
 _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
@@ -2421,6 +2445,9 @@ _check_test_fs()
     ceph)
 	# no way to check consistency for CephFS
 	;;
+    glusterfs)
+	# no way to check consistency for GlusterFS
+	;;
     overlay)
 	# no way to check consistency for overlay
 	;;
@@ -2468,6 +2495,9 @@ _check_scratch_fs()
     ceph)
 	# no way to check consistency for CephFS
 	;;
+    glusterfs)
+	# no way to check consistency for GlusterFS
+	;;
     overlay)
 	# no way to check consistency for overlay
 	;;
Signature · 1 line
2.7.4
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

_______________________________________________
Gluster-devel mailing list
[email protected]
https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.gluster.org_mailman_listinfo_gluster-2Ddevel&d=DwIBAg&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=-yMrTV4jriXR7ieyzzjV-QgHBD0UDw8ixoR77aMeAHE&m=ceNcMcbLaVLtR5VeCP8DTuanEcTPtqzWZ886OHRAX4M&s=1F7y0_BFe93il-mXp-FPiczZ70nxJB835Us7I9R3iq4&e=

--
To unsubscribe from this list: send the line "unsubscribe fstests" in
the body of a message to [email protected]
More majordomo info at https://urldefense.proofpoint.com/v2/url?u=http-3A__vger.kernel.org_majordomo-2Dinfo.html&d=DwIBAg&c=RoP1YumCXCgaWHvlZYR8PQcxBKCX5YTpkKY057SbK10&r=-yMrTV4jriXR7ieyzzjV-QgHBD0UDw8ixoR77aMeAHE&m=ceNcMcbLaVLtR5VeCP8DTuanEcTPtqzWZ886OHRAX4M&s=ySLMN4-fVRFTCQyzaWwO6YkwvHnh_pJeCdX7r9fDLk0&e=