xfstests 241: run parallel dbench
[xfstests-dev.git] / common.config
index ba234ac26444e14cb860814b194c11bfae8cc3f0..04bdcf6b771e0b9eda5b9412fb14627bbcd4306d 100644 (file)
@@ -1,7 +1,21 @@
-##/bin/sh
+##/bin/bash
 #
 # 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.
 #                   mounted XFS file system, needs to be be world
 #                   writeable
 # TEST_DEV -        device for file system containing TEST_DIR
-# SCRATCH_DEV -     device you can make a scratch file system on
-# SCRATCH_MNT -     mount point for scratch file system
 #
 # and optionally:
+# SCRATCH_DEV -     device you can make a scratch file system on
+# SCRATCH_MNT -     mount point for scratch file system
 # SCRATCH_LOGDEV -  scratch log device for external log testing
 # SCRATCH_RTDEV -   scratch rt dev
 # TEST_LOGDEV -     test log device for external log testing
@@ -106,9 +120,6 @@ export UMOUNT_PROG="`set_prog_path umount`"
 export FSSTRESS_PROG="`set_prog_path fsstress $PWD/ltp/fsstress`"
 [ "$FSSTRESS_PROG" = "" ] && _fatal "fsstress not found"
 
-export NSLOOKUP_PROG="`set_prog_path nslookup`"
-[ "$NSLOOKUP_PROG" = "" ] && _fatal "nslookup not found"
-
 export PERL_PROG="`set_prog_path perl`"
 [ "$PERL_PROG" = "" ] && _fatal "perl not found"
 
@@ -138,6 +149,7 @@ export XFS_PARALLEL_REPAIR64_PROG="`set_prog_path xfs_prepair64`"
 export XFSDUMP_PROG="`set_prog_path xfsdump`"
 export XFSRESTORE_PROG="`set_prog_path xfsrestore`"
 export XFSINVUTIL_PROG="`set_prog_path xfsinvutil`"
+export DBENCH_PROG="`set_prog_path dbench`"
 
 # Generate a comparable xfsprogs version number in the form of
 # major * 10000 + minor * 100 + release
@@ -177,28 +189,18 @@ known_hosts()
   [ -f $HOST_CONFIG_DIR/$HOST ]        && . $HOST_CONFIG_DIR/$HOST
   [ -f $HOST_CONFIG_DIR/$HOST.config ] && . $HOST_CONFIG_DIR/$HOST.config
 
+  #  Mandatory Config values.
   MC=""
-#  Non-Mandatory Config values.
-#  [ -z "$MODULAR" ]        && MC="$MC MODULAR"
-#  [ -z "$TEST_LOGDEV" ]    && MC="$MC TEST_LOGDEV"
-#  [ -z "$SCRATCH_LOGDEV" ] && MC="$MC SCRATCH_LOGDEV"
-#  [ -z "$SCRATCH_RTDEV" ]  && MC="$MC SCRATCH_RTDEV"
-
   [ -z "$EMAIL" ]          && MC="$MC EMAIL"
   [ -z "$TEST_DIR" ]       && MC="$MC TEST_DIR"
   [ -z "$TEST_DEV" ]       && MC="$MC TEST_DEV"
 
-  [ -z "$SCRATCH_MNT" ]    && MC="$MC SCRATCH_MNT"
-  [ -z "$SCRATCH_DEV" ]    && MC="$MC SCRATCH_DEV"
-
-  [ "$MC" ] && (echo "Warning: need to define parameters for host $HOST";\
-               echo "       or set variables:"; \
-               echo "       $MC")
-#  if [ -e configs/$HOST.config ]
-#     then echo "Not carring, we have a configfile ($HOST_CONFIG_DIR/$HOST)"
-#  else
-     [ "$MC" ] &&  exit 1
-#  fi
+  if [ -n "$MC" ]; then
+    echo "Warning: need to define parameters for host $HOST"
+    echo "       or set variables:"
+    echo "       $MC"
+    exit 1
+  fi
 }
 
 if [ -f "$HOST_OPTIONS" ]; then
@@ -229,30 +231,5 @@ if [ ! -z "$SCRATCH_MNT" -a ! -d "$SCRATCH_MNT" ]; then
     exit 1
 fi
 
-_readlink()
-{
-    if [ $# -ne 1 ]; then
-        echo "Usage: _readlink filename" 1>&2
-        exit 1
-    fi
-
-    perl -e "\$in=\"$1\";" -e '
-    $lnk = readlink($in);
-    if ($lnk =~ m!^/.*!) {
-        print "$lnk\n";
-    }
-    else {
-        chomp($dir = `dirname $in`);
-        print "$dir/$lnk\n";
-    }'
-}
-
-# if devfs is running expand the full /dev/.. pathname - this is what will be
-# returned by utilities such as mount
-[ -L "$TEST_DEV" ] && TEST_DEV=`_readlink $TEST_DEV`
-[ -L "$SCRATCH_DEV" ] && SCRATCH_DEV=`_readlink $SCRATCH_DEV`
-[ -L "$SCRATCH_LOGDEV" ] && SCRATCH_LOGDEV=`_readlink $SCRATCH_LOGDEV`
-[ -L "$SCRATCH_RTDEV" ] && SCRATCH_RTDEV=`_readlink $SCRATCH_LOGDEV`
-
 # make sure this script returns success
 /bin/true