Whamcloud - gitweb
LU-1538 tests: standardize test script init – misc tests 72/36372/13
authorJames Nunez <jnunez@whamcloud.com>
Fri, 4 Oct 2019 15:37:03 +0000 (09:37 -0600)
committerOleg Drokin <green@whamcloud.com>
Sat, 12 Sep 2020 15:45:09 +0000 (15:45 +0000)
Standardize the initial Lustre test script initialization for
clarity and consistency test suites are that are not normally
run during patch and branch testing.

The LUSTRE path is already normalized in init_test_env(), so this
doesn't need to be done in the caller.  Use $(...) subshells instead
of `...` in the affected lines.  Remove NAME, SRCDIR, PATH, MULTIOP,
SETUP, CLEANUP, CHECKSTAT, TMP, SAVE_PWD, variable initialization,
since it is already done in init_test_env() or not needed in the test
scripts.

Remove MACHINEFILE from dom-performance because it is now
included init_test_env().

Move all definitions of ALWAYS_EXCEPT and SLOW to after
init_test_env() and init_logging() and call build_test_filter()
immediately after the ALWAYS_EXCEPT and SLOW definitions.

Test-Parameters: trivial envdefinitions=SLOW=yes,ENABLE_QUOTA=yes \
clientcount=2 osscount=1 ostcount=7 mdscount=1 mdtcount=1 \
austeroptions=-R testlist=lfsck-performance

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes \
clientcount=2 osscount=1 ostcount=7 mdscount=1 mdtcount=1 \
austeroptions=-R testlist=sgpdd-survey

Test-Parameters: envdefinitions=SLOW=yes,ENABLE_QUOTA=yes \
clientcount=2 osscount=1 ostcount=7 mdscount=1 mdtcount=1 \
austeroptions=-R clientselinux testlist=sanity-selinux

Signed-off-by: James Nunez <jnunez@whamcloud.com>
Change-Id: I21280eb10de4d70ec3d7b4d6c8b8e976fb0821cc
Reviewed-on: https://review.whamcloud.com/36372
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Emoly Liu <emoly@whamcloud.com>
Reviewed-by: Wei Liu <sarah@whamcloud.com>
19 files changed:
lustre/tests/dne_sanity.sh
lustre/tests/dom-performance.sh
lustre/tests/large-lun.sh
lustre/tests/lfsck-performance.sh
lustre/tests/mdsrate-create-large.sh
lustre/tests/mdsrate-create-small.sh
lustre/tests/mdsrate-lookup-10dirs.sh
lustre/tests/mdsrate-lookup-1dir.sh
lustre/tests/mdsrate-stat-large.sh
lustre/tests/mdsrate-stat-small.sh
lustre/tests/oos.sh
lustre/tests/oos2.sh
lustre/tests/run-llog.sh
lustre/tests/sanity-gss.sh
lustre/tests/sanity-krb5.sh
lustre/tests/sanity-selinux.sh
lustre/tests/scrub-performance.sh
lustre/tests/setup_kerberos.sh
lustre/tests/sgpdd-survey.sh

index 0c1d640..adce2e7 100644 (file)
@@ -5,24 +5,21 @@
 
 set -e
 
 
 set -e
 
-SRCDIR=$(cd $(dirname $0); echo $PWD)
-PATH=$PWD/$SRCDIR:$SRCDIR:$SRCDIR/../utils:$PATH
+SRCDIR=$(dirname $0)
 
 
-SAVE_PWD=$PWD
-
-LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 init_logging
 
 init_logging
 
+ALWAYS_EXCEPT="$DNE_SANITY_EXCEPT "
+build_test_filter
+
 PARALLEL_RUNS=${PARALLEL_RUNS:-2}
 FAIL_ON_ERROR=false
 
 check_and_setup_lustre
 
 PARALLEL_RUNS=${PARALLEL_RUNS:-2}
 FAIL_ON_ERROR=false
 
 check_and_setup_lustre
 
-build_test_filter
-
 DIR=${DIR:-$MOUNT}
 
 ORIGIN_DIR=$DIR
 DIR=${DIR:-$MOUNT}
 
 ORIGIN_DIR=$DIR
