Whamcloud - gitweb
b=23728 fix regression in wait_flavor.
authorEric Mei <eric.mei@oracle.com>
Tue, 21 Sep 2010 14:37:57 +0000 (18:37 +0400)
committerMikhail Pershin <tappro@sun.com>
Tue, 21 Sep 2010 15:01:54 +0000 (19:01 +0400)
i=jian.yu

lustre/tests/test-framework.sh

index 61409d4..84534a2 100644 (file)
@@ -4154,16 +4154,11 @@ wait_flavor()
     local res=0
 
     for ((i=0;i<20;i++)); do
     local res=0
 
     for ((i=0;i<20;i++)); do
-        echo -n "checking..."
+        echo -n "checking $dir..."
         res=$(do_check_flavor $dir $flavor)
         res=$(do_check_flavor $dir $flavor)
-        if [ $res -eq $expect ]; then
-            echo "found $res $flavor connections of $dir, OK"
-            return 0
-        else
-            echo "found $res $flavor connections of $dir, not ready ($expect)"
-            return 0
-            sleep 4
-        fi
+        echo "found $res/$expect $flavor connections"
+        [ $res -eq $expect ] && return 0
+        sleep 4
     done
 
     echo "Error checking $flavor of $dir: expect $expect, actual $res"
     done
 
     echo "Error checking $flavor of $dir: expect $expect, actual $res"