Whamcloud - gitweb
b=23316 BUG: soft lockup - CPU#2 stuck for 10s! [ll_cfg_requeue:2851]
[fs/lustre-release.git] / lustre / tests / test-framework.sh
index a56027f..61409d4 100644 (file)
@@ -145,6 +145,7 @@ init_test_env() {
     fi
     export LST=${LST:-"$LUSTRE/../lnet/utils/lst"}
     [ ! -f "$LST" ] && export LST=$(which lst)
+    export SGPDDSURVEY=${SGPDDSURVEY:-$(which sgpdd-survey)}
     export MDSRATE=${MDSRATE:-"$LUSTRE/tests/mpi/mdsrate"}
     [ ! -f "$MDSRATE" ] && export MDSRATE=$(which mdsrate 2> /dev/null)
     if ! echo $PATH | grep -q $LUSTRE/tests/racer; then
@@ -216,6 +217,7 @@ init_test_env() {
     export RPWD=${RPWD:-$PWD}
     export I_MOUNTED=${I_MOUNTED:-"no"}
     if [ ! -f /lib/modules/$(uname -r)/kernel/fs/lustre/mds.ko -a \
+        ! -f /lib/modules/$(uname -r)/updates/kernel/fs/lustre/mds.ko -a \
         ! -f `dirname $0`/../mds/mds.ko ]; then
         export CLIENTMODSONLY=yes
     fi
@@ -612,12 +614,12 @@ quota_save_version() {
 
     [ -n "$type" ] && { $LFS quotacheck -$type $MOUNT || error "quotacheck has failed"; }
 
-    do_facet mgs "lctl conf_param mdd.${fsname}-MDT*.quota_type=$spec"
+    do_facet mgs "lctl conf_param ${fsname}-MDT*.mdd.quota_type=$spec"
     local varsvc
     local osts=$(get_facets OST)
     for ost in ${osts//,/ }; do
         varsvc=${ost}_svc
-        do_facet mgs "lctl conf_param ost.${!varsvc}.quota_type=$spec"
+        do_facet mgs "lctl conf_param ${!varsvc}.ost.quota_type=$spec"
     done
 }
 
@@ -1511,11 +1513,6 @@ h2elan() {
 }
 declare -fx h2elan
 
-h2openib() {
-    h2name_or_ip "$1" "openib"
-}
-declare -fx h2openib
-
 h2o2ib() {
     h2name_or_ip "$1" "o2ib"
 }
@@ -3852,11 +3849,6 @@ gather_logs () {
     local list=$1
 
     local ts=$(date +%s)
-
-    # bug 20237, comment 11
-    # It would also be useful to provide the option
-    # of writing the file to an NFS directory so it doesn't need to be copied.
-    local tmp=$TMP
     local docp=true
     [ -f $LOGDIR/shared ] && docp=false
  
@@ -4357,3 +4349,18 @@ duplicate_mdt_files() {
     done
     do_umount
 }
+
+run_sgpdd () {
+    local devs=${1//,/ }
+    shift
+    local params=$@
+    local rslt=$TMP/sgpdd_survey
+
+    # sgpdd-survey cleanups ${rslt}.* files
+
+    local cmd="rslt=$rslt $params scsidevs=\"$devs\" $SGPDDSURVEY"
+    echo + $cmd
+    eval $cmd
+    cat ${rslt}.detail
+}
+