index bf5085e..1dd5a7a 100644 (file)
@@ -7,31 +7,23 @@
 set -e
 
 ONLY=${ONLY:-"$*"}
 set -e
 
 ONLY=${ONLY:-"$*"}
-ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"$DOM_PERFORMANCE_EXCEPT"}
-# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
-
-[ "$SLOW" = "no" ] && EXCEPT_SLOW=""
-
-LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
 
 
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 . $LUSTRE/tests/test-framework.sh
-
 init_test_env $@
 init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 init_logging
 
 init_logging
 
+ALWAYS_EXCEPT="$DOM_PERFORMANCE_EXCEPT"
+build_test_filter
+
 SAVED_FAIL_ON_ERROR=$FAIL_ON_ERROR
 FAIL_ON_ERROR=false
 
 SAVED_DEBUG=$($LCTL get_param -n debug 2> /dev/null)
 
 SAVED_FAIL_ON_ERROR=$FAIL_ON_ERROR
 FAIL_ON_ERROR=false
 
 SAVED_DEBUG=$($LCTL get_param -n debug 2> /dev/null)
 
-
 . $LUSTRE/tests/functions.sh
 . $LUSTRE/tests/functions.sh
-build_test_filter
 check_and_setup_lustre
 
 check_and_setup_lustre
 
-# if MACHINEFILE set and exists -- use it
-MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh)-$(hostname).machines}
 clients=${CLIENTS:-$HOSTNAME}
 generate_machine_file $clients $MACHINEFILE ||
        error "Failed to generate machine file"
 clients=${CLIENTS:-$HOSTNAME}
 generate_machine_file $clients $MACHINEFILE ||
        error "Failed to generate machine file"
index 8666fb5..153d0bb 100644 (file)
@@ -2,15 +2,17 @@
 #
 # This script is used to test large size LUN support in Lustre.
 #
 #
 # This script is used to test large size LUN support in Lustre.
 #
-################################################################################
+
 set -e
 
 set -e
 
-LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 init_logging
 
 init_logging
 
+ALWAYS_EXCEPT="$LARGE_LUN_EXCEPT"
+build_test_filter
+
 if [ "$REFORMAT" != "yes" ]; then
        skip_env "$0 reformats all devices,\
                please set REFORMAT to run this test"
 if [ "$REFORMAT" != "yes" ]; then
        skip_env "$0 reformats all devices,\
                please set REFORMAT to run this test"
@@ -18,14 +20,9 @@ fi
 
 # Variable to run mdsrate
 THREADS_PER_CLIENT=${THREADS_PER_CLIENT:-5}    # thread(s) per client node
 
 # Variable to run mdsrate
 THREADS_PER_CLIENT=${THREADS_PER_CLIENT:-5}    # thread(s) per client node
