Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / tests / sanity-lmv.sh
index 38d2a4d..0a11ed7 100644 (file)
@@ -18,6 +18,7 @@ ALWAYS_EXCEPT=${ALWAYS_EXCEPT:-""}
 
 SRCDIR=`dirname $0`
 export PATH=$PWD/$SRCDIR:$SRCDIR:$SRCDIR/../utils:$PATH
+export SECURITY=${SECURITY:-"null"}
 
 TMP=${TMP:-/tmp}
 FSTYPE=${FSTYPE:-ext3}
@@ -39,14 +40,9 @@ SOCKETSERVER=${SOCKETSERVER:-socketserver}
 SOCKETCLIENT=${SOCKETCLIENT:-socketclient}
 IOPENTEST1=${IOPENTEST1:-iopentest1}
 IOPENTEST2=${IOPENTEST2:-iopentest2}
+PTLDEBUG=${PTLDEBUG:-0}
 
-if [ $UID -ne 0 ]; then
-       RUNAS_ID="$UID"
-       RUNAS=""
-else
-       RUNAS_ID=${RUNAS_ID:-500}
-       RUNAS=${RUNAS:-"runas -u $RUNAS_ID"}
-fi
+. krb5_env.sh
 
 export NAME=${NAME:-lmv}
 
@@ -92,10 +88,10 @@ check_kernel_version() {
 }
 
 run_one() {
-       if ! mount | grep -q $DIR; then
+       if ! cat /proc/mounts | grep -q $DIR; then
                $START
        fi
-       echo -1 >/proc/sys/portals/debug        
+       echo $PTLDEBUG >/proc/sys/portals/debug 
        log "== test $1: $2"
        export TESTNAME=test_$1
        test_$1 || error "test_$1: exit with rc=$?"
@@ -180,10 +176,10 @@ fi
 DIR=${DIR:-$MOUNT}
 [ -z "`echo $DIR | grep $MOUNT`" ] && echo "$DIR not in $MOUNT" && exit 99
 
-LOVNAME=`cat /proc/fs/lustre/llite/fs0/lov/common_name`
-OSTCOUNT=`cat /proc/fs/lustre/lov/$LOVNAME/numobd`
-STRIPECOUNT=`cat /proc/fs/lustre/lov/$LOVNAME/stripecount`
-STRIPESIZE=`cat /proc/fs/lustre/lov/$LOVNAME/stripesize`
+#LOVNAME=`cat /proc/fs/lustre/llite/fs0/lov/common_name`
+#OSTCOUNT=`cat /proc/fs/lustre/lov/$LOVNAME/numobd`
+#STRIPECOUNT=`cat /proc/fs/lustre/lov/$LOVNAME/stripecount`
+#STRIPESIZE=`cat /proc/fs/lustre/lov/$LOVNAME/stripesize`
 
 [ -f $DIR/d52a/foo ] && chattr -a $DIR/d52a/foo
 [ -f $DIR/d52b/foo ] && chattr -i $DIR/d52b/foo
@@ -247,19 +243,23 @@ test_1c() {
        touch $DIR/1b1/file1
        touch $DIR/1b1/file2
 
-       echo "3 files left"
+       ls $DIR/1b1/
+       log "3 files left"
        rmdir $DIR/1b1 && error
        rm -f $DIR/1b1/file0
 
-       echo "2 files left"
+       ls $DIR/1b1/
+       log "2 files left"
        rmdir $DIR/1b1 && error
        rm -f $DIR/1b1/file1
 
-       echo "1 files left"
+       ls $DIR/1b1/
+       log "1 files left"
        rmdir $DIR/1b1 && error
        rm -f $DIR/1b1/file2
 
-       echo "0 files left"
+       ls $DIR/1b1/
+       log "0 files left"
        rmdir $DIR/1b1 || error
 }
 run_test 1c " remove splitted cross-node dir ============================="