-overlay test overlay
-pvfs2 test PVFS2
-tmpfs test TMPFS
+ -ubifs test ubifs
-l line mode diff
-udiff show unified diff (default)
-n show me, do not run tests
-overlay) FSTYP=overlay; export OVERLAY=true ;;
-pvfs2) FSTYP=pvfs2 ;;
-tmpfs) FSTYP=tmpfs ;;
+ -ubifs) FSTYP=ubifs ;;
-g) group=$2 ; shift ;
GROUP_LIST="$GROUP_LIST ${group//,/ }"
export MAN_PROG="`set_prog_path man`"
export NFS4_SETFACL_PROG="`set_prog_path nfs4_setfacl`"
export NFS4_GETFACL_PROG="`set_prog_path nfs4_getfacl`"
+export UBIUPDATEVOL_PROG="`set_prog_path ubiupdatevol`"
# use 'udevadm settle' or 'udevsettle' to wait for lv to be settled.
# newer systems have udevadm command but older systems like RHEL5 don't.
# We need to specify the size at mount, use 1G by default
export MOUNT_OPTIONS="-o size=1G $TMPFS_MOUNT_OPTIONS"
;;
+ ubifs)
+ export MOUNT_OPTIONS=$UBIFS_MOUNT_OPTIONS
+ ;;
*)
;;
esac
return 0
fi
- if [ "$FSTYP" == "overlay" ]; then
+ case "$FSTYP" in
+ overlay)
if [ ! -d "$dev" ]; then
_fatal "common/config: $name ($dev) is not a directory for overlay"
fi
- else
+ ;;
+ ubifs)
+ if [ ! -c "$dev" ]; then
+ _fatal "common/config: $name ($dev) is not a character device"
+ fi
+ ;;
+ *)
_fatal "common/config: $name ($dev) is not a block device or a network filesystem"
- fi
+ esac
}
# check and return a canonical mount point path
;;
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 $?
_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
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
;;