]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
fstests: add orangefs (pvfs2) support
authorMartin Brandenburg <martin@omnibond.com>
Fri, 7 Apr 2017 20:09:43 +0000 (16:09 -0400)
committerEryu Guan <eguan@redhat.com>
Tue, 11 Apr 2017 04:19:28 +0000 (12:19 +0800)
The filesystem was renamed OrangeFS from PVFS2 recently.  The mount
-t type remains pvfs2, so I have used that name throughout despite
the kernel module being named orangefs.

We've been maintaining this as a patch for quite some time.

The easiest way to use is to setup a single server installation with
multiple filesystems orangefs and scratch, put the following in
/etc/xfsqa.config, and run ./check -pvfs2 -g quick.

TEST_DIR=/mnt
TEST_DEV=tcp://server1vm:3334/orangefs
SCRATCH_MNT=/scratch
SCRATCH_DEV=tcp://server1vm:3334/scratch

Signed-off-by: Martin Brandenburg <martin@omnibond.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
check
common/attr
common/rc

diff --git a/check b/check
index 2fcf385f90f2daa034aa19d4a766144c1ac9825e..9cef58b40bb3adec82518c514ecafa9527d61236 100755 (executable)
--- a/check
+++ b/check
@@ -68,6 +68,7 @@ check options
     -glusterfs                test GlusterFS
     -cifs               test CIFS
     -overlay           test overlay
+    -pvfs2          test PVFS2
     -tmpfs              test TMPFS
     -l                 line mode diff
     -udiff             show unified diff (default)
@@ -264,6 +265,7 @@ while [ $# -gt 0 ]; do
        -glusterfs)     FSTYP=glusterfs ;;
        -cifs)          FSTYP=cifs ;;
        -overlay)       FSTYP=overlay; export OVERLAY=true ;;
+       -pvfs2)         FSTYP=pvfs2 ;;
        -tmpfs)         FSTYP=tmpfs ;;
 
        -g)     group=$2 ; shift ;
index 08643e6fec3f7ac3deefe3ea861700d371ba2d36..ac139e618b2a24501393a041bc8b7026a12fe9da 100644 (file)
@@ -254,7 +254,7 @@ _sort_getfattr_output()
 }
 
 # set maximum total attr space based on fs type
-if [ "$FSTYP" == "xfs" -o "$FSTYP" == "udf" ]; then
+if [ "$FSTYP" == "xfs" -o "$FSTYP" == "udf" -o "$FSTYP" == "pvfs2" ]; then
        MAX_ATTRS=1000
 else # Assume max ~1 block of attrs
        BLOCK_SIZE=`_get_block_size $TEST_DIR`
@@ -267,6 +267,8 @@ export MAX_ATTRS
 # Set max attr value size based on fs type
 if [ "$FSTYP" == "xfs" -o "$FSTYP" == "udf" -o "$FSTYP" == "btrfs" ]; then
        MAX_ATTRVAL_SIZE=64
+elif [ "$FSTYP" == "pvfs2" ]; then
+       MAX_ATTRVAL_SIZE=8192
 else # Assume max ~1 block of attrs
        BLOCK_SIZE=`_get_block_size $TEST_DIR`
        # leave a little overhead
index 78a2101f394cd1991e8f95da03fdf8d3554d1beb..d84c83193c6ad88f4858e1d590894c7674826f0a 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -174,6 +174,8 @@ case "$FSTYP" in
     reiser4)
         [ "$MKFS_REISER4_PROG" = "" ] && _fatal "mkfs.reiser4 not found"
         ;;
+    pvfs2)
+       ;;
 esac
 
 if [ ! -z "$REPORT_LIST" ]; then
@@ -714,6 +716,9 @@ _test_mkfs()
     overlay)
        # do nothing for overlay
        ;;
+    pvfs2)
+       # do nothing for pvfs2
+       ;;
     udf)
         $MKFS_UDF_PROG $MKFS_OPTIONS $* $TEST_DEV > /dev/null
        ;;
@@ -738,6 +743,9 @@ _mkfs_dev()
     overlay)
        # do nothing for overlay
        ;;
+    pvfs2)
+       # do nothing for pvfs2
+       ;;
     udf)
         $MKFS_UDF_PROG $MKFS_OPTIONS $* 2>$tmp_dir.mkfserr 1>$tmp_dir.mkfsstd
        ;;
@@ -793,7 +801,7 @@ _scratch_mkfs()
        local mkfs_status
 
        case $FSTYP in
-       nfs*|cifs|ceph|overlay|glusterfs)
+       nfs*|cifs|ceph|overlay|glusterfs|pvfs2)
                # 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
@@ -1513,6 +1521,15 @@ _require_scratch_nocheck()
                        _notrun "this test requires a valid \$SCRATCH_MNT"
                fi
                ;;
+       pvfs2)
+               echo $SCRATCH_DEV | grep -q "://" > /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
+               ;;
        cifs)
                echo $SCRATCH_DEV | grep -q "//" > /dev/null 2>&1
                if [ -z "$SCRATCH_DEV" -o "$?" != "0" ]; then
@@ -1610,6 +1627,15 @@ _require_test()
                     _notrun "this test requires a valid \$TEST_DIR"
                fi
                ;;
+       pvfs2)
+               echo $TEST_DEV | grep -q "://" > /dev/null 2>&1
+               if [ -z "$TEST_DEV" -o "$?" != "0" ]; then
+                       _notrun "this test requires a valid \$TEST_DIR"
+               fi
+               if [ ! -d "$TEST_DIR" ]; then
+                       _notrun "this test requires a valid \$TEST_DIR"
+               fi
+               ;;
        overlay)
                if [ -z "$OVL_BASE_TEST_DIR" -o ! -d "$OVL_BASE_TEST_DIR" ]; then
                        _notrun "this test requires a valid \$TEST_DIR as ovl base dir"
@@ -2451,6 +2477,8 @@ _check_test_fs()
     overlay)
        # no way to check consistency for overlay
        ;;
+    pvfs2)
+       ;;
     udf)
        # do nothing for now
        ;;
@@ -2501,6 +2529,8 @@ _check_scratch_fs()
     overlay)
        # no way to check consistency for overlay
        ;;
+    pvfs2)
+       ;;
     btrfs)
        _check_btrfs_filesystem $device
        ;;