Whamcloud - gitweb
LU-15868 lfsck: don't crash upon dir migration failure
[fs/lustre-release.git] / lustre / tests / lnet-selftest.sh
index 045ff4a..dd3ec2b 100755 (executable)
@@ -2,19 +2,10 @@
 
 LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
-init_test_env $@
+init_test_env "$@"
 init_logging
 
 ALWAYS_EXCEPT="$LNET_SELFTEST_EXCEPT"
-if (( $LINUX_VERSION_CODE >= $(version_code 4.4.0) )); then
-       # bug number for skipped test: LU-10073
-       ALWAYS_EXCEPT+="               smoke "
-fi
-
-if [[ $(uname -m) = ppc64 ]]; then
-       # bug number for skipped test: LU-10073
-       ALWAYS_EXCEPT+="               smoke "
-fi
 
 build_test_filter
 
@@ -25,14 +16,14 @@ lst_LOOP=${lst_LOOP:-100000}
 lst_CONCR=${lst_CONCR:-"1 2 4 8"}
 lst_SIZES=${lst_SIZES:-"4k 8k 256k 1M"}
 if [ "$SLOW" = no ]; then
-    lst_CONCR="1 8"
-    lst_SIZES="4k 1M"
-    lst_LOOP=1000
+       lst_CONCR="1 8"
+       lst_SIZES="4k 1M"
+       lst_LOOP=1000
 fi
 
 smoke_DURATION=${smoke_DURATION:-1800}
 if [ "$SLOW" = no ]; then
-    [ $smoke_DURATION -le 300 ] || smoke_DURATION=300
+       [ $smoke_DURATION -le 300 ] || smoke_DURATION=300
 fi
 
 lst_TESTS=${lst_TESTS:-"write read ping"}
@@ -98,27 +89,27 @@ if is_mounted $MOUNT2; then
 fi
 
 lst_prepare () {
-    # Workaround for bug 15619
-    lst_cleanup_all
-    lst_setup_all
+       # Workaround for bug 15619
+       lst_cleanup_all
+       lst_setup_all
 }
 
 # make batch
 test_smoke_sub () {
-    local servers=$1
-    local clients=$2
+       local servers=$1
+       local clients=$2
 
-    local nc=$(echo ${clients//,/ } | wc -w)
-    local ns=$(echo ${servers//,/ } | wc -w)
-    echo '#!/bin/bash'
-    echo 'set -e'
+       local nc=$(echo ${clients//,/ } | wc -w)
+       local ns=$(echo ${servers//,/ } | wc -w)
+       echo '#!/bin/bash'
+       echo 'set -e'
 
-    echo 'cleanup () { trap 0; echo killing $1 ... ; kill -9 $1 || true; }'
+       echo 'cleanup () { trap 0; echo killing $1 ... ; kill -9 $1 || true; }'
 
-    echo "$LST new_session --timeo 100000 hh"
-    echo "$LST add_group c $(nids_list $clients)"
-    echo "$LST add_group s $(nids_list $servers)"
-    echo "$LST add_batch b"
+       echo "$LST new_session --timeo 100000 hh"
+       echo "$LST add_group c $(nids_list $clients)"
+       echo "$LST add_group s $(nids_list $servers)"
+       echo "$LST add_batch b"
 
        declare -a tests
 
@@ -151,23 +142,22 @@ test_smoke_sub () {
                done
        done
 
-    echo $LST run b
-    echo sleep 1
-    echo "$LST stat --delay 10 --timeout 10 c s &"
-    echo 'pid=$!'
-    echo 'trap "cleanup $pid" INT TERM'
-    echo sleep $smoke_DURATION
-    echo 'cleanup $pid'
-    
+       echo $LST run b
+       echo sleep 1
+       echo "$LST stat --delay 10 --timeout 10 c s &"
+       echo 'pid=$!'
+       echo 'trap "cleanup $pid" INT TERM'
+       echo sleep $smoke_DURATION
+       echo 'cleanup $pid'
 }
 
 run_lst () {
-   local file=$1
+       local file=$1
 
-   export LST_SESSION=$$
+       export LST_SESSION=$$
 
-   # start lst
-   sh $file
+       # start lst
+       bash $file
 }
 
 check_lst_err () {