1 # Run select tests by setting ONLY, or as arguments to the script.
2 # Skip specific tests by setting EXCEPT.
5 export ONLY=${ONLY:-"$*"}
6 export SUITE=${SUITE:-"$*"}
7 export PATTERN=${PATTERN:-"$*"}
9 [ "$SLOW" = "no" ] && EXCEPT_SLOW=""
10 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
12 LUSTRE=${LUSTRE:-$(dirname $0)/..}
14 . $LUSTRE/tests/test-framework.sh
16 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
19 # bug number for skipped test:
20 ALWAYS_EXCEPT="$SANITY_LNET_EXCEPT "
22 export LNETCTL=${LNETCTL:-"$LUSTRE/../lnet/utils/lnetctl"}
23 [ ! -f "$LNETCTL" ] &&
24 export LNETCTL=$(which lnetctl 2> /dev/null)
25 [[ -z $LNETCTL ]] && skip "Need lnetctl"
28 if is_mounted $MOUNT || is_mounted $MOUNT2; then
29 cleanupall || error "Failed cleanup prior to test execution"
34 echo "Cleaning up LNet"
35 lsmod | grep -q lnet &&
36 $LNETCTL lnet unconfigure 2>/dev/null
41 if module_loaded lnet ; then
42 cleanup_lnet || error "Failed to unload modules before test execution"
49 if $restore_mounts; then
50 setupall || error "Failed to setup Lustre after test execution"
51 elif $restore_modules; then
53 error "Couldn't load modules after test execution"
58 set_env_vars_on_remote() {
59 local list=$(comma_list $(all_nodes))
60 do_rpc_nodes "$list" "echo $PATH; echo $LUSTRE; echo $LNETCTL; echo $LCTL"
63 set_env_vars_on_remote
67 # do not exit if LUTF fails
70 echo "+++++++++++STARTING LUTF"
71 . $LUSTRE/tests/lutf/python/config/lutf_start.sh $CONFIG
73 echo "-----------STOPPING LUTF: $rc"
75 if [ -d /tmp/lutf/ ]; then
76 tar -czf /tmp/lutf.tar.gz /tmp/lutf
77 mv /tmp/lutf.tar.gz $LOGDIR