From 3126fe8b1505400514753b16997cbc8ba4a3ef2a Mon Sep 17 00:00:00 2001 From: yury Date: Wed, 9 Nov 2005 08:13:37 +0000 Subject: [PATCH] - fixes in CROW related tests (15*) --- lustre/tests/replay-dual.sh | 40 +++++++++++++++++++++++++--------------- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/lustre/tests/replay-dual.sh b/lustre/tests/replay-dual.sh index c45bcde..a5f461b 100755 --- a/lustre/tests/replay-dual.sh +++ b/lustre/tests/replay-dual.sh @@ -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 } -- 1.8.3.1