Whamcloud - gitweb
LU-10073 tests: skip test smoke for PPC
[fs/lustre-release.git] / lustre / tests / lnet-selftest.sh
index 0589a95..d02e377 100755 (executable)
@@ -1,17 +1,24 @@
 #!/bin/bash
-# -*- mode: Bash; tab-width: 4; indent-tabs-mode: t; -*-
-# vim:shiftwidth=4:softtabstop=4:tabstop=4:
 
-LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
+LUSTRE=${LUSTRE:-$(dirname $0)/..}
 . $LUSTRE/tests/test-framework.sh
 init_test_env $@
-. ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 init_logging
 
-#
-ALWAYS_EXCEPT="$ALWAYS_EXCEPT $LNET_SELFTEST_EXCEPT"
+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
 
-[ x$LST = x ] && { skip_env "lst not found LST=$LST" && exit 0; }
+[ x$LST = x ] && skip_env "lst not found LST=$LST"
 
 # FIXME: what is the reasonable value here?
 lst_LOOP=${lst_LOOP:-100000}
@@ -51,12 +58,6 @@ _restore_mount () {
        fi
 }
 
-is_mounted () {
-    local mntpt=$1
-    local mounted=$(mounted_lustre_filesystems)
-    echo $mounted' ' | grep -w -q $mntpt' '
-}
-
 if local_mode; then
    lst_SERVERS=`hostname`
    lst_CLIENTS=`hostname`
@@ -79,8 +80,6 @@ if is_mounted $MOUNT2; then
        interim_umount1=true
 fi
 
-build_test_filter
-
 lst_prepare () {
     # Workaround for bug 15619
     lst_cleanup_all
@@ -183,4 +182,5 @@ run_test smoke "lst regression test"
 
 complete $SECONDS
 _restore_mount
+check_and_cleanup_lustre
 exit_status