Whamcloud - gitweb
- fixes in CROW related tests (15*)
authoryury <yury>
Wed, 9 Nov 2005 08:13:37 +0000 (08:13 +0000)
committeryury <yury>
Wed, 9 Nov 2005 08:13:37 +0000 (08:13 +0000)
lustre/tests/replay-dual.sh

index c45bcde..a5f461b 100755 (executable)
@@ -334,19 +334,37 @@ test_15a() {
     df $MOUNT || return 1
     
     ost_last_id=`cat /proc/fs/lustre/obdfilter/*/last_id`
-    osc_last_id=`cat /proc/fs/lustre/osc/*mds*/last_id`
-
+    mds_last_id=`cat /proc/fs/lustre/osc/*mds*/last_id`
+    
     echo "Ids after MDS<->OST synchonizing"
     echo "--------------------------------"
     echo "MDS last_id:"
-    echo $osc_last_id
+    echo $mds_last_id
     echo "OST last_id:"
     echo $ost_last_id
 
-    test "$ost_last_id" = "$osc_last_id" || {
-       echo "OST and MDS last_id are different. OST did not remove orphans?"
-       return 2
-    }
+    local i=0
+    echo $ost_last_id | while read id; do
+       ost_ids[$i]=$id
+       ((i++))
+    done
+    
+    i=0
+    echo $mds_last_id | while read id; do
+       mds_ids[$i]=$id
+       ((i++))
+    done
+    
+    local arr_len=${#mds_ids[*]}
+    for ((i=0;i<$arr_len;i++)); do
+           mds_id=${mds_ids[i]}
+           ost_id=${ost_ids[i]}
+           
+           test $mds_id -ge $ost_id || {
+               echo "MDS last id ($mds_id) is smaller than OST one ($ost_id)"
+               return 2
+           }
+    done
 
     zconf_mount `hostname` $MOUNT2
     return 0
@@ -383,14 +401,6 @@ test_15c() {
 
     df $MOUNT || return 1
     
-    ost_last_id=`cat /proc/fs/lustre/obdfilter/*/last_id`
-    osc_last_id=`cat /proc/fs/lustre/osc/*mds*/last_id`
-
-    test "$ost_last_id" = "$osc_last_id" || {
-       echo "OST and MDS last_id are different. OST did not remove orphans?"
-       return 2
-    }
-
     zconf_mount `hostname` $MOUNT2
     return 0
 }