Whamcloud - gitweb
b=13283
[fs/lustre-release.git] / lustre / tests / sanityN.sh
index 399dff8..9a55449 100644 (file)
@@ -10,8 +10,6 @@ ALWAYS_EXCEPT="14b 28 $SANITYN_EXCEPT"
 # bug number for skipped test:                                                    12652 12652
 grep -q 'Enterprise Server 10' /etc/SuSE-release && ALWAYS_EXCEPT="$ALWAYS_EXCEPT 11    14" || true
 
-[ "$SLOW" = "no" ] && EXCEPT_SLOW="12 16"
-
 # Tests that fail on uml
 [ "$UML" = "true" ] && EXCEPT="$EXCEPT 7"
 
@@ -48,13 +46,11 @@ SETUP=${SETUP:-:}
 init_test_env $@
 . ${CONFIG:=$LUSTRE/tests/cfg/$NAME.sh}
 
+[ "$SLOW" = "no" ] && EXCEPT_SLOW="12 16"
+
 SANITYLOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh).log}
 FAIL_ON_ERROR=false
 
-if $GSS_KRB5; then
-    $RUNAS krb5_login.sh || exit 1
-fi
-
 SETUP=${SETUP:-:}
 TRACE=${TRACE:-""}
 
@@ -65,8 +61,8 @@ LPROC=/proc/fs/lustre
 check_and_setup_lustre
 
 LPROC=/proc/fs/lustre
-LOVNAME=`cat $LPROC/llite/*/lov/common_name | tail -n 1`
-OSTCOUNT=`cat $LPROC/lov/$LOVNAME/numobd`
+LOVNAME=`lctl get_param -n llite.*.lov.common_name | tail -n 1`
+OSTCOUNT=`lctl get_param -n lov.$LOVNAME.numobd`
 
 rm -rf $DIR1/[df][0-9]* $DIR1/lnk
 
@@ -485,7 +481,7 @@ test_24() {
 run_test 24 "lfs df [-ih] [path] test ========================="
 
 test_25() {
-       [ `cat $LPROC/mdc/*-mdc-*/connect_flags | grep -c acl` -lt 2 ] && \
+       [ `lctl get_param -n mdc.*-mdc-*.connect_flags | grep -c acl` -lt 2 ] && \
            skip "must have acl, skipping" && return
 
        touch $DIR1/$tdir/f1 || error "touch $DIR1/$tdir/f1"
@@ -540,7 +536,7 @@ test_27() {
        sleep 1
        dd if=/dev/zero of=$DIR1/$tfile bs=8k conv=notrunc count=1 seek=0
        log "dd 3 finished"
-       echo > $LPROC/ldlm/dump_namespaces
+       lctl set_param -n ldlm.dump_namespaces ""
        wait $DD1_PID $DD2_PID
        [ $? -ne 0 ] && lctl dk $TMP/debug || true
 }
@@ -606,6 +602,18 @@ test_30() { #bug #11110
 
 run_test 30 "recreate file race ========="
 
+test_31() {
+        mkdir -p $DIR1/$tdir || error "Creating dir $DIR1/$tdir"
+        writes=`LANG=C dd if=/dev/zero of=$DIR/$tdir/$tfile count=1 2>&1 |
+                awk 'BEGIN { FS="+" } /out/ {print $1}'`
+        #define OBD_FAIL_LDLM_CANCEL_BL_CB_RACE   0x314
+        sysctl -w lustre.fail_loc=0x314
+        reads=`LANG=C dd if=$DIR2/$tdir/$tfile of=/dev/null 2>&1 |
+               awk 'BEGIN { FS="+" } /in/ {print $1}'`
+        [ $reads -eq $writes ] || error "read" $reads "blocks, must be" $writes
+}
+run_test 31 "voluntary cancel / blocking ast race=============="
+
 log "cleanup: ======================================================"
 
 check_and_cleanup_lustre