mirror of
https://github.com/linux-apfs/apfstests.git
synced 2026-05-01 15:01:44 -07:00
xfstests: rename USE_BIG_LOOPFS to be more generic
USE_BIG_LOOPFS is really misnamed - it can be used on real devices just as easily as loop devices. It really means we are testing a large scratch device and that we should enable the special filesystem filling and checking options that enable xfstests to be run sanely on large XFS filesystems. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Rich Johnston <rjohnston@sgi.com> Signed-off-by: Rich Johnston <rjohnston@sgi.com>
This commit is contained in:
committed by
Rich Johnston
parent
520d5c0a85
commit
6089a018e1
@@ -64,7 +64,7 @@ _supported_os IRIX Linux
|
||||
|
||||
_need_to_be_root
|
||||
_require_scratch
|
||||
_require_nobigloopfs
|
||||
_require_no_large_scratch_dev
|
||||
|
||||
rm -f $seq.full
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ _supported_fs generic
|
||||
_supported_os IRIX Linux
|
||||
|
||||
_require_scratch
|
||||
_require_nobigloopfs
|
||||
_require_no_large_scratch_dev
|
||||
|
||||
_scratch_mkfs_sized `expr 50 \* 1024 \* 1024` >/dev/null 2>&1 \
|
||||
|| _fail "mkfs failed"
|
||||
|
||||
@@ -64,8 +64,8 @@ _check_ag()
|
||||
_supported_fs xfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
_require_nobigloopfs
|
||||
_require_scratch
|
||||
_require_no_large_scratch_dev
|
||||
|
||||
DSIZE="-dsize=100m,agcount=6"
|
||||
|
||||
|
||||
@@ -97,8 +97,8 @@ EOF
|
||||
_supported_fs xfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
_require_nobigloopfs
|
||||
_require_scratch
|
||||
_require_no_large_scratch_dev
|
||||
|
||||
# sanity test - default + one root directory entry
|
||||
# Note: must do this proto/mkfs now for later inode size calcs
|
||||
|
||||
@@ -41,8 +41,8 @@ rm -f $seq.full
|
||||
_supported_fs xfs btrfs
|
||||
_supported_os Linux
|
||||
|
||||
_require_nobigloopfs
|
||||
_require_scratch
|
||||
_require_no_large_scratch_dev
|
||||
|
||||
# mkfs.btrfs did not have overwrite detection at first
|
||||
if [ "$FSTYP" == "btrfs" ]; then
|
||||
|
||||
@@ -76,9 +76,9 @@ _filter_bad_ids()
|
||||
# real QA test starts here
|
||||
_supported_fs xfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
_require_nobigloopfs
|
||||
|
||||
_require_scratch
|
||||
_require_no_large_scratch_dev
|
||||
|
||||
# devzero blows away 512byte blocks, so make 512byte inodes (at least)
|
||||
_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
|
||||
|
||||
@@ -50,7 +50,7 @@ _supported_fs xfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
_require_scratch
|
||||
_require_nobigloopfs
|
||||
_require_no_large_scratch_dev
|
||||
umount $SCRATCH_DEV 2>/dev/null
|
||||
|
||||
_fill()
|
||||
|
||||
@@ -60,9 +60,9 @@ _log()
|
||||
echo "--- $*" >> $seq.full
|
||||
}
|
||||
|
||||
_require_nobigloopfs
|
||||
_require_nonexternal
|
||||
_require_scratch
|
||||
_require_no_large_scratch_dev
|
||||
_require_loop
|
||||
_require_ext2
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ _supported_fs generic
|
||||
_supported_os IRIX Linux
|
||||
|
||||
_require_scratch
|
||||
_require_nobigloopfs
|
||||
_require_no_large_scratch_dev
|
||||
|
||||
rm -f $seq.full
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ _cleanup()
|
||||
_supported_fs xfs
|
||||
_supported_os IRIX Linux
|
||||
_require_scratch
|
||||
_require_nobigloopfs
|
||||
_require_no_large_scratch_dev
|
||||
|
||||
MOUNT_OPTIONS="$MOUNT_OPTIONS -o inode64"
|
||||
_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
|
||||
|
||||
@@ -66,8 +66,8 @@ _check_ag()
|
||||
_supported_fs xfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
_require_nobigloopfs
|
||||
_require_scratch
|
||||
_require_no_large_scratch_dev
|
||||
|
||||
DSIZE="-dsize=100m"
|
||||
|
||||
|
||||
@@ -100,8 +100,8 @@ EOF
|
||||
_supported_fs xfs
|
||||
_supported_os IRIX Linux
|
||||
|
||||
_require_nobigloopfs
|
||||
_require_scratch
|
||||
_require_no_large_scratch_dev
|
||||
|
||||
# sanity test - default + one root directory entry
|
||||
# Note: must do this proto/mkfs now for later inode size calcs
|
||||
|
||||
@@ -239,7 +239,7 @@ s/ .*//p
|
||||
;;
|
||||
|
||||
--large-fs)
|
||||
export USE_BIG_LOOPFS=yes
|
||||
export LARGE_SCRATCH_DEV=yes
|
||||
xpand=false
|
||||
;;
|
||||
|
||||
|
||||
@@ -310,7 +310,7 @@ _scratch_mkfs_xfs()
|
||||
cat $tmp_dir.mkfsstd
|
||||
rm -f $tmp_dir.mkfserr $tmp_dir.mkfsstd
|
||||
|
||||
if [ "$USE_BIG_LOOPFS" = yes ]; then
|
||||
if [ "$LARGE_SCRATCH_DEV" = yes ]; then
|
||||
[ -z "$RETAIN_AG_BYTES" ] && RETAIN_AG_BYTES=0
|
||||
./tools/ag-wipe -q -r $RETAIN_AG_BYTES $SCRATCH_DEV
|
||||
fi
|
||||
@@ -437,7 +437,7 @@ _scratch_xfs_repair()
|
||||
SCRATCH_OPTIONS="-l$SCRATCH_LOGDEV"
|
||||
[ "$USE_EXTERNAL" = yes -a ! -z "$SCRATCH_RTDEV" ] && \
|
||||
SCRATCH_OPTIONS=$SCRATCH_OPTIONS" -r$SCRATCH_RTDEV"
|
||||
[ "$USE_BIG_LOOPFS" = yes ] && SCRATCH_OPTIONS=$SCRATCH_OPTIONS" -t"
|
||||
[ "$LARGE_SCRATCH_DEV" = yes ] && SCRATCH_OPTIONS=$SCRATCH_OPTIONS" -t"
|
||||
$XFS_REPAIR_PROG $SCRATCH_OPTIONS $* $SCRATCH_DEV
|
||||
}
|
||||
|
||||
@@ -826,9 +826,9 @@ _require_ext2()
|
||||
|
||||
# this test requires that (large) loopback device files are not in use
|
||||
#
|
||||
_require_nobigloopfs()
|
||||
_require_no_large_scratch_dev()
|
||||
{
|
||||
[ "$USE_BIG_LOOPFS" = yes ] && \
|
||||
[ "$LARGE_SCRATCH_DEV" = yes ] && \
|
||||
_notrun "Large filesystem testing in progress, skipped this test"
|
||||
}
|
||||
|
||||
@@ -1237,7 +1237,7 @@ _check_xfs_filesystem()
|
||||
|
||||
[ "$FSTYP" != xfs ] && return 0
|
||||
testoption=""
|
||||
[ "$USE_BIG_LOOPFS" = yes ] && testoption=-t
|
||||
[ "$LARGE_SCRATCH_DEV" = yes ] && testoption=-t
|
||||
|
||||
type=`_fs_type $device`
|
||||
ok=1
|
||||
@@ -1276,7 +1276,7 @@ _check_xfs_filesystem()
|
||||
ok=0
|
||||
fi
|
||||
# repair doesn't scale massively at this stage, optionally skip it for now
|
||||
[ "$USE_BIG_LOOPFS" = yes ] || \
|
||||
[ "$LARGE_SCRATCH_DEV" = yes ] || \
|
||||
$XFS_REPAIR_PROG -n $extra_log_options $extra_rt_options $device >$tmp.repair 2>&1
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
|
||||
@@ -23,7 +23,7 @@ fi
|
||||
|
||||
[ "$USE_EXTERNAL" = yes ] || USE_EXTERNAL=no
|
||||
[ "$USE_LBD_PATCH" = yes ] || USE_LBD_PATCH=no
|
||||
[ "$USE_BIG_LOOPFS" = yes ] || USE_BIG_LOOPFS=no
|
||||
[ "$LARGE_SCRATCH_DEV" = yes ] || LARGE_SCRATCH_DEV=no
|
||||
[ "$USE_ATTR_SECURE" = yes ] || USE_ATTR_SECURE=no
|
||||
[ -z "$FSTYP" ] && FSTYP="xfs"
|
||||
|
||||
@@ -31,5 +31,6 @@ cat <<EOF
|
||||
TEST: DIR=$TEST_DIR DEV=$TEST_DEV rt=[$TEST_RTDEV] log=[$TEST_LOGDEV]
|
||||
TAPE: dev=[$TAPE_DEV] rmt=[$RMT_TAPE_DEV] rmtirix=[$RMT_TAPE_USER@$RMT_IRIXTAPE_DEV]
|
||||
SCRATCH: MNT=$SCRATCH_MNT DEV=$SCRATCH_DEV rt=[$SCRATCH_RTDEV] log=[$SCRATCH_LOGDEV]
|
||||
VARIABLES: external=$USE_EXTERNAL largeblk=$USE_LBD_PATCH fstyp=$FSTYP bigloopfs=$USE_BIG_LOOPFS attrsecure=$USE_ATTR_SECURE
|
||||
VARIABLES: external=$USE_EXTERNAL largeblk=$USE_LBD_PATCH fstyp=$FSTYP
|
||||
large_scratch_dev=$LARGE_SCRATCH_DEV attrsecure=$USE_ATTR_SECURE
|
||||
EOF
|
||||
|
||||
Reference in New Issue
Block a user