-MACHINEFILE=${MACHINEFILE:-$TMP/$TESTSUITE.machines}
 NODES_TO_USE=${NODES_TO_USE:-$CLIENTS}
 NUM_CLIENTS=$(get_node_count ${NODES_TO_USE//,/ })
 
 NODES_TO_USE=${NODES_TO_USE:-$CLIENTS}
 NUM_CLIENTS=$(get_node_count ${NODES_TO_USE//,/ })
 
-# bug number:
-ALWAYS_EXCEPT="$LARGE_LUN_EXCEPT"
-
-build_test_filter
 LARGE_LUN_RESTORE_MOUNT=false
 if is_mounted $MOUNT || is_mounted $MOUNT2; then
        LARGE_LUN_RESTORE_MOUNT=true
 LARGE_LUN_RESTORE_MOUNT=false
 if is_mounted $MOUNT || is_mounted $MOUNT2; then
        LARGE_LUN_RESTORE_MOUNT=true
index 791d5e3..6f98f96 100644 (file)
@@ -3,16 +3,15 @@
 set -e
 
 ONLY=${ONLY:-"$*"}
 set -e
 
 ONLY=${ONLY:-"$*"}
-ALWAYS_EXCEPT="$LFSCK_PERFORMANCE_EXCEPT"
-[ "$SLOW" = "no" ] && EXCEPT_SLOW=""
-# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
 
 
-LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 init_logging
 
 init_logging
 
+ALWAYS_EXCEPT="$LFSCK_PERFORMANCE_EXCEPT"
+build_test_filter
+
 require_dsh_mds || exit 0
 require_dsh_ost || exit 0
 
 require_dsh_mds || exit 0
 require_dsh_ost || exit 0
 
@@ -129,8 +128,6 @@ lfsck_create_nfiles() {
        done
 }
 
        done
 }
 
-build_test_filter
-
 format_start_mgs () {
        do_rpc_nodes $(facet_active_host mgs) load_modules_local
        format_mgs
 format_start_mgs () {
        do_rpc_nodes $(facet_active_host mgs) load_modules_local
        format_mgs
index 8d75f0a..23fbfe5 100644 (file)
@@ -2,14 +2,12 @@
 #
 # This test was used in a set of CMD3 tests (cmd3-4 test).
 
 #
 # This test was used in a set of CMD3 tests (cmd3-4 test).
 
-LUSTRE=${LUSTRE:-`dirname $0`/..}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 
 assert_env CLIENTS MDSRATE SINGLECLIENT MPIRUN
 
 
 assert_env CLIENTS MDSRATE SINGLECLIENT MPIRUN
 
-MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines}
 BASEDIR=$MOUNT/mdsrate
 
 # Requirements
 BASEDIR=$MOUNT/mdsrate
 
 # Requirements
index 16fdf05..2e87c66 100644 (file)
@@ -2,14 +2,12 @@
 #
 # This test was used in a set of CMD3 tests (cmd3-3 test).
 
 #
 # This test was used in a set of CMD3 tests (cmd3-3 test).
 
-LUSTRE=${LUSTRE:-`dirname $0`/..}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 
 assert_env CLIENTS MDSRATE SINGLECLIENT MPIRUN
 
 
 assert_env CLIENTS MDSRATE SINGLECLIENT MPIRUN
 
-MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines}
 BASEDIR=$MOUNT/mdsrate
 
 # Requirements
 BASEDIR=$MOUNT/mdsrate
 
 # Requirements
index e8c24c1..7dd3c59 100644 (file)
 # #1 and from all nodes for #2 aggregate test to measure lookup performance.
 # TEst performs lookups across all 10 directories.
 
 # #1 and from all nodes for #2 aggregate test to measure lookup performance.
 # TEst performs lookups across all 10 directories.
 
-LUSTRE=${LUSTRE:-`dirname $0`/..}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+
 assert_env CLIENTS MDSRATE SINGLECLIENT MPIRUN
 
 assert_env CLIENTS MDSRATE SINGLECLIENT MPIRUN
 
-MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines}
 # Do not use name [df][0-9]* to avoid cleanup by rm, bug 18045
 BASEDIR=$MOUNT/mdsrate
 
 # Do not use name [df][0-9]* to avoid cleanup by rm, bug 18045
 BASEDIR=$MOUNT/mdsrate
 
index bb85a78..221a405 100644 (file)
@@ -9,13 +9,12 @@
 # perform lookups for 10 minutes. This test can be run from a single node for
 # #1 and from all nodes for #2 aggregate test to measure lookup performance.
 
 # perform lookups for 10 minutes. This test can be run from a single node for
 # #1 and from all nodes for #2 aggregate test to measure lookup performance.
 
-LUSTRE=${LUSTRE:-`dirname $0`/..}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
+
 assert_env CLIENTS MDSRATE SINGLECLIENT MPIRUN
 
 assert_env CLIENTS MDSRATE SINGLECLIENT MPIRUN
 
-MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines}
 # Do not use name [df][0-9]* to avoid cleanup by rm, bug 18045
 BASEDIR=$MOUNT/mdsrate
 TESTDIR=$BASEDIR/lookup
 # Do not use name [df][0-9]* to avoid cleanup by rm, bug 18045
 BASEDIR=$MOUNT/mdsrate
 TESTDIR=$BASEDIR/lookup
index 277358d..12e7a8c 100644 (file)
 # run from a single node for #1 and from all nodes for #2 aggregate test to
 # measure stat performance.
 
 # run from a single node for #1 and from all nodes for #2 aggregate test to
 # measure stat performance.
 
-LUSTRE=${LUSTRE:-`dirname $0`/..}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 
 assert_env CLIENTS MDSRATE SINGLECLIENT MPIRUN
 
 
 assert_env CLIENTS MDSRATE SINGLECLIENT MPIRUN
 
-MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines}
 # Do not use name [df][0-9]* to avoid cleanup by rm, bug 18045
 BASEDIR=$MOUNT/mdsrate
 TESTDIR=$MOUNT/stat
 # Do not use name [df][0-9]* to avoid cleanup by rm, bug 18045
 BASEDIR=$MOUNT/mdsrate
 TESTDIR=$MOUNT/stat
