Whamcloud - gitweb
b=21489 fix several write+utimes race conditions
[fs/lustre-release.git] / lustre / tests / sanity.sh
index a24bd44..a9666a8 100644 (file)
@@ -73,7 +73,7 @@ LUSTRE=${LUSTRE:-$(cd $(dirname $0)/..; echo $PWD)}
 init_test_env $@
 . ${CONFIG:=$LUSTRE/tests/cfg/${NAME}.sh}
 
-[ "$SLOW" = "no" ] && EXCEPT_SLOW="24o 24v 27m 36f 36g 51b 51c 60c 63 64b 68 71 73 77f 78 101 103 115 120g 124b"
+[ "$SLOW" = "no" ] && EXCEPT_SLOW="24o 24v 27m 36f 36g 36h 51b 51c 60c 63 64b 68 71 73 77f 78 101 103 115 120g 124b"
 
 SANITYLOG=${TESTSUITELOG:-$TMP/$(basename $0 .sh).log}
 FAIL_ON_ERROR=false
@@ -1829,15 +1829,15 @@ test_36e() {
 }
 run_test 36e "utime on non-owned file (should return error) ===="
 
-test_36f() {
+subr_36fh() {
+       local fl="$1"
        local LANG_SAVE=$LANG
        local LC_LANG_SAVE=$LC_LANG
        export LANG=C LC_LANG=C # for date language
 
        DATESTR="Dec 20  2000"
        mkdir -p $DIR/$tdir
-       #define OBD_FAIL_OST_BRW_PAUSE_BULK 0x214
-       lctl set_param fail_loc=0x80000214
+       lctl set_param fail_loc=$fl
        date; date +%s
        cp /etc/hosts $DIR/$tdir/$tfile
        sync & # write RPC generated with "current" inode timestamp, but delayed
@@ -1857,6 +1857,12 @@ test_36f() {
 }
 run_test 36f "utime on file racing with OST BRW write =========="
 
+test_36f() {
+        #define OBD_FAIL_OST_BRW_PAUSE_BULK 0x214
+        subr_36fh "0x80000214"
+}
+run_test 36f "utime on file racing with OST BRW write =========="
+
 test_36g() {
        remote_ost_nodsh && skip "remote OST with nodsh" && return
 
@@ -1872,6 +1878,12 @@ test_36g() {
 }
 run_test 36g "filter mod data cache expiry ====================="
 
+test_36h() {
+        #define OBD_FAIL_OST_BRW_PAUSE_BULK2 0x227
+        subr_36fh "0x80000227"
+}
+run_test 36h "utime on file racing with OST BRW write =========="
+
 test_37() {
        mkdir -p $DIR/$tdir
        echo f > $DIR/$tdir/fbugfile