Whamcloud - gitweb
LU-1249 debug: Auto correct improper debug buffer size setting
[fs/lustre-release.git] / lustre / tests / sanityn.sh
index c8ae0c3..0d0ca1a 100644 (file)
@@ -3,8 +3,8 @@
 set -e
 
 ONLY=${ONLY:-"$*"}
-# bug number for skipped test: 3192 15528/3811 16929 9977 15528/11549 18080
-ALWAYS_EXCEPT="                14b  19         22    28   29          35    $SANITYN_EXCEPT"
+# bug number for skipped test: 3192 LU-1205 15528/3811 16929 9977 15528/11549 18080
+ALWAYS_EXCEPT="                14b  18c     19         22    28   29          35    $SANITYN_EXCEPT"
 # UPDATE THE COMMENT ABOVE WITH BUG NUMBERS WHEN CHANGING ALWAYS_EXCEPT!
 
 # bug number for skipped test:                                                    12652 12652
@@ -350,7 +350,17 @@ test_17() { # bug 3513, 3667
 run_test 17 "resource creation/LVB creation race ==============="
 
 test_18() {
-       $LUSTRE/tests/mmap_sanity -d $MOUNT1 -m $MOUNT2
+        # turn e.g. ALWAYS_EXCEPT="18c" into "-e 3"
+        local idx
+        local excepts=
+        for idx in {a..z}; do
+                local ptr=EXCEPT_ALWAYS_18$idx
+                [ x${!ptr} = xtrue ] || continue
+
+                excepts="$excepts -e $(($(printf %d \'$idx)-96))"
+        done
+
+       $LUSTRE/tests/mmap_sanity -d $MOUNT1 -m $MOUNT2 $excepts
        sync; sleep 1; sync
 }
 run_test 18 "mmap sanity check ================================="
@@ -710,7 +720,7 @@ print_jbd_stat () {
     local stat=0
     for mds in ${mdts//,/ }; do
         varsvc=${mds}_svc
-        dev=$(basename $(do_facet $mds lctl get_param -n osd.${!varsvc}.mntdev))
+        dev=$(basename $(do_facet $mds lctl get_param -n osd*.${!varsvc}.mntdev))
         val=$(do_facet $mds "procfile=/proc/fs/jbd/$dev/info;
 [ -f \\\$procfile ] || procfile=/proc/fs/jbd2/$dev/info;
 [ -f \\\$procfile ] || procfile=/proc/fs/jbd2/${dev}\:\\\*/info;
@@ -1031,6 +1041,7 @@ run_test 39c "check truncate mtime update ======================"
 check_pdo_conflict() {
        local pid=$1
        local conflict=0
+       sleep 1 # to ensure OP1 is finished on client if OP2 is blocked by OP1
        if [[ `ps --pid $pid | wc -l` == 1 ]]; then
                conflict=1
                echo "Conflict"