index e95c26e..062061e 100644 (file)
 # will be run from a single node for #1 and from all nodes for #2
 # aggregate test to measure stat performance.
 
 # will be run from a single node for #1 and from all nodes for #2
 # aggregate test to measure stat performance.
 
-LUSTRE=${LUSTRE:-`dirname $0`/..}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 
 assert_env CLIENTS MDSRATE SINGLECLIENT MPIRUN
 
 
 assert_env CLIENTS MDSRATE SINGLECLIENT MPIRUN
 
-MACHINEFILE=${MACHINEFILE:-$TMP/$(basename $0 .sh).machines}
 # Do not use name [df][0-9]* to avoid cleanup by rm, bug 18045
 BASEDIR=$MOUNT/mdsrate
 TESTDIR=$BASEDIR/stat
 # Do not use name [df][0-9]* to avoid cleanup by rm, bug 18045
 BASEDIR=$MOUNT/mdsrate
 TESTDIR=$BASEDIR/stat
index 98d2c18..504f2fe 100755 (executable)
@@ -1,19 +1,14 @@
 #!/bin/bash
 
 set -e
 #!/bin/bash
 
 set -e
-#set -vx
 
 
-LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 . $LUSTRE/tests/test-framework.sh
-. ${CONFIG:=$LUSTRE/tests/cfg/${NAME}.sh}
+init_test_env $@
 
 
-export PATH=`dirname $0`/../utils:$PATH
-LFS=${LFS:-lfs}
-LCTL=${LCTL:-lctl}
 MOUNT=${MOUNT:-$1}
 MOUNT=${MOUNT:-/mnt/lustre}
 OOS=$MOUNT/oosfile
 MOUNT=${MOUNT:-$1}
 MOUNT=${MOUNT:-/mnt/lustre}
 OOS=$MOUNT/oosfile
-TMP=${TMP:-/tmp}
 LOG=$TMP/$(basename $0 .sh).log
 
 SUCCESS=1
 LOG=$TMP/$(basename $0 .sh).log
 
 SUCCESS=1
@@ -22,14 +17,8 @@ rm -f $OOS $LOG
 
 sync; sleep 1; sync    # to ensure we get up-to-date statfs info
 
 
 sync; sleep 1; sync    # to ensure we get up-to-date statfs info
 
-#$LCTL set_param -n debug=-1
-#$LCTL set_param -n subsystem_debug=0x40a8
-
-#$LCTL clear
-#$LCTL debug_daemon start /r/tmp/debug 1024
-
-STRIPECOUNT=`$LCTL get_param -n lov.*.activeobd | head -n 1`
-ORIGFREE=`$LCTL get_param -n llite.*.kbytesavail | head -n 1`
+STRIPECOUNT=$($LCTL get_param -n lov.*.activeobd | head -n 1)
+ORIGFREE=$($LCTL get_param -n llite.*.kbytesavail | head -n 1)
 MAXFREE=${MAXFREE:-$((400000 * $STRIPECOUNT))}
 echo STRIPECOUNT=$STRIPECOUNT ORIGFREE=$ORIGFREE MAXFREE=$MAXFREE
 if [ $ORIGFREE -gt $MAXFREE ]; then
 MAXFREE=${MAXFREE:-$((400000 * $STRIPECOUNT))}
 echo STRIPECOUNT=$STRIPECOUNT ORIGFREE=$ORIGFREE MAXFREE=$MAXFREE
 if [ $ORIGFREE -gt $MAXFREE ]; then
