Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / tests / sanity.sh
index 5b08adc..4ad3f14 100644 (file)
@@ -3990,17 +3990,6 @@ test_102c() {
 }
 run_test 102c "non-root getfattr/setfattr for lustre.lov EAs ==========="
 
-get_stripe_info() {
-       stripe_size=0
-       stripe_count=0
-       stripe_offset=0
-       local lines=`sed -n '/obdidx/=' $1`
-       stripe_size=`awk '{if($1~/size/) print $2}' $1`
-       stripe_count=`awk '{if($1~/count/) print $2}' $1`
-       lines=`expr $lines + 1`
-       stripe_offset=`sed -n ${lines}p $1 |awk '{print $1}'`
-}
-
 compare_stripe_info1() {
        for num in 1 2 3 4
        do
@@ -4010,22 +3999,16 @@ compare_stripe_info1() {
                        do
                                local size=`expr $STRIPE_SIZE \* $num`
                                local file=file"$num-$offset-$count"
-                               local tmp_file=out
-                               $GETSTRIPE -v $file > $tmp_file
-                               get_stripe_info  $tmp_file
-                               if test $stripe_size -ne $size
-                               then
+                               get_stripe_info client $file
+                               if [ $stripe_size -ne $size ]; then
                                        error "$file: different stripe size" && return
                                fi
-                               if test $stripe_count -ne $count
-                               then
+                               if [ $stripe_count -ne $count ]; then
                                        error "$file: different stripe count" && return
                                fi
-                               if test $stripe_offset -ne 0
-                               then
+                               if [ $stripe_index -ne 0 ]; then
                                        error "$file: different stripe offset" && return
                                fi
-                               rm -f $tmp_file
                        done
                done
        done
@@ -4040,22 +4023,16 @@ compare_stripe_info2() {
                        do
                                local size=`expr $STRIPE_SIZE \* $num`
                                local file=file"$num-$offset-$count"
-                               local tmp_file=out
-                               $GETSTRIPE -v $file > $tmp_file
-                               get_stripe_info  $tmp_file
-                               if test $stripe_size -ne $size
-                               then
+                               get_stripe_info client $file
+                               if [ $stripe_size -ne $size ]; then
                                        error "$file: different stripe size" && return  
                                fi
-                               if test $stripe_count -ne $count
-                               then
+                               if [ $stripe_count -ne $count ]; then
                                        error "$file: different stripe count" && return
                                fi
-                               if test $stripe_offset -ne $offset
-                               then
+                               if [ $stripe_index -ne $offset ]; then
                                        error "$file: different stripe offset" && return
                                fi
-                               rm -f $tmp_file
                        done
                done
        done
@@ -5238,7 +5215,7 @@ test_124a() {
         
         # Let's make sure that we really have some margin. Client checks
         # cached locks every 10 sec.
-        SLEEP=$((SLEEP+10))
+        SLEEP=$((SLEEP+20))
         log "Sleep ${SLEEP} sec"
         local SEC=0
         while ((SEC<$SLEEP)); do
@@ -5358,6 +5335,8 @@ run_test 125 "don't return EPROTO when a dir has a non-default striping and ACLs
 test_126() { # bug 12829/13455
        [ -z "$(lctl get_param -n llite.*.client_type | grep local)" ] && skip "must run as local client" && return
        [ "$UID" != 0 ] && echo "skipping $TESTNAME (must run as root)" && return
+       $GSS && skip "must run as gss disabled" && return
+
        $RUNAS -u 0 -g 1 touch $DIR/$tfile || error "touch failed"
        gid=`ls -n $DIR/$tfile | awk '{print $4}'`
        rm -f $DIR/$tfile
@@ -5762,8 +5741,8 @@ test_141() {
         for ls in /proc/fs/lustre/ldlm/namespaces/MGC*/lru_size; do
                 echo "clear" > $ls
         done
-        cleanup || error "failed to cleanup"
-        setup || error "failed to setup"
+        FAIL_ON_ERROR=true cleanup
+        FAIL_ON_ERROR=true setup
 }
 run_test 141 "umount should not race with any mgc requeue thread"