[ "$MKFS_F2FS_PROG" = "" ] && _fatal "mkfs.f2fs not found"
;;
nfs)
+ . ./common/nfs
;;
cifs)
;;
;;
pvfs2)
;;
+ ubifs)
+ [ "$UBIUPDATEVOL_PROG" = "" ] && _fatal "ubiupdatevol not found"
+ ;;
esac
if [ ! -z "$REPORT_LIST" ]; then
# do nothing for tmpfs
return 0
;;
+ ubifs)
+ # erase the UBI volume; reformated automatically on next mount
+ $UBIUPDATEVOL_PROG ${SCRATCH_DEV} -t
+ return 0
+ ;;
ext4)
_scratch_mkfs_ext4 $*
return $?
fi
}
+# returns device number if a file is a character device
+#
+_is_char_dev()
+{
+ if [ $# -ne 1 ]; then
+ echo "Usage: _is_char_dev dev" 1>&2
+ exit 1
+ fi
+
+ _dev=$1
+ if [ -L "${_dev}" ]; then
+ _dev=`readlink -f "${_dev}"`
+ fi
+
+ if [ -c "${_dev}" ]; then
+ src/lstat64 "${_dev}" | $AWK_PROG '/Device type:/ { print $9 }'
+ fi
+}
+
# Do a command, log it to $seqres.full, optionally test return status
# and die if command fails. If called with one argument _do executes the
# command, logs it, and returns its exit status. With two arguments _do
_notrun "this test requires a valid \$SCRATCH_MNT and unique $SCRATCH_DEV"
fi
;;
+ ubifs)
+ # ubifs needs an UBI volume. This will be a char device, not a block device.
+ if [ ! -c "$SCRATCH_DEV" ]; then
+ _notrun "this test requires a valid UBI volume for \$SCRATCH_DEV"
+ fi
+ if [ ! -d "$SCRATCH_MNT" ]; then
+ _notrun "this test requires a valid \$SCRATCH_MNT"
+ fi
+ ;;
*)
if [ -z "$SCRATCH_DEV" -o "`_is_block_dev "$SCRATCH_DEV"`" = "" ]
then
_notrun "this test requires a valid \$TEST_DIR and unique $TEST_DEV"
fi
;;
+ ubifs)
+ # ubifs needs an UBI volume. This will be a char device, not a block device.
+ if [ ! -c "$TEST_DEV" ]; then
+ _notrun "this test requires a valid UBI volume for \$TEST_DEV"
+ fi
+ if [ ! -d "$TEST_DIR" ]; then
+ _notrun "this test requires a valid \$TEST_DIR"
+ fi
+ ;;
*)
if [ -z "$TEST_DEV" ] || [ "`_is_block_dev "$TEST_DEV"`" = "" ]
then
fi
}
+# this test requires a path to refere to a local block or character device
+# $1 - device
+_require_local_device()
+{
+ if [ -z "$1" ]; then
+ echo "Usage: _require_local_device <dev>" 1>&2
+ exit 1
+ fi
+ if [ "`_is_block_dev "$1"`" != "" ]; then
+ return 0
+ fi
+ if [ "`_is_char_dev "$1"`" != "" ]; then
+ return 0
+ fi
+ _notrun "require $1 to be local device"
+}
+
# brd based ram disks erase the device when they receive a flush command when no
# active references are present. This causes problems for DM devices sitting on
# top of brd devices as DM doesn't hold active references to the brd device.
_notrun "External device testing in progress, skipped this test"
}
+# this test requires that the kernel supports asynchronous I/O
+_require_aio()
+{
+ $here/src/feature -A
+ case $? in
+ 0)
+ ;;
+ 1)
+ _notrun "kernel does not support asynchronous I/O"
+ ;;
+ *)
+ _fail "unexpected error testing for asynchronous I/O support"
+ ;;
+ esac
+}
+
# this test requires that a (specified) aio-dio executable exists
+# and that the kernel supports asynchronous I/O.
# $1 - command (optional)
#
_require_aiodio()
AIO_TEST=src/aio-dio-regress/$1
[ -x $AIO_TEST ] || _notrun "$AIO_TEST not built"
fi
+ _require_aio
_require_odirect
}
qa_group=$1
fi
_cat_group | grep -q $qa_group
- [ "$?" == "0" ] || _notrun "$qa_group user not defined."
+ [ "$?" == "0" ] || _notrun "$qa_group group not defined."
}
_filter_user_do()
tmpfs)
# no way to check consistency for tmpfs
;;
+ ubifs)
+ # there is no fsck program for ubifs yet
+ ;;
*)
_check_generic_filesystem $TEST_DEV
;;
tmpfs)
# no way to check consistency for tmpfs
;;
+ ubifs)
+ # there is no fsck program for ubifs yet
+ ;;
*)
_check_generic_filesystem $device
;;
fi
case "$FSTYP" in
- ext2|vfat|msdos)
+ ext2|vfat|msdos|udf)
_notrun "$FSTYP does not support metadata journaling"
;;
ext4)