index 64a0f35..d96f934 100644 (file)
@@ -2,20 +2,16 @@
 
 set -e
 
 
 set -e
 
-LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 . $LUSTRE/tests/test-framework.sh
-. ${CONFIG:=$LUSTRE/tests/cfg/${NAME}.sh}
+init_test_env $@
 
 
-export PATH=$LUSTRE/utils:$PATH
-LFS=${LFS:-lfs}
-LCTL=${LCTL:-lctl}
 MOUNT=${MOUNT:-$1}
 MOUNT=${MOUNT:-/mnt/lustre}
 MOUNT2=${MOUNT2:-$2}
 MOUNT2=${MOUNT2:-${MOUNT}2}
 OOS=$MOUNT/oosfile
 OOS2=$MOUNT2/oosfile2
 MOUNT=${MOUNT:-$1}
 MOUNT=${MOUNT:-/mnt/lustre}
 MOUNT2=${MOUNT2:-$2}
 MOUNT2=${MOUNT2:-${MOUNT}2}
 OOS=$MOUNT/oosfile
 OOS2=$MOUNT2/oosfile2
-TMP=${TMP:-/tmp}
 LOG=$TMP/$(basename $0 .sh).log
 LOG2=${LOG}2
 
 LOG=$TMP/$(basename $0 .sh).log
 LOG2=${LOG}2
 
@@ -25,8 +21,8 @@ rm -f $OOS $OOS2 $LOG $LOG2
 
 sync; sleep 1; sync    # to ensure we get up-to-date statfs info
 
 
 sync; sleep 1; sync    # to ensure we get up-to-date statfs info
 
-STRIPECOUNT=`$LCTL get_param -n lov.*.activeobd | head -n 1`
-ORIGFREE=`$LCTL get_param -n llite.*.kbytesavail | head -n 1`
+STRIPECOUNT=$($LCTL get_param -n lov.*.activeobd | head -n 1)
+ORIGFREE=$($LCTL get_param -n llite.*.kbytesavail | head -n 1)
 MAXFREE=${MAXFREE:-$((400000 * $STRIPECOUNT))}
 echo STRIPECOUNT=$STRIPECOUNT ORIGFREE=$ORIGFREE MAXFREE=$MAXFREE
 if [ $ORIGFREE -gt $MAXFREE ]; then
 MAXFREE=${MAXFREE:-$((400000 * $STRIPECOUNT))}
 echo STRIPECOUNT=$STRIPECOUNT ORIGFREE=$ORIGFREE MAXFREE=$MAXFREE
 if [ $ORIGFREE -gt $MAXFREE ]; then
index d8da4fc..96cb825 100644 (file)
@@ -1,11 +1,9 @@
 #!/bin/bash
 
 #!/bin/bash
 
-LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 
 
-PATH=$(dirname $0):$LUSTRE/utils:$PATH
 TMP=${TMP:-/tmp}
 
 set -x
 TMP=${TMP:-/tmp}
 
 set -x
index 863b259..c91af2e 100755 (executable)
@@ -7,30 +7,27 @@
 set -e
 
 ONLY=${ONLY:-"$*"}
 set -e
 
 ONLY=${ONLY:-"$*"}
-# bug number for skipped test:
-ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"$SANITY_GSS_EXCEPT"}
-# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
-if $SHARED_KEY; then
-# bug number for skipped tests:        LU-9795 LU-9795
-       ALWAYS_EXCEPT="         8       90      $ALWAYS_EXCEPT"
-fi
-
-SRCDIR=`dirname $0`
-
-export MULTIOP=${MULTIOP:-multiop}
 
 
-LUSTRE=${LUSTRE:-`dirname $0`/..}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 init_logging
 
 init_logging
 
