Whamcloud - gitweb
b=20094
[fs/lustre-release.git] / lustre / tests / sanity.sh
index a482ad5..199b055 100644 (file)
@@ -5207,11 +5207,11 @@ run_test 120g "Early Lock Cancel: performance test"
 
 test_121() { #bug #10589
        rm -rf $DIR/$tfile
-       writes=$(LANG=C dd if=/dev/zero of=$DIR/$tfile count=1 2>&1 | awk -F '+' '/out/ {print $1}')
+       writes=$(LANG=C dd if=/dev/zero of=$DIR/$tfile count=1 2>&1 | awk -F '+' '/out$/ {print $1}')
 #define OBD_FAIL_LDLM_CANCEL_RACE        0x310
        lctl set_param fail_loc=0x310
        cancel_lru_locks osc > /dev/null
-       reads=$(LANG=C dd if=$DIR/$tfile of=/dev/null 2>&1 | awk -F '+' '/in/ {print $1}')
+       reads=$(LANG=C dd if=$DIR/$tfile of=/dev/null 2>&1 | awk -F '+' '/in$/ {print $1}')
        lctl set_param fail_loc=0
        [ "$reads" -eq "$writes" ] || error "read" $reads "blocks, must be" $writes
 }
@@ -5962,7 +5962,14 @@ test_132() { #1028, SOM
         som_mode_switch $som1 $gl1 $gl2
 
         som2=$(do_facet $mymds "$LCTL get_param mdt.*.som" |  awk -F= ' {print $2}' | head -n 1)
-        [ $som1 != $som2 ] || error "som is still "$som2
+        if [ $som1 == $som2 ]; then
+            error "som is still "$som2
+            if [ x$som2 = x"enabled" ]; then
+                som2="disabled"
+            else
+                som2="enabled"
+            fi
+        fi
 
         gl1=$(get_ost_param "ldlm_glimpse_enqueue")
         stat $DIR/$tfile >/dev/null
@@ -6433,8 +6440,8 @@ run_test 200c "Set pool on a directory ================================="
 
 test_200d() {
        remote_mgs_nodsh && skip "remote MGS with nodsh" && return
-       res=$($GETSTRIPE $POOL_DIR | grep pool: | cut -f8 -d " ")
-       [ "$res" = $POOL ] || error "Pool on $POOL_DIR is not $POOL"
+       res=$($GETSTRIPE --pool $POOL_DIR | awk '/^pool:/ {print $2}')
+       [ "$res" = $POOL ] || error "Pool on $POOL_DIR is $res, not $POOL"
 }
 run_test 200d "Check pool on a directory ==============================="