]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
fstests: fix some minor problems testing ocfs2
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 9 Nov 2016 23:00:17 +0000 (15:00 -0800)
committerEryu Guan <eguan@redhat.com>
Sun, 13 Nov 2016 06:01:07 +0000 (14:01 +0800)
There are a a few things about ocfs2 tools that need special-casing in
xfstests, so fix them so that we can start testing ocfs2.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
common/quota
common/rc

index 678bc43c83b8b8eb37fe363d056cf951ad258abd..d9bb8d99a27562cefbebde2c61c680217d543187 100644 (file)
@@ -34,7 +34,7 @@ _require_quota()
            _notrun "Installed kernel does not support quotas"
        fi
        ;;
-    gfs2)
+    gfs2|ocfs2)
        ;;
     xfs)
        if [ ! -f /proc/fs/xfs/xqmstat ]; then
index 20675fb991a9fee70487835a16cf3122d99f076a..8c993066597c8d1c30eb4669d9dcd117e7670756 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -978,7 +978,7 @@ _scratch_mkfs_sized()
     xfs)
        def_blksz=`echo $MKFS_OPTIONS|sed -rn 's/.*-b ?size= ?+([0-9]+).*/\1/p'`
        ;;
-    ext2|ext3|ext4|ext4dev|udf|btrfs|reiser4)
+    ext2|ext3|ext4|ext4dev|udf|btrfs|reiser4|ocfs2)
        def_blksz=`echo $MKFS_OPTIONS| sed -rn 's/.*-b ?+([0-9]+).*/\1/p'`
        ;;
     esac
@@ -1015,6 +1015,9 @@ _scratch_mkfs_sized()
     ext2|ext3|ext4|ext4dev)
        ${MKFS_PROG}.$FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
        ;;
+    ocfs2)
+       yes | ${MKFS_PROG}.$FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
+       ;;
     udf)
        $MKFS_UDF_PROG $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
        ;;
@@ -1087,9 +1090,12 @@ _scratch_mkfs_blocksized()
     xfs)
        _scratch_mkfs_xfs $MKFS_OPTIONS -b size=$blocksize
        ;;
-    ext2|ext3|ext4|ocfs2)
+    ext2|ext3|ext4)
        ${MKFS_PROG}.$FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV
        ;;
+    ocfs2)
+       yes | ${MKFS_PROG}.$FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV
+       ;;
     *)
        _notrun "Filesystem $FSTYP not supported in _scratch_mkfs_blocksized"
        ;;