-require_dsh_mds || exit 0
+ALWAYS_EXCEPT="$SANITY_GSS_EXCEPT "
+if $SHARED_KEY; then
+# bug number for skipped tests: LU-9795 LU-9795
+       ALWAYS_EXCEPT+="        8       90 "
+fi
 
 [ "$SLOW" = "no" ] && EXCEPT_SLOW="100 101"
 
 
 [ "$SLOW" = "no" ] && EXCEPT_SLOW="100 101"
 
+build_test_filter
+
+require_dsh_mds || exit 0
+
 # $RUNAS_ID may get set incorrectly somewhere else
 # $RUNAS_ID may get set incorrectly somewhere else
-[ $UID -eq 0 -a $RUNAS_ID -eq 0 ] && error "\$RUNAS_ID set to 0, but \$UID is also 0!"
+[ $UID -eq 0 -a $RUNAS_ID -eq 0 ] &&
+       error "\$RUNAS_ID set to 0, but \$UID is also 0!"
 
 # remove $SEC, we'd like to control everything by ourselves
 unset SEC
 
 # remove $SEC, we'd like to control everything by ourselves
 unset SEC
@@ -51,8 +48,6 @@ rm -rf $DIR/[df][0-9]*
 
 check_runas_id $RUNAS_ID $RUNAS_ID $RUNAS
 
 
 check_runas_id $RUNAS_ID $RUNAS_ID $RUNAS
 
