##/bin/bash
-#
+# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2000-2003,2006 Silicon Graphics, Inc. All Rights Reserved.
#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
-#
-#
# setup and check for config parameters, and in particular
#
# EMAIL - email of the script runner.
export DUMP_PROG="$(type -P dump)"
export RESTORE_PROG="$(type -P restore)"
export LVM_PROG="$(type -P lvm)"
+export LSATTR_PROG="$(type -P lsattr)"
export CHATTR_PROG="$(type -P chattr)"
export DEBUGFS_PROG="$(type -P debugfs)"
export UUIDGEN_PROG="$(type -P uuidgen)"
export SETCAP_PROG="$(type -P setcap)"
export GETCAP_PROG="$(type -P getcap)"
export CHECKBASHISMS_PROG="$(type -P checkbashisms)"
+export XFS_INFO_PROG="$(type -P xfs_info)"
+export DUPEREMOVE_PROG="$(type -P duperemove)"
# use 'udevadm settle' or 'udevsettle' to wait for lv to be settled.
# newer systems have udevadm command but older systems like RHEL5 don't.
export BTRFS_UTIL_PROG=$(type -P btrfs)
export BTRFS_SHOW_SUPER_PROG=$(type -P btrfs-show-super)
export BTRFS_CONVERT_PROG=$(type -P btrfs-convert)
- export BTRFS_DEBUG_TREE_PROG=$(type -P btrfs-debug-tree)
+ export BTRFS_TUNE_PROG=$(type -P btrfstune)
export XFS_FSR_PROG=$(type -P xfs_fsr)
export MKFS_NFS_PROG="false"
export MKFS_CIFS_PROG="false"
fi
case "$FSTYP" in
- 9p)
+ 9p|tmpfs)
# 9p mount tags are just plain strings, so anything is allowed
+ # tmpfs doesn't use mount source, ignore
;;
overlay)
if [ ! -d "$dev" ]; then
[ -b "$TEST_DEV" ] || return 0
# Config file may specify base fs type, but we obay -overlay flag
- export OVL_BASE_FSTYP="$FSTYP"
+ [ "$FSTYP" == overlay ] || export OVL_BASE_FSTYP="$FSTYP"
export FSTYP=overlay
# Store original base fs vars
# set default RESULT_BASE
if [ -z "$RESULT_BASE" ]; then
export RESULT_BASE="$here/results/"
+ mkdir -p ${RESULT_BASE}
+ if [ ! -d ${RESULT_BASE} ]; then
+ echo "failed to create results directory $RESULT_BASE"
+ exit 1
+ fi
+ fi
+
+ if [ "$FSTYP" == "tmpfs" ]; then
+ if [ -z "TEST_DEV" ]; then
+ export TEST_DEV=tmpfs_test
+ fi
+ if [ -z "SCRATCH_DEV" ]; then
+ export TEST_DEV=tmpfs_scratch
+ fi
fi
# Mandatory Config values.