fstests: fix some minor problems testing ocfs2

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>
This commit is contained in:
Darrick J. Wong
2016-11-09 15:00:17 -08:00
committed by Eryu Guan
parent 089ecbf486
commit ea889e3d5c
2 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ _require_quota()
_notrun "Installed kernel does not support quotas" _notrun "Installed kernel does not support quotas"
fi fi
;; ;;
gfs2) gfs2|ocfs2)
;; ;;
xfs) xfs)
if [ ! -f /proc/fs/xfs/xqmstat ]; then if [ ! -f /proc/fs/xfs/xqmstat ]; then
+8 -2
View File
@@ -978,7 +978,7 @@ _scratch_mkfs_sized()
xfs) xfs)
def_blksz=`echo $MKFS_OPTIONS|sed -rn 's/.*-b ?size= ?+([0-9]+).*/\1/p'` 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'` def_blksz=`echo $MKFS_OPTIONS| sed -rn 's/.*-b ?+([0-9]+).*/\1/p'`
;; ;;
esac esac
@@ -1015,6 +1015,9 @@ _scratch_mkfs_sized()
ext2|ext3|ext4|ext4dev) ext2|ext3|ext4|ext4dev)
${MKFS_PROG}.$FSTYP -F $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks ${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) udf)
$MKFS_UDF_PROG $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks $MKFS_UDF_PROG $MKFS_OPTIONS -b $blocksize $SCRATCH_DEV $blocks
;; ;;
@@ -1087,9 +1090,12 @@ _scratch_mkfs_blocksized()
xfs) xfs)
_scratch_mkfs_xfs $MKFS_OPTIONS -b size=$blocksize _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 ${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" _notrun "Filesystem $FSTYP not supported in _scratch_mkfs_blocksized"
;; ;;