-build_test_filter
-
 start_dbench()
 {
     NPROC=`cat /proc/cpuinfo 2>/dev/null | grep ^processor | wc -l`
 start_dbench()
 {
     NPROC=`cat /proc/cpuinfo 2>/dev/null | grep ^processor | wc -l`
index 7afb38c..50f23ed 100755 (executable)
@@ -7,25 +7,20 @@
 set -e
 
 ONLY=${ONLY:-"$*"}
 set -e
 
 ONLY=${ONLY:-"$*"}
-# bug number for skipped test:
-ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"$SANITY_GSS_EXCEPT"}
-# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
-
-SRCDIR=$(dirname $0)
-SAVE_PWD=$PWD
-
-export MULTIOP=${MULTIOP:-multiop}
 
 LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
 
 LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 init_logging
 
 init_logging
 
-require_dsh_mds || exit 0
+ALWAYS_EXCEPT="$SANITY_GSS_EXCEPT"
 
 [ "$SLOW" = "no" ] && EXCEPT_SLOW="100 101"
 
 
 [ "$SLOW" = "no" ] && EXCEPT_SLOW="100 101"
 
+build_test_filter
+
+require_dsh_mds || exit 0
+
 # $RUNAS_ID may get set incorrectly somewhere else
 [ $UID -eq 0 -a $RUNAS_ID -eq 0 ] &&
     error "RUNAS_ID set to 0, but UID is also 0!"
 # $RUNAS_ID may get set incorrectly somewhere else
 [ $UID -eq 0 -a $RUNAS_ID -eq 0 ] &&
     error "RUNAS_ID set to 0, but UID is also 0!"
@@ -65,8 +60,6 @@ rm -rf $DIR/[df][0-9]*
 
 check_runas_id $RUNAS_ID $RUNAS_ID $RUNAS
 
 
 check_runas_id $RUNAS_ID $RUNAS_ID $RUNAS
 
-build_test_filter
-
 start_dbench()
 {
        local NPROC=$(grep -c ^processor /proc/cpuinfo)
 start_dbench()
 {
        local NPROC=$(grep -c ^processor /proc/cpuinfo)
index 0403a3c..0897b79 100755 (executable)
 set -e
 
 ONLY=${ONLY:-"$*"}
 set -e
 
 ONLY=${ONLY:-"$*"}
-# bug number for skipped test:
-ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-"$SANITY_SELINUX_EXCEPT"}
-# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
-
-SRCDIR=$(dirname $0)
-SAVE_PWD=$PWD
 
 LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
 
 LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 init_logging
 
 init_logging
 
-require_dsh_mds || exit 0
+ALWAYS_EXCEPT="$SANITY_SELINUX_EXCEPT"
 
 [ "$SLOW" = "no" ] && EXCEPT_SLOW="xxx"
 
 
 [ "$SLOW" = "no" ] && EXCEPT_SLOW="xxx"
 
+build_test_filter
+
+require_dsh_mds || exit 0
+
 RUNAS_CMD=${RUNAS_CMD:-runas}
 # $RUNAS_ID may get set incorrectly somewhere else
 [ $UID -eq 0 -a $RUNAS_ID -eq 0 ] &&
 RUNAS_CMD=${RUNAS_CMD:-runas}
 # $RUNAS_ID may get set incorrectly somewhere else
 [ $UID -eq 0 -a $RUNAS_ID -eq 0 ] &&
@@ -69,8 +66,6 @@ rm -rf $DIR/[df][0-9]*
 
 check_runas_id $RUNAS_ID $RUNAS_ID $RUNAS
 
 
 check_runas_id $RUNAS_ID $RUNAS_ID $RUNAS
 
-build_test_filter
-
 umask 077
 
 check_selinux_xattr() {
 umask 077
 
 check_selinux_xattr() {
index a75daa7..0c90e45 100644 (file)
@@ -3,16 +3,15 @@
 set -e
 
 ONLY=${ONLY:-"$*"}
 set -e
 
 ONLY=${ONLY:-"$*"}
-ALWAYS_EXCEPT="$SCRUB_PERFORMANCE_EXCEPT"
-[ "$SLOW" = "no" ] && EXCEPT_SLOW=""
-# UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
 
 
-LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 init_logging
 
 init_logging
 
+ALWAYS_EXCEPT="$SCRUB_PERFORMANCE_EXCEPT"
+build_test_filter
+
 [ "$SLOW" = "no" ] &&
        skip "skip scrub performance test under non-SLOW mode" && exit 0
 
 [ "$SLOW" = "no" ] &&
        skip "skip scrub performance test under non-SLOW mode" && exit 0
 
@@ -135,8 +134,6 @@ scrub_create_nfiles() {
        done
 }
 
        done
 }
 
-build_test_filter
-
 test_0() {
        local BASECOUNT=0
        local i
 test_0() {
        local BASECOUNT=0
        local i
index c5d8fb0..91e1ec1 100755 (executable)
@@ -60,10 +60,9 @@ if [ -z "$MY_KDC_DISTRO" -o -z "$MY_KDCNODE" -o -z "$MY_MDSNODES" -o \
     exit 1
 fi
 
     exit 1
 fi
 
-LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env
 . $LUSTRE/tests/test-framework.sh
 init_test_env
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 
 SCP=${SCP:-"scp -q"}
 ACCEPTOR_PORT=${ACCEPTOR_PORT:-988}
 
 SCP=${SCP:-"scp -q"}
 ACCEPTOR_PORT=${ACCEPTOR_PORT:-988}
index d0df788..b2c1e23 100644 (file)
@@ -1,13 +1,15 @@
 #!/bin/bash
 #!/bin/bash
-#set -x
+
 set -e
 
 set -e
 
-LUSTRE=${LUSTRE:-`dirname $0`/..}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 init_logging
 
 init_logging
 
+ALWAYS_EXCEPT="$SGPDD_SURVEY_EXCEPT"
+build_test_filter
+
 # QE uses the following parameters:
 # size=128 crghi=16 thrhi=32
 crghi=${crghi:-2}
 # QE uses the following parameters:
 # size=128 crghi=16 thrhi=32
 crghi=${crghi:-2}
@@ -21,11 +23,6 @@ if [ "$SGPDD_YES" != "yes" -o "$REFORMAT" != "yes" ]; then
        exit 0
 fi
 
        exit 0
 fi
 
-# Skip these tests
-ALWAYS_EXCEPT="$SGPDD_SURVEY_EXCEPT"
-
-build_test_filter
-
 init_facets_vars
 
 cleanupall
 init_facets_vars
 
